Index: trunk/phase3/skins/common/config.css |
— | — | @@ -133,9 +133,6 @@ |
134 | 134 | padding: 0 !important; |
135 | 135 | } |
136 | 136 | |
137 | | -#config-memcachewrapper { |
138 | | - display: none; |
139 | | -} |
140 | 137 | .config-download-link { |
141 | 138 | font-size: 1.8em; |
142 | 139 | margin-left: 2em; |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -920,6 +920,15 @@ |
921 | 921 | } |
922 | 922 | $caches[] = 'memcached'; |
923 | 923 | |
| 924 | + // We'll hide/show this on demand when the value changes, see config.js. |
| 925 | + $cacheval = $this->getVar( 'wgMainCacheType' ); |
| 926 | + if (!$cacheval) { |
| 927 | + // We need to set a default here; but don't hardcode it |
| 928 | + // or we lose it every time we reload the page for validation |
| 929 | + // or going back! |
| 930 | + $cacheval = 'none'; |
| 931 | + } |
| 932 | + $hidden = ($cacheval == 'memcached') ? '' : 'display: none'; |
924 | 933 | $this->addHTML( |
925 | 934 | # Advanced settings |
926 | 935 | $this->getFieldSetStart( 'config-advanced-settings' ) . |
— | — | @@ -929,10 +938,10 @@ |
930 | 939 | 'label' => 'config-cache-options', |
931 | 940 | 'itemLabelPrefix' => 'config-cache-', |
932 | 941 | 'values' => $caches, |
933 | | - 'value' => 'none', |
| 942 | + 'value' => $cacheval, |
934 | 943 | ) ) . |
935 | 944 | $this->parent->getHelpBox( 'config-cache-help' ) . |
936 | | - '<div id="config-memcachewrapper">' . |
| 945 | + "<div id=\"config-memcachewrapper\" style=\"$hidden\">" . |
937 | 946 | $this->parent->getTextArea( array( |
938 | 947 | 'var' => '_MemCachedServers', |
939 | 948 | 'label' => 'config-memcached-servers', |