Merge "Add missing access modifiers in UploadBase"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 28 Feb 2017 18:34:13 +0000 (18:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 28 Feb 2017 18:34:13 +0000 (18:34 +0000)
1  2 
includes/upload/UploadBase.php

@@@ -297,7 -297,7 +297,7 @@@ abstract class UploadBase 
         * @param string $srcPath The source path
         * @return string|bool The real path if it was a virtual URL Returns false on failure
         */
-       function getRealPath( $srcPath ) {
+       public function getRealPath( $srcPath ) {
                $repo = RepoGroup::singleton()->getLocalRepo();
                if ( $repo->isVirtualUrl( $srcPath ) ) {
                        /** @todo Just make uploads work with storage paths UploadFromStash
         *
         * @param array $entry
         */
-       function zipEntryCallback( $entry ) {
+       public function zipEntryCallback( $entry ) {
                $names = [ $entry['name'] ];
  
                // If there is a null character, cut off the name at it, because JDK's
                        return $this->mTitle;
                }
  
 -              // Windows may be broken with special characters, see bug 1780
 +              // Windows may be broken with special characters, see T3780
                if ( !preg_match( '/^[\x0-\x7f]*$/', $nt->getText() )
                        && !RepoGroup::singleton()->getLocalRepo()->backendSupportsUnicodePaths()
                ) {
                }
  
                // Some browsers will interpret obscure xml encodings as UTF-8, while
 -              // PHP/expat will interpret the given encoding in the xml declaration (bug 47304)
 +              // PHP/expat will interpret the given encoding in the xml declaration (T49304)
                if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
                        if ( self::checkXMLEncodingMissmatch( $file ) ) {
                                return true;
                        [ 'processing_instruction_handler' => 'UploadBase::checkSvgPICallback' ]
                );
                if ( $check->wellFormed !== true ) {
 -                      // Invalid xml (bug 58553)
 -                      // But only when non-partial (bug 65724)
 +                      // Invalid xml (T60553)
 +                      // But only when non-partial (T67724)
                        return $partial ? false : [ 'uploadinvalidxml' ];
                } elseif ( $check->filterMatch ) {
                        if ( $this->mSVGNSError ) {
         * @return bool (true if the filter identified something bad)
         */
        public static function checkSvgPICallback( $target, $data ) {
 -              // Don't allow external stylesheets (bug 57550)
 +              // Don't allow external stylesheets (T59550)
                if ( preg_match( '/xml-stylesheet/i', $target ) ) {
                        return [ 'upload-scripted-pi-callback' ];
                }
                list( $namespace, $strippedElement ) = $this->splitXmlNamespace( $element );
  
                // We specifically don't include:
 -              // http://www.w3.org/1999/xhtml (bug 60771)
 +              // http://www.w3.org/1999/xhtml (T62771)
                static $validNamespaces = [
                        '',
                        'adobe:ns:meta/',