Merge "Replace Pakaran with Punjabi"
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index 8396805..7a1eb22 100644 (file)
@@ -2384,7 +2384,7 @@ $wgHTCPRouting = array();
 /**
  * @deprecated since 1.22, please use $wgHTCPRouting instead.
  *
- * Whenever this is set and $wgHTCPRouting evaluates to false, $wgHTCPRouting 
+ * Whenever this is set and $wgHTCPRouting evaluates to false, $wgHTCPRouting
  * will be set to this value.
  * This is merely for back compatibility.
  *
@@ -3282,6 +3282,101 @@ $wgResourceLoaderValidateStaticJS = false;
  */
 $wgResourceLoaderExperimentalAsyncLoading = false;
 
+/**
+ * Global LESS variables. An associative array binding variable names to CSS
+ * string values.
+ *
+ * Because the hashed contents of this array are used to construct the cache key
+ * that ResourceLoader uses to look up LESS compilation results, updating this
+ * array can be used to deliberately invalidate the set of cached results.
+ *
+ * @par Example:
+ * @code
+ *   $wgResourceLoaderLESSVars = array(
+ *     'baseFontSize'  => '1em',
+ *     'smallFontSize' => '0.75em',
+ *     'WikimediaBlue' => '#006699',
+ *   );
+ * @endcode
+ * @since 1.22
+ */
+$wgResourceLoaderLESSVars = array();
+
+/**
+ * Custom LESS functions. An associative array mapping function name to PHP
+ * callable.
+ *
+ * Changes to LESS functions do not trigger cache invalidation. If you update
+ * the behavior of a LESS function and need to invalidate stale compilation
+ * results, you can touch one of values in $wgResourceLoaderLESSVars, as
+ * documented above.
+ *
+ * @since 1.22
+ */
+$wgResourceLoaderLESSFunctions = array(
+       /**
+        * Check if an image file reference is suitable for embedding.
+        * An image is embeddable if it (a) exists, (b) has a suitable MIME-type,
+        * (c) does not exceed IE<9 size limit of 32kb. This is a LESS predicate
+        * function; it returns a LESS boolean value and can thus be used as a
+        * mixin guard.
+        *
+        * @par Example:
+        * @code
+        *   .background-image(@url) when(embeddable(@url)) {
+        *       background-image: url(@url) !ie;
+        *   }
+        * @endcode
+        */
+       'embeddable' => function( $frame, $less ) {
+               $base = pathinfo( $less->parser->sourceName, PATHINFO_DIRNAME );
+               $url = $frame[2][0];
+               $file = realpath( $base . '/' . $url );
+               $embeddable = ( $file
+                       && strpos( $url, '//' ) === false
+                       && filesize( $file ) < CSSMin::EMBED_SIZE_LIMIT
+                       && CSSMin::getMimeType( $file ) !== false ) ? 'true' : 'false';
+               return array( 'keyword', $embeddable );
+       },
+
+       /**
+        * Convert an image URI to a base64-encoded data URI.
+        *
+        * @par Example:
+        * @code
+        *   .fancy-button {
+        *       background-image: embed('../images/button-bg.png');
+        *   }
+        * @endcode
+        */
+       'embed' => function( $frame, $less ) {
+               $base = pathinfo( $less->parser->sourceName, PATHINFO_DIRNAME );
+               $url = $frame[2][0];
+               $file = realpath( $base . '/' . $url );
+
+               $data = CSSMin::encodeImageAsDataURI( $file );
+               $less->embeddedImages[ $file ] = filemtime( $file );
+               return 'url(' . $data . ')';
+       },
+);
+
+/**
+ * Default import paths for LESS modules. LESS files referenced in @import
+ * statements will be looked up here first, and relative to the importing file
+ * second. To avoid collisions, it's important for the LESS files in these
+ * directories to have a common, predictable file name prefix.
+ *
+ * Extensions need not (and should not) register paths in
+ * $wgResourceLoaderLESSImportPaths. The import path includes the path of the
+ * currently compiling LESS file, which allows each extension to freely import
+ * files from its own tree.
+ *
+ * @since 1.22
+ */
+$wgResourceLoaderLESSImportPaths = array(
+       "$IP/resources/mediawiki.less/",
+);
+
 /** @} */ # End of resource loader settings }
 
 /*************************************************************************//**
@@ -3999,13 +4094,6 @@ $wgUserrightsInterwikiDelimiter = '@';
  */
 $wgSecureLogin = false;
 
-/**
- * By default, keep users logged in via HTTPS when $wgSecureLogin is also
- * true. Users opt-out of HTTPS when they login by de-selecting the checkbox.
- * @since 1.21
- */
-$wgSecureLoginDefaultHTTPS = true;
-
 /** @} */ # end user accounts }
 
 /************************************************************************//**
@@ -4887,6 +4975,37 @@ $wgShowSQLErrors = false;
  */
 $wgShowExceptionDetails = false;
 
