http://www.mediawiki.org/wiki/Special:Code/MediaWiki/55147

Revision: 55147
Author:   demon
Date:     2009-08-16 17:14:30 +0000 (Sun, 16 Aug 2009)

Log Message:
-----------
* Rename config-buglink to config-plainlink
* Allow setting object caching on options page, based on earlier object cache 
checks
* Renamed _Caches to _AvailableCaches to avoid confusion with user-chosen _Cache
* Remove check for dba_open per Tim

Modified Paths:
--------------
    branches/new-installer/phase3/includes/installer/Installer.php
    branches/new-installer/phase3/includes/installer/WebInstaller.php
    branches/new-installer/phase3/languages/messages/MessagesEn.php
    branches/new-installer/phase3/skins/common/config.css

Modified: branches/new-installer/phase3/includes/installer/Installer.php
===================================================================
--- branches/new-installer/phase3/includes/installer/Installer.php      
2009-08-16 15:44:59 UTC (rev 55146)
+++ branches/new-installer/phase3/includes/installer/Installer.php      
2009-08-16 17:14:30 UTC (rev 55147)
@@ -46,7 +46,8 @@
                '_SafeMode' => false,
                '_RaiseMemory' => false,
                '_UpgradeDone' => false,
-               '_Caches' => array(),
+               '_AvailableCaches' => array(),
+               '_Cache' => false,
                '_InstallUser' => 'root',
                '_InstallPassword' => '',
                '_SameAccount' => true,
@@ -439,10 +440,7 @@
                if ( !$caches ) {
                        $this->showMessage( 'config-no-cache' );
                }
-               if ( function_exists( 'dba_open' ) ) {
-                       $caches['dba'] = true;
-               }
-               $this->setVar( '_Caches', $caches );
+               $this->setVar( '_AvailableCaches', $caches );
        }
 
        /** Search for GNU diff3 */

Modified: branches/new-installer/phase3/includes/installer/WebInstaller.php
===================================================================
--- branches/new-installer/phase3/includes/installer/WebInstaller.php   
2009-08-16 15:44:59 UTC (rev 55146)
+++ branches/new-installer/phase3/includes/installer/WebInstaller.php   
2009-08-16 17:14:30 UTC (rev 55147)
@@ -1200,9 +1200,11 @@
                $licenseJs = 'showControlArray("config__LicenseCode_cc-choose", 
["config-cc-wrapper"]);';
                $emailJs = 'enableControlArray("config_wgEnableEmail", 
["config_wgPasswordSender"]);';
                $uploadJs = 'enableControlArray("config_wgEnableUploads", 
["config_wgDeletedDirectory"]);';
+               $caches = $this->getVar( '_AvailableCaches' );
 
                $this->startForm();
                $this->parent->output->addHTML(
+                       # User Rights
                        $this->parent->getRadioSet( array(
                                'var' => '_RightsProfile',
                                'label' => 'config-profile',
@@ -1210,6 +1212,8 @@
                                'values' => array_keys( 
$this->parent->rightsProfiles ),
                        ) ) .
                        $this->parent->getHelpBox( 'config-profile-help' ) .
+
+                       # Licensing
                        $this->parent->getRadioSet( array(
                                'var' => '_LicenseCode',
                                'label' => 'config-license',
@@ -1219,6 +1223,8 @@
                        ) ) .
                        $this->getCCChooser() .
                        $this->parent->getHelpBox( 'config-license-help' ) .
+                       
+                       # E-mail
                        $this->parent->getFieldsetStart( 
'config-email-settings' ) .
                        $this->parent->getCheckBox( array(
                                'var' => 'wgEnableEmail',
@@ -1232,6 +1238,8 @@
                        ) ) .
                        $this->parent->getHelpBox( 'config-email-sender-help' ) 
.
                        $this->parent->getFieldsetEnd() .
+
+                       # Uploading
                        $this->parent->getFieldsetStart( 
'config-upload-settings' ) .
                        $this->parent->getCheckBox( array( 
                                'var' => 'wgEnableUploads',
@@ -1250,6 +1258,18 @@
                        ) ) .
                        $this->parent->getHelpBox( 'config-logo-help' ) .
                        $this->parent->getFieldsetEnd() .
+
+                       # Advanced settings
+                       $this->parent->getFieldsetStart( 
'config-advanced-settings' ) .
+                       ( $caches ? $this->parent->getRadioSet( array(
+                               'var' => '_Cache',
+                               'label' => 'config-caching',
+                               'itemLabelPrefix' => 'config-caching-',
+                               'values' => array_keys( $caches ),
+                       ) ) .
+                       $this->parent->getHelpBox( 'config-caching-help' ) : '' 
) .
+                       $this->parent->getFieldsetEnd() .
+
                        "<script type=\"text/javascript\">$licenseJs $emailJs 
$uploadJs</script>\n"
 
                );
@@ -1424,11 +1444,11 @@
                return $text;
        }
        private static function replaceBugLinks( $matches ) {
-               return '(<span 
class="config-buglink">[https://bugzilla.wikimedia.org/show_bug.cgi?id=' .
+               return '(<span 
class="config-plainlink">[https://bugzilla.wikimedia.org/show_bug.cgi?id=' .
                        $matches[1] . ' bug ' . $matches[1] . '])';
        }
        private static function replaceConfigLinks( $matches ) {
-               return '<span 
class="config-buglink">[http://www.mediawiki.org/wiki/Manual:' .
+               return '<span 
class="config-plainlink">[http://www.mediawiki.org/wiki/Manual:' .
                        $matches[1] . ' ' . $matches[1] . ']';
        }
 }

Modified: branches/new-installer/phase3/languages/messages/MessagesEn.php
===================================================================
--- branches/new-installer/phase3/languages/messages/MessagesEn.php     
2009-08-16 15:44:59 UTC (rev 55146)
+++ branches/new-installer/phase3/languages/messages/MessagesEn.php     
2009-08-16 17:14:30 UTC (rev 55147)
@@ -4310,6 +4310,13 @@
 'config-cc-error' => 'The Creative Commons license chooser gave no result. 
Please enter the license name manually.',
 'config-cc-again' => 'Pick again...',
 'config-cc-not-chosen' => 'Please choose which Creative Commons license you 
want and click "proceed".',
+'config-advanced-settings' => 'Advanced configuration',
+'config-caching' => 'Object caching',
+'config-caching-help' => 'Object caching is generally recommended for most 
medium and large sites',
+'config-caching-turck' => 'Turck MMCache',
+'config-caching-xcache' => 'XCache',
+'config-caching-apc' => 'APC',
+'config-caching-eaccel' => 'eAccelerator',
 
 # Special:Version
 'version'                          => 'Version',

Modified: branches/new-installer/phase3/skins/common/config.css
===================================================================
--- branches/new-installer/phase3/skins/common/config.css       2009-08-16 
15:44:59 UTC (rev 55146)
+++ branches/new-installer/phase3/skins/common/config.css       2009-08-16 
17:14:30 UTC (rev 55147)
@@ -145,7 +145,7 @@
        height: 54em; 
 }
 
-.config-buglink a {
+.config-plainlink a {
        background: none !important;
        padding: 0 !important;
 }
\ No newline at end of file



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to