Remove redundant UNIQUE from rev_page_id
[lhc/web/wiklou.git] / includes / installer / LocalSettingsGenerator.php
index e054709..1d7c7f2 100644 (file)
@@ -29,9 +29,9 @@
  */
 class LocalSettingsGenerator {
 
-       protected $extensions = array();
-       protected $values = array();
-       protected $groupPermissions = array();
+       protected $extensions = [];
+       protected $values = [];
+       protected $groupPermissions = [];
        protected $dbSettings = '';
        protected $IP;
 
@@ -55,7 +55,7 @@ class LocalSettingsGenerator {
                $db = $installer->getDBInstaller( $installer->getVar( 'wgDBtype' ) );
 
                $confItems = array_merge(
-                       array(
+                       [
                                'wgServer', 'wgScriptPath',
                                'wgPasswordSender', 'wgImageMagickConvertCommand', 'wgShellLocale',
                                'wgLanguageCode', 'wgEnableEmail', 'wgEnableUserEmail', 'wgDiff3',
@@ -64,16 +64,17 @@ class LocalSettingsGenerator {
                                'wgRightsText', '_MainCacheType', 'wgEnableUploads',
                                '_MemCachedServers', 'wgDBserver', 'wgDBuser',
                                'wgDBpassword', 'wgUseInstantCommons', 'wgUpgradeKey', 'wgDefaultSkin',
-                               'wgMetaNamespace', 'wgLogo', 'wgAuthenticationTokenVersion',
-                       ),
+                               'wgMetaNamespace', 'wgLogo', 'wgAuthenticationTokenVersion', 'wgPingback',
+                       ],
                        $db->getGlobalNames()
                );
 
-               $unescaped = array( 'wgRightsIcon', 'wgLogo' );
-               $boolItems = array(
+               $unescaped = [ 'wgRightsIcon', 'wgLogo' ];
+               $boolItems = [
                        'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk',
-                       'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads', 'wgUseInstantCommons'
-               );
+                       'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads', 'wgUseInstantCommons',
+                       'wgPingback',
+               ];
 
                foreach ( $confItems as $c ) {
                        $val = $installer->getVar( $c );
@@ -117,14 +118,14 @@ class LocalSettingsGenerator {
 
                return strtr(
                        $string,
-                       array(
+                       [
                                "\n" => "\\n",
                                "\r" => "\\r",
                                "\t" => "\\t",
                                "\\" => "\\\\",
                                "\$" => "\\\$",
                                "\"" => "\\\""
-                       )
+                       ]
                );
        }
 
@@ -214,9 +215,9 @@ class LocalSettingsGenerator {
                $servers = $this->values['_MemCachedServers'];
 
                if ( !$servers ) {
-                       return 'array()';
+                       return '[]';
                } else {
-                       $ret = 'array( ';
+                       $ret = '[ ';
                        $servers = explode( ',', $servers );
 
                        foreach ( $servers as $srv ) {
@@ -224,7 +225,7 @@ class LocalSettingsGenerator {
                                $ret .= "'$srv', ";
                        }
 
-                       return rtrim( $ret, ', ' ) . ' )';
+                       return rtrim( $ret, ', ' ) . ' ]';
                }
        }
 
@@ -372,6 +373,11 @@ ${serverSetting}
 # InstantCommons allows wiki to use images from https://commons.wikimedia.org
 \$wgUseInstantCommons = {$this->values['wgUseInstantCommons']};
 
+# Periodically send a pingback to https://www.mediawiki.org/ with basic data
+# about this MediaWiki instance. The Wikimedia Foundation shares this data
+# with MediaWiki developers to help guide future development efforts.
+\$wgPingback = {$this->values['wgPingback']};
+
 ## If you use ImageMagick (or any other shell command) on a
 ## Linux server, this will need to be set to the name of an
 ## available UTF-8 locale