From: Brion Vibber Date: Thu, 22 Sep 2011 00:35:55 +0000 (+0000) Subject: * (bug 30041) Fix installer cache selection field to keep the selected radio button... X-Git-Tag: 1.31.0-rc.0~27492 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=2767e134f4602c3e27fe229a42578a4d19d93999;p=lhc%2Fweb%2Fwiklou.git * (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 --- diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 31326062fb..caf4fd6fb2 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -920,6 +920,15 @@ class WebInstaller_Options extends WebInstallerPage { } $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 @@ class WebInstaller_Options extends WebInstallerPage { 'label' => 'config-cache-options', 'itemLabelPrefix' => 'config-cache-', 'values' => $caches, - 'value' => 'none', + 'value' => $cacheval, ) ) . $this->parent->getHelpBox( 'config-cache-help' ) . - '
' . + "
" . $this->parent->getTextArea( array( 'var' => '_MemCachedServers', 'label' => 'config-memcached-servers', diff --git a/skins/common/config.css b/skins/common/config.css index 434f27d56f..aa982d3237 100644 --- a/skins/common/config.css +++ b/skins/common/config.css @@ -133,9 +133,6 @@ padding: 0 !important; } -#config-memcachewrapper { - display: none; -} .config-download-link { font-size: 1.8em; margin-left: 2em;