http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97774
Revision: 97774
Author: brion
Date: 2011-09-22 00:35:55 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
* (bug 30041) Fix installer cache selection field to keep the selected radio
button, initialize the memcached server fold-out correctly when coming back to
the page
Modified Paths:
--------------
trunk/phase3/includes/installer/WebInstallerPage.php
trunk/phase3/skins/common/config.css
Modified: trunk/phase3/includes/installer/WebInstallerPage.php
===================================================================
--- trunk/phase3/includes/installer/WebInstallerPage.php 2011-09-22
00:14:40 UTC (rev 97773)
+++ trunk/phase3/includes/installer/WebInstallerPage.php 2011-09-22
00:35:55 UTC (rev 97774)
@@ -920,6 +920,15 @@
}
$caches[] = 'memcached';
+ // We'll hide/show this on demand when the value changes, see
config.js.
+ $cacheval = $this->getVar( 'wgMainCacheType' );
+ if (!$cacheval) {
+ // We need to set a default here; but don't hardcode it
+ // or we lose it every time we reload the page for
validation
+ // or going back!
+ $cacheval = 'none';
+ }
+ $hidden = ($cacheval == 'memcached') ? '' : 'display: none';
$this->addHTML(
# Advanced settings
$this->getFieldSetStart( 'config-advanced-settings' ) .
@@ -929,10 +938,10 @@
'label' => 'config-cache-options',
'itemLabelPrefix' => 'config-cache-',
'values' => $caches,
- 'value' => 'none',
+ 'value' => $cacheval,
) ) .
$this->parent->getHelpBox( 'config-cache-help' ) .
- '<div id="config-memcachewrapper">' .
+ "<div id=\"config-memcachewrapper\" style=\"$hidden\">"
.
$this->parent->getTextArea( array(
'var' => '_MemCachedServers',
'label' => 'config-memcached-servers',
Modified: trunk/phase3/skins/common/config.css
===================================================================
--- trunk/phase3/skins/common/config.css 2011-09-22 00:14:40 UTC (rev
97773)
+++ trunk/phase3/skins/common/config.css 2011-09-22 00:35:55 UTC (rev
97774)
@@ -133,9 +133,6 @@
padding: 0 !important;
}
-#config-memcachewrapper {
- display: none;
-}
.config-download-link {
font-size: 1.8em;
margin-left: 2em;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs