Index: branches/preferences-work/extensions/Gadgets/Gadgets.php |
— | — | @@ -121,18 +121,6 @@ |
122 | 122 | return $gadgets; |
123 | 123 | } |
124 | 124 | |
125 | | -function wfGadgetsInitPreferencesForm( $prefs, $request ) { |
126 | | - $gadgets = wfLoadGadgets(); |
127 | | - if ( !$gadgets ) return true; |
128 | | - |
129 | | - foreach ( $gadgets as $gname => $code ) { |
130 | | - $tname = "gadget-$gname"; |
131 | | - $prefs->mToggles[$tname] = $request->getCheck( "wpOp$tname" ) ? 1 : 0; |
132 | | - } |
133 | | - |
134 | | - return true; |
135 | | -} |
136 | | - |
137 | 125 | function wfGadgetsGetPreferences( $user, &$preferences ) { |
138 | 126 | $gadgets = wfLoadGadgetsStructured(); |
139 | 127 | |
— | — | @@ -182,43 +170,6 @@ |
183 | 171 | return true; |
184 | 172 | } |
185 | 173 | |
186 | | -function wfGadgetsRenderPreferencesForm( $prefs, $out ) { |
187 | | - $gadgets = wfLoadGadgetsStructured(); |
188 | | - if ( !$gadgets ) return true; |
189 | | - |
190 | | - wfLoadExtensionMessages( 'Gadgets' ); |
191 | | - |
192 | | - $out->addHTML( "\n<fieldset>\n<legend>" . wfMsgHtml( 'gadgets-prefs' ) . "</legend>\n" ); |
193 | | - |
194 | | - $out->addWikiMsg( 'gadgets-prefstext' ); |
195 | | - |
196 | | - $msgOpt = array( 'parseinline' ); |
197 | | - |
198 | | - foreach ( $gadgets as $section => $entries ) { |
199 | | - if ( $section !== false && $section !== '' ) { |
200 | | - $ttext = wfMsgExt( "gadget-section-$section", $msgOpt ); |
201 | | - $out->addHTML( "\n<h2 id=\"".htmlspecialchars("gadget-section-$section")."\">" . $ttext . "</h2>\n" ); |
202 | | - } |
203 | | - |
204 | | - foreach ( $entries as $gname => $code ) { |
205 | | - $tname = "gadget-$gname"; |
206 | | - $ttext = wfMsgExt( $tname, $msgOpt ); |
207 | | - $checked = @$prefs->mToggles[$tname] == 1 ? ' checked="checked"' : ''; |
208 | | - $disabled = ''; |
209 | | - |
210 | | - # NOTE: No label for checkmarks as this causes the checks to toggle |
211 | | - # when clicking a link in the describing text. |
212 | | - $out->addHTML( "<div class='toggle'><input type='checkbox' value='1' " . |
213 | | - "id=\"$tname\" name=\"wpOp$tname\"$checked$disabled />" . |
214 | | - " <span class='toggletext'><label for='$tname'>$ttext</label></span></div>\n" ); |
215 | | - } |
216 | | - } |
217 | | - |
218 | | - $out->addHTML( "</fieldset>\n\n" ); |
219 | | - |
220 | | - return true; |
221 | | -} |
222 | | - |
223 | 174 | function wfGadgetsBeforePageDisplay( &$out ) { |
224 | 175 | global $wgUser, $wgTitle; |
225 | 176 | if ( !$wgUser->isLoggedIn() ) return true; |