Merge "Move footer icons to assets/ directory"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 14 Sep 2014 12:19:10 +0000 (12:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 14 Sep 2014 12:19:10 +0000 (12:19 +0000)
1  2 
includes/Setup.php
includes/skins/Skin.php

diff --combined includes/Setup.php
@@@ -102,6 -102,15 +102,15 @@@ if ( $wgGitInfoCacheDirectory === fals
        $wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo";
  }
  
+ // Fix path to icon images after they were moved in 1.24
+ if ( $wgRightsIcon ) {
+       $wgRightsIcon = str_replace(
+               "{$wgStylePath}/common/images/",
+               "{$wgScriptPath}/assets/licenses/",
+               $wgRightsIcon
+       );
+ }
  if ( isset( $wgFooterIcons['copyright'] )
        && isset( $wgFooterIcons['copyright']['copyright'] )
        && $wgFooterIcons['copyright']['copyright'] === array()
@@@ -124,7 -133,7 +133,7 @@@ if ( isset( $wgFooterIcons['poweredby'
        && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
  ) {
        $wgFooterIcons['poweredby']['mediawiki']['src'] =
-               "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
+               "$wgScriptPath/assets/poweredby_mediawiki_88x31.png";
  }
  
  /**
@@@ -302,33 -311,7 +311,33 @@@ if ( !$wgCookiePrefix ) 
  }
  $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' );
  
 -$wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
 +if ( $wgEnableEmail ) {
 +      $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
 +} else {
 +      // Disable all other email settings automatically if $wgEnableEmail
 +      // is set to false. - bug 63678
 +      $wgAllowHTMLEmail = false;
 +      $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
 +      $wgEnableUserEmail = false;
 +      $wgEnotifFromEditor = false;
 +      $wgEnotifImpersonal = false;
 +      $wgEnotifMaxRecips = 0;
 +      $wgEnotifMinorEdits = false;
 +      $wgEnotifRevealEditorAddress = false;
 +      $wgEnotifUseJobQ = false;
 +      $wgEnotifUseRealName = false;
 +      $wgEnotifUserTalk = false;
 +      $wgEnotifWatchlist = false;
 +      unset( $wgGroupPermissions['user']['sendemail'] );
 +      $wgUseEnotif = false;
 +      $wgUserEmailUseReplyTo = false;
 +      $wgUsersNotifiedOnAllChanges = array();
 +}
 +
 +// Doesn't make sense to have if disabled.
 +if ( !$wgEnotifMinorEdits ) {
 +      $wgHiddenPrefs[] = 'enotifminoredits';
 +}
  
  if ( $wgMetaNamespace === false ) {
        $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
@@@ -381,6 -364,11 +390,6 @@@ if ( $wgUseFileCache || $wgUseSquid ) 
        $wgDebugToolbar = false;
  }
  
 -// Doesn't make sense to have if disabled.
 -if ( !$wgEnotifMinorEdits ) {
 -      $wgHiddenPrefs[] = 'enotifminoredits';
 -}
 -
  // We always output HTML5 since 1.22, overriding these is no longer supported
  // we set them here for extensions that depend on its value.
  $wgHtml5 = true;
@@@ -622,6 -610,26 +631,6 @@@ $wgTitle = null
   */
  $wgDeferredUpdateList = array();
  
 -// Disable all other email settings automatically if $wgEnableEmail
 -// is set to false. - bug 63678
 -if ( !$wgEnableEmail ) {
 -      $wgAllowHTMLEmail = false;
 -      $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
 -      $wgEnableUserEmail = false;
 -      $wgEnotifFromEditor = false;
 -      $wgEnotifImpersonal = false;
 -      $wgEnotifMaxRecips = 0;
 -      $wgEnotifMinorEdits = false;
 -      $wgEnotifRevealEditorAddress = false;
 -      $wgEnotifUseJobQ = false;
 -      $wgEnotifUseRealName = false;
 -      $wgEnotifUserTalk = false;
 -      $wgEnotifWatchlist = false;
 -      unset( $wgGroupPermissions['user']['sendemail'] );
 -      $wgUserEmailUseReplyTo = false;
 -      $wgUsersNotifiedOnAllChanges = array();
 -}
 -
  wfProfileOut( $fname . '-globals' );
  wfProfileIn( $fname . '-extensions' );
  
diff --combined includes/skins/Skin.php
@@@ -827,9 -827,9 +827,9 @@@ abstract class Skin extends ContextSour
         * @return string
         */
        function getPoweredBy() {
-               global $wgStylePath;
+               global $wgScriptPath;
  
-               $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" );
+               $url = htmlspecialchars( "$wgScriptPath/assets/poweredby_mediawiki_88x31.png" );
                $text = '<a href="//www.mediawiki.org/"><img src="' . $url
                        . '" height="31" width="88" alt="Powered by MediaWiki" /></a>';
                wfRunHooks( 'SkinGetPoweredBy', array( &$text, $this ) );
        }
  
        /**
 -       * Return a fully resolved style path url to images or styles stored in the common folder.
 -       * This method returns a url resolved using the configured skin style path
 -       * and includes the style version inside of the url.
 +       * This function previously returned a fully resolved style path URL to images or styles stored in
 +       * the legacy skins/common/ directory.
 +       *
 +       * That directory has been removed in 1.24 and the function always returns an empty string.
 +       *
 +       * @deprecated since 1.24
         * @param string $name The name or path of a skin resource file
 -       * @return string The fully resolved style path url including styleversion
 +       * @return string Empty string
         */
        function getCommonStylePath( $name ) {
 -              global $wgStylePath, $wgStyleVersion;
 -              return "$wgStylePath/common/$name?$wgStyleVersion";
 +              wfDeprecated( __METHOD__, '1.24' );
 +              return '';
        }
  
        /**