+/**
+ * Array of functions which need parameters redacted from stack traces shown to
+ * clients and logged. Keys are in the format '[class::]function', and the
+ * values should be either an integer or an array of integers. These are the
+ * indexes of the parameters which need to be kept secret.
+ * @since 1.22
+ */
+$wgRedactedFunctionArguments = array(
+       'AuthPlugin::setPassword' => 1,
+       'AuthPlugin::authenticate' => 1,
+       'AuthPlugin::addUser' => 1,
+
+       'DatabaseBase::__construct' => 2,
+       'DatabaseBase::open' => 2,
+
+       'SpecialChangeEmail::attemptChange' => 1,
+       'SpecialChangePassword::attemptReset' => 0,
+
+       'User::setPassword' => 0,
+       'User::setInternalPassword' => 0,
+       'User::checkPassword' => 0,
+       'User::setNewpassword' => 0,
+       'User::comparePasswords' => array( 0, 1 ),
+       'User::checkTemporaryPassword' => 0,
+       'User::setToken' => 0,
+       'User::crypt' => 0,
+       'User::oldCrypt' => 0,
+       'User::getPasswordValidity' => 0,
+       'User::isValidPassword' => 0,
+);
+
 /**
  * If true, show a backtrace for database errors
  */
@@ -5401,11 +5520,15 @@ $wgRCLinkDays = array( 1, 3, 7, 14, 30 );
 /**
  * Send recent changes updates via UDP. The updates will be formatted for IRC.
  * Set this to the IP address of the receiver.
+ *
+ * @deprecated since 1.22, use $wgRCFeeds
  */
 $wgRC2UDPAddress = false;
 
 /**
  * Port number for RC updates
+ *
+ * @deprecated since 1.22, use $wgRCFeeds
  */
 $wgRC2UDPPort = false;
 
@@ -5414,21 +5537,72 @@ $wgRC2UDPPort = false;
  * This can be used to identify the wiki. A script is available called
  * mxircecho.py which listens on a UDP port, and uses a prefix ending in a
  * tab to identify the IRC channel to send the log line to.
+ *
+ * @deprecated since 1.22, use $wgRCFeeds
  */
 $wgRC2UDPPrefix = '';
 
 /**
  * If this is set to true, $wgLocalInterwiki will be prepended to links in the
  * IRC feed. If this is set to a string, that string will be used as the prefix.
+ *
+ * @deprecated since 1.22, use $wgRCFeeds
  */
 $wgRC2UDPInterwikiPrefix = false;
 
 /**
  * Set to true to omit "bot" edits (by users with the bot permission) from the
  * UDP feed.
+ *
+ * @deprecated since 1.22, use $wgRCFeeds
  */
 $wgRC2UDPOmitBots = false;
 
+/**
+ * Destinations to which notifications about recent changes
+ * should be sent.
+ *
+ * As of MediaWiki 1.22, the only supported 'engine' parameter option in core
+ * is 'UDPRCFeedEngine', which is used to send recent changes over UDP to the
+ * specified server.
+ * The common options are:
+ *   * 'uri' -- the address to which the notices are to be sent.
+ *   * 'formatter' -- the class name (implementing RCFeedFormatter) which will
+ *     produce the text to send.
+ *   * 'omit_bots' -- whether the bot edits should be in the feed
+ *  The IRC-specific options are:
+ *   * 'add_interwiki_prefix' -- whether the titles should be prefixed with
+ *     $wgLocalInterwiki.
+ *  The JSON-specific options are:
+ *   * 'channel' -- if set, the 'channel' parameter is also set in JSON values.
+ *
+ *  To ensure backwards-compatability, whenever $wgRC2UDPAddress is set, a
+ *  'default' feed will be created reusing the deprecated $wgRC2UDP* variables.
+ *
+ * @example $wgRCFeeds['example'] = array(
+ *             'formatter' => 'JSONRCFeedFormatter',
+ *             'uri' => "udp://localhost:1336",
+ *             'add_interwiki_prefix' => false,
+ *             'omit_bots' => true,
+ *     );
+ * @example $wgRCFeeds['exampleirc'] = array(
+ *             'formatter' => 'IRCColourfulRCFeedFormatter',
+ *             'uri' => "udp://localhost:1338",
+ *             'add_interwiki_prefix' => false,
+ *             'omit_bots' => true,
+ *     );
+ * @since 1.22
+ */
+$wgRCFeeds = array();
+
+/**
+ * Used by RecentChange::getEngine to find the correct engine to use for a given URI scheme.
+ * Keys are scheme names, values are names of engine classes.
+ */
+$wgRCEngines = array(
+       'udp' => 'UDPRCFeedEngine',
+);
+
 /**
  * Enable user search in Special:Newpages
  * This is really a temporary hack around an index install bug on some Wikipedias.