Merge "Convert Special:DeletedContributions to use OOUI."
[lhc/web/wiklou.git] / includes / SiteConfiguration.php
index 1a92fb2..885f926 100644 (file)
  *
  * @code
  * $conf = new SiteConfiguration;
- * $conf->wikis = array( 'de', 'en', 'beta' );
+ * $conf->wikis = [ 'de', 'en', 'beta' ];
  * @endcode
  *
  * When configuring the MediaWiki global settings (the $wg variables),
  * the identifiers will be available to specify settings on a per wiki basis.
  *
  * @code
- * $conf->settings = array(
- *     'wgSomeSetting' => array(
+ * $conf->settings = [
+ *     'wgSomeSetting' => [
  *
  *             # production:
  *             'de'     => false,
@@ -52,8 +52,8 @@
  *
  *             # test:
  *             'beta    => true,
- *     ),
- * );
+ *     ],
+ * ];
  * @endcode
  *
  * With three wikis, that is easy to manage. But what about a farm with
  * the above code could be written:
  *
  * @code
- * $conf->settings = array(
- *     'wgSomeSetting' => array(
+ * $conf->settings = [
+ *     'wgSomeSetting' => [
  *
  *             'default' => false,
  *
  *             # Enable feature on test
  *             'beta'    => true,
- *     ),
- * );
+ *     ],
+ * ];
  * @endcode
  *
  *
  * on a per wiki basis.
  *
  * @code
- * $conf->settings = array(
- *     'wgMergeSetting' = array(
+ * $conf->settings = [
+ *     'wgMergeSetting' = [
  *             # Value that will be shared among all wikis:
- *             'default' => array( NS_USER => true ),
+ *             'default' => [ NS_USER => true ],
  *
  *             # Leading '+' means merging the array of value with the defaults
- *             '+beta' => array( NS_HELP => true ),
- *     ),
- * );
+ *             '+beta' => [ NS_HELP => true ],
+ *     ],
+ * ];
  *
  * # Get configuration for the German site:
  * $conf->get( 'wgMergeSetting', 'de' );
- * // --> array( NS_USER => true );
+ * // --> [ NS_USER => true ];
  *
  * # Get configuration for the testing site:
  * $conf->get( 'wgMergeSetting', 'beta' );
- * // --> array( NS_USER => true, NS_HELP => true );
+ * // --> [ NS_USER => true, NS_HELP => true ];
  * @endcode
  *
  * Finally, to load all configuration settings, extract them in global context:
  * 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 = array( 'wiki' );
+ * $conf->suffixes = [ 'wiki' ];
  * localVHosts
  * callbacks!
  */
@@ -565,17 +570,6 @@ class SiteConfiguration {
                return $multi ? $res : current( $res );
        }
 
-       /**
-        * Returns true if the given vhost is handled locally.
-        *
-        * @deprecated since 1.25; check if the host is in $wgLocalVirtualHosts instead.
-        * @param string $vhost
-        * @return bool
-        */
-       public function isLocalVHost( $vhost ) {
-               return in_array( $vhost, $this->localVHosts );
-       }
-
        /**
         * Merge multiple arrays together.
         * On encountering duplicate keys, merge the two, but ONLY if they're arrays.