Merge "SpecialUnblock: Remove addModules( 'mediawiki.special' )"
[lhc/web/wiklou.git] / includes / SiteConfiguration.php
index ffeb44d..2d1d961 100644 (file)
  * extract( $globals );
  * @endcode
  *
+ * @note For WikiMap to function, the configuration must define string values for
+ *  $wgServer (or $wgCanonicalServer) and $wgArticlePath, even if these are the
+ *  same for all wikis or can be correctly determined by the logic in
+ *  Setup.php.
+ *
  * @todo Give examples for,
  * suffixes:
  * $conf->suffixes = [ 'wiki' ];
@@ -269,7 +274,7 @@ class SiteConfiguration {
         * @param string $from
         * @param string $to
         * @param string|array $in
-        * @return string
+        * @return string|array
         */
        function doReplace( $from, $to, $in ) {
                if ( is_string( $in ) ) {
@@ -340,7 +345,7 @@ class SiteConfiguration {
         * @param string $setting ID of the setting name to retrieve
         * @param string $wiki Wiki ID of the wiki in question.
         * @param string $suffix The suffix of the wiki in question.
-        * @param array $var Reference The variable to insert the value into.
+        * @param array &$var Reference The variable to insert the value into.
         * @param array $params List of parameters. $.'key' is replaced by $value in all returned data.
         * @param array $wikiTags The tags assigned to the wiki.
         */
@@ -551,7 +556,7 @@ class SiteConfiguration {
                                ]
                        );
                        // ulimit5.sh breaks this call
-                       $data = trim( wfShellExec( $cmd, $retVal, [], [ 'memory' => 0 ] ) );
+                       $data = trim( wfShellExec( $cmd, $retVal, [], [ 'memory' => 0, 'filesize' => 0 ] ) );
                        if ( $retVal != 0 || !strlen( $data ) ) {
                                throw new MWException( "Failed to run getConfiguration.php." );
                        }