r49687 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49686‎ | r49687 | r49688 >
Date:06:10, 21 April 2009
Author:werdna
Status:deferred
Tags:
Comment:
Remove some orphaned functions
Modified paths:
  • /branches/preferences-work/extensions/Gadgets/Gadgets.php (modified) (history)

Diff [purge]

Index: branches/preferences-work/extensions/Gadgets/Gadgets.php
@@ -121,18 +121,6 @@
122122 return $gadgets;
123123 }
124124
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 -
137125 function wfGadgetsGetPreferences( $user, &$preferences ) {
138126 $gadgets = wfLoadGadgetsStructured();
139127
@@ -182,43 +170,6 @@
183171 return true;
184172 }
185173
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 -
223174 function wfGadgetsBeforePageDisplay( &$out ) {
224175 global $wgUser, $wgTitle;
225176 if ( !$wgUser->isLoggedIn() ) return true;

Status & tagging log