Merge "Removed unused getZoneHandlerUrl() method"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 5 May 2014 18:25:07 +0000 (18:25 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 5 May 2014 18:25:07 +0000 (18:25 +0000)
1  2 
includes/DefaultSettings.php
includes/filerepo/FileRepo.php

@@@ -400,8 -400,6 +400,6 @@@ $wgImgAuthUrlPathMap = array()
   *                          url        : base URL to the root of the zone
   *                          urlsByExt  : map of file extension types to base URLs
   *                                       (useful for using a different cache for videos)
-  *                          handlerUrl : base script-handled URL to the root of the zone
-  *                                       (see FileRepo::getZoneHandlerUrl() function)
   *                      Zones default to using "<repo name>-<zone name>" as the container name
   *                      and default to using the container root as the zone's root directory.
   *                      Nesting of zone locations within other zones should be avoided.
@@@ -3716,14 -3714,36 +3714,14 @@@ $wgMaxTemplateDepth = 40
  $wgMaxPPExpandDepth = 40;
  
  /**
 - * The external URL protocols
 + * URL schemes that should be recognized as valid by wfParseUrl().
 + * @see wfParseUrl
   */
  $wgUrlProtocols = array(
 -      'http://',
 -      'https://',
 -      'ftp://',
 -      'ftps://', // If we allow ftp:// we should allow the secure version.
 -      'ssh://',
 -      'sftp://', // SFTP > FTP
 -      'irc://',
 -      'ircs://', // @bug 28503
 -      'xmpp:', // Another open communication protocol
 -      'sip:',
 -      'sips:',
 -      'gopher://',
 -      'telnet://', // Well if we're going to support the above.. -ævar
 -      'nntp://', // @bug 3808 RFC 1738
 -      'worldwind://',
 -      'mailto:',
 -      'tel:', // If we can make emails linkable, why not phone numbers?
 -      'sms:', // Likewise this is standardized too
 -      'news:',
 -      'svn://',
 -      'git://',
 -      'mms://',
 -      'bitcoin:', // Even registerProtocolHandler whitelists this along with mailto:
 -      'magnet:', // No reason to reject torrents over magnet: when they're allowed over http://
 -      'urn:', // Allow URNs to be used in Microdata/RDFa <link ... href="urn:...">s
 -      'geo:', // urls define geo locations, they're useful in Microdata/RDFa and for coordinates
 -      '//', // for protocol-relative URLs
 +      'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
 +      'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
 +      'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
 +      'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:', '//'
  );
  
  /**
@@@ -295,29 -295,6 +295,6 @@@ class FileRepo 
                }
        }
  
-       /**
-        * Get the thumb zone URL configured to be handled by scripts like thumb_handler.php.
-        * This is probably only useful for internal requests, such as from a fast frontend server
-        * to a slower backend server.
-        *
-        * Large sites may use a different host name for uploads than for wikis. In any case, the
-        * wiki configuration is needed in order to use thumb.php. To avoid extracting the wiki ID
-        * from the URL path, one can configure thumb_handler.php to recognize a special path on the
-        * same host name as the wiki that is used for viewing thumbnails.
-        *
-        * @param string $zone One of: public, deleted, temp, thumb
-        * @return string|bool String or false
-        */
-       public function getZoneHandlerUrl( $zone ) {
-               if ( isset( $this->zones[$zone]['handlerUrl'] )
-                       && in_array( $zone, array( 'public', 'temp', 'thumb', 'transcoded' ) )
-               ) {
-                       return $this->zones[$zone]['handlerUrl'];
-               }
-               return false;
-       }
        /**
         * Get the backend storage path corresponding to a virtual URL.
         * Use this function wisely.
         * @return string
         */
        public function getDisplayName() {
 -              // We don't name our own repo, return nothing
 +              global $wgSitename;
 +
                if ( $this->isLocal() ) {
 -                      return null;
 +                      return $wgSitename;
                }
  
                // 'shared-repo-name-wikimediacommons' is used when $wgUseInstantCommons = true