Merge "mediawiki.special/mediawiki.special.apisandbox: Use 'trash' icon which still...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 1 Jun 2017 15:43:10 +0000 (15:43 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 1 Jun 2017 15:43:10 +0000 (15:43 +0000)
RELEASE-NOTES-1.30
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/OutputPage.php
includes/Setup.php
includes/exception/MWExceptionRenderer.php
resources/ResourcesOOUI.php
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuOptionWidget.monobook.less

index e61277a..22fed0c 100644 (file)
@@ -21,6 +21,8 @@ production.
   to plain class names, using the 'factory' key in the module description
   array. This allows dependency injection to be used for ResourceLoader modules.
 * $wgExceptionHooks has been removed.
+* $wgShellLocale is now applied for all requests. wfInitShellLocale() is
+  deprecated and a no-op, as it is no longer needed.
 
 === New features in 1.30 ===
 * (T37247) Output from Parser::parse() will now be wrapped in a div with
index 19c585d..f7f52e5 100644 (file)
@@ -8183,7 +8183,6 @@ $wgPhpCli = '/usr/bin/php';
  * @note If multiple wikis are being served from the same process (e.g. the
  *  same fastCGI or Apache server), this setting must be the same on all those
  *  wikis.
- * @see wfInitShellLocale()
  */
 $wgShellLocale = 'C.UTF-8';
 
index 9150338..c6ccf31 100644 (file)
@@ -2192,8 +2192,6 @@ function wfIniGetBool( $setting ) {
  * @return string
  */
 function wfEscapeShellArg( /*...*/ ) {
-       wfInitShellLocale();
-
        $args = func_get_args();
        if ( count( $args ) === 1 && is_array( reset( $args ) ) ) {
                // If only one argument has been passed, and that argument is an array,
@@ -2308,8 +2306,6 @@ function wfShellExec( $cmd, &$retval = null, $environ = [],
        $includeStderr = isset( $options['duplicateStderr'] ) && $options['duplicateStderr'];
        $profileMethod = isset( $options['profileMethod'] ) ? $options['profileMethod'] : wfGetCaller();
 
-       wfInitShellLocale();
-
        $envcmd = '';
        foreach ( $environ as $k => $v ) {
                if ( wfIsWindows() ) {
@@ -2533,25 +2529,14 @@ function wfShellExecWithStderr( $cmd, &$retval = null, $environ = [], $limits =
 }
 
 /**
- * Set the locale for locale-sensitive operations
+ * Formerly set the locale for locale-sensitive operations
  *
- * Sets LC_ALL to a known value to work around issues like the following:
- * - https://bugs.php.net/bug.php?id=45132 escapeshellarg() destroys non-ASCII
- *   characters if LANG is not a UTF-8 locale
- * - T107128 Scribunto string comparison works case insensitive while the
- *   standard Lua case sensitive
+ * This is now done in Setup.php.
  *
+ * @deprecated since 1.30, no longer needed
  * @see $wgShellLocale
  */
 function wfInitShellLocale() {
-       static $done = false;
-       if ( $done ) {
-               return;
-       }
-       $done = true;
-       global $wgShellLocale;
-       putenv( "LC_ALL=$wgShellLocale" );
-       setlocale( LC_ALL, $wgShellLocale );
 }
 
 /**
index e22f42c..fe0f0b6 100644 (file)
@@ -3976,7 +3976,6 @@ class OutputPage extends ContextSource {
                );
                $this->addModuleStyles( [
                        'oojs-ui-core.styles',
-                       'oojs-ui.styles.icons',
                        'oojs-ui.styles.indicators',
                        'oojs-ui.styles.textures',
                        'mediawiki.widgets.styles',
index 5ea96dd..b10cf23 100644 (file)
@@ -49,6 +49,10 @@ if ( !isset( $wgVersion ) ) {
 
 mb_internal_encoding( 'UTF-8' );
 
+// Set the configured locale on all requests for consisteny
+putenv( "LC_ALL=$wgShellLocale" );
+setlocale( LC_ALL, $wgShellLocale );
+
 // Set various default paths sensibly...
 $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' );
 
index bd43934..5162a1f 100644 (file)
@@ -96,9 +96,14 @@ class MWExceptionRenderer {
                        }
                }
 
+               // Don't even bother with OutputPage if there's no Title context set,
+               // (e.g. we're in RL code on load.php) - the Skin system (and probably
+               // most of MediaWiki) won't work.
+
                return (
                        !empty( $GLOBALS['wgFullyInitialised'] ) &&
                        !empty( $GLOBALS['wgOut'] ) &&
+                       RequestContext::getMain()->getTitle() &&
                        !defined( 'MEDIAWIKI_INSTALL' )
                );
        }
index a320278..c9b5d89 100644 (file)
@@ -67,7 +67,6 @@ return call_user_func( function () {
                'dependencies' => [
                        'oojs',
                        'oojs-ui-core.styles',
-                       'oojs-ui.styles.icons',
                        'oojs-ui.styles.indicators',
                        'oojs-ui.styles.textures',
                        'mediawiki.language',
index dbcc3e4..01b87c0 100644 (file)
@@ -1,5 +1,5 @@
 .mw-rcfilters-ui-filterMenuOptionWidget {
-       &.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected .oo-ui-iconElement-icon {
+       &.oo-ui-menuOptionWidget.oo-ui-optionWidget-selected .oo-ui-iconElement-icon {
                background-image: none;
        }
 }