r43986 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43985‎ | r43986 | r43987 >
Date:22:01, 26 November 2008
Author:ialex
Status:ok
Tags:
Comment:
rm useless commented out debugging code :)
Modified paths:
  • /trunk/extensions/Configure/Configure.page.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.page.php
@@ -210,11 +210,11 @@
211211 static $notEditable;
212212 if ( !isset( $notEditable ) ) {
213213 global $wgConfigureNotEditableSettings, $wgConfigureEditableSettings;
214 -
 214+
215215 if ( !count($wgConfigureNotEditableSettings) && count($wgConfigureEditableSettings ) ) {
216216 $wgConfigureNotEditableSettings = array_diff( array_keys( $this->mConfSettings->getAllSettings() ), $wgConfigureEditableSettings );
217217 }
218 -
 218+
219219 $notEditable = array_merge( $this->mConfSettings->getUneditableSettings(),
220220 $wgConfigureNotEditableSettings );
221221 }
@@ -351,7 +351,7 @@
352352 $diffLink = '';
353353 if ($prev)
354354 $diffLink = '(' . $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'ViewConfig' ), wfMsg( 'configure-old-changes' ), "version=$ts&diff=$prev" ) . ')';
355 -
 355+
356356 ## Make user link...
357357 $userLink = '';
358358 if( !$data['userwiki'] || !$data['username'] ) {
@@ -364,15 +364,15 @@
365365 ## Last-ditch
366366 $userLink = $data['username'].'@'.$data['userwiki'];
367367 }
368 -
 368+
369369 $text = wfMsgExt( 'configure-old-summary', array( 'replaceafter', 'parseinline'), array( $link, $userLink, $diffLink ) );
370 -
 370+
371371 $prev = $ts;
372 -
 372+
373373 $links[] = $text;
374374 }
375375 }
376 -
 376+
377377 ## Reset into descending order
378378 $links = array_reverse( $links );
379379 ## Take out the first ten...
@@ -389,7 +389,7 @@
390390 }
391391 $link = SpecialPage::getTitleFor( 'ViewConfig' );
392392 $text .= $skin->makeKnownLinkObj( $link, wfMsgHtml( 'configure-view-all-versions' ) );
393 -
 393+
394394 $text .= '</fieldset>';
395395 return $text;
396396 }
@@ -449,7 +449,7 @@
450450 case 'assoc':
451451 $i = 0;
452452 $arr = array();
453 - while ( isset( $_REQUEST['wp' . $name . '-key-' . $i] ) &&
 453+ while ( isset( $_REQUEST['wp' . $name . '-key-' . $i] ) &&
454454 isset( $_REQUEST['wp' . $name . '-val-' . $i] ) )
455455 {
456456 $key = $_REQUEST['wp' . $name . '-key-' . $i];
@@ -539,7 +539,7 @@
540540 if ( $arrType == 'group-bool' ) {
541541 $encId = Sanitizer::escapeId( $id );
542542 if ( $id != $encId ) {
543 - $val = $wgRequest->getCheck( str_replace( '.', '_', $encId ) ) ||
 543+ $val = $wgRequest->getCheck( str_replace( '.', '_', $encId ) ) ||
544544 $wgRequest->getCheck( $encId ) || $wgRequest->getCheck( $id );
545545 } else {
546546 $val = $wgRequest->getCheck( $id );
@@ -679,7 +679,7 @@
680680 $this->buildOldVersionSelect() . "\n" .
681681 ( $this->mCanEdit ?
682682 $this->getWikiSelectForm() .
683 - Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action,
 683+ Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action,
684684 'id' => 'configure-form' ) ) . "\n" :
685685 Xml::openElement( 'div', array( 'id' => 'configure-form' ) )
686686 ) .
@@ -689,9 +689,9 @@
690690 Xml::openElement( 'div', array( 'id' => 'prefsubmit' ) ) . "\n" .
691691 Xml::openElement( 'div', array() ) . "\n" .
692692 Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n" .
693 - Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpSave',
 693+ Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpSave',
694694 'class' => 'btnSavePrefs', 'value' => wfMsgHtml( 'configure-btn-save' ) ) ) . "\n" .
695 - Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpPreview',
 695+ Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpPreview',
696696 'value' => wfMsgHtml( 'showdiff' ) ) ) . "\n" .
697697 Xml::closeElement( 'div' ) . "\n" .
698698 Xml::closeElement( 'div' ) . "\n" .
@@ -699,7 +699,7 @@
700700 'value' => $wgUser->editToken() ) ) . "\n" .
701701 ( $this->mWiki ? Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'wpWiki',
702702 'value' => $this->mWiki ) ) . "\n" : '' )
703 - : ''
 703+ : ''
704704 ) .
705705 Xml::closeElement( 'div' ) . "\n" .
706706 Xml::closeElement( $this->mCanEdit ? 'form' : 'div' )
@@ -864,24 +864,24 @@
865865 }
866866 if ( $type == 'assoc' ) {
867867 ## See if the key/value has a special description
868 -
 868+
869869 $keydesc = wfMsgExt( "configure-setting-$conf-key", 'parseinline' );
870870 $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' );
871 -
 871+
872872 if (wfEmptyMsg( "configure-setting-$conf-key", $keydesc ))
873873 $keydesc = wfMsgHtml( 'configure-desc-key' );
874874 if (wfEmptyMsg( "configure-setting-$conf-value", $valdesc ))
875875 $valdesc = wfMsgHtml( 'configure-desc-val' );
876 -
 876+
877877 $classes = array('configure-array-table');
878 -
 878+
879879 $classes[] = ($allowed ? 'assoc' : 'assoc disabled');
880880 if (count($default) > 5)
881881 $classes[] = 'configure-biglist';
882 -
 882+
883883 if ( !$allowed )
884884 $classes[] = 'disabled';
885 -
 885+
886886 $text = Xml::openElement( 'table', array( 'class' => ( implode( ' ', $classes ) ),
887887 'id' => $conf ) ) . "\n";
888888 $text .= "<tr><th>{$keydesc}</th><th>{$valdesc}</th></tr>\n";
@@ -974,7 +974,7 @@
975975 global $wgContLang;
976976 $nsdesc = wfMsgHtml( 'configure-desc-ns' );
977977 $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' );
978 -
 978+
979979 if (wfEmptyMsg( "configure-setting-$conf-value", $valdesc ))
980980 $valdesc = wfMsgHtml( 'configure-desc-val' );
981981 $text = "<table class='configure-array-table ns-text configure-biglist'>\n<tr><th>{$nsdesc}</th><th>{$valdesc}</th></tr>\n";
@@ -1001,7 +1001,7 @@
10021002 global $wgContLang;
10031003 $nsdesc = wfMsgHtml( 'configure-desc-ns' );
10041004 $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' );
1005 -
 1005+
10061006 if (wfEmptyMsg( "configure-setting-$conf-value", $valdesc ))
10071007 $valdesc = wfMsgHtml( 'configure-desc-val' );
10081008 $text = "<table class='ns-array configure-biglist configure-array-table'>\n<tr><th>{$nsdesc}</th><th>{$valdesc}</th></tr>\n";
@@ -1022,7 +1022,7 @@
10231023 ( isset( $default[$ns] ) ? implode( "\n", (array)$default[$ns] ) : '' ) .
10241024 Xml::closeElement( 'textarea' ) . "<br/>\n";
10251025 } else {
1026 - $text .= "<pre>" . ( isset( $default[$ns] ) ?
 1026+ $text .= "<pre>" . ( isset( $default[$ns] ) ?
10271027 htmlspecialchars( implode( "\n", (array)$default[$ns] ) ) : '' ) . "\n</pre>";
10281028 }
10291029 $text .= '</td></tr>';
@@ -1047,7 +1047,7 @@
10481048 }
10491049 $groupdesc = wfMsgHtml( 'configure-desc-group' );
10501050 $valdesc = wfMsgExt( "configure-setting-$conf-value", 'parseinline' );
1051 -
 1051+
10521052 if (wfEmptyMsg( "configure-setting-$conf-value", $valdesc ))
10531053 $valdesc = wfMsgHtml( 'configure-desc-val' );
10541054 $encConf = htmlspecialchars( $conf );
@@ -1157,9 +1157,8 @@
11581158 if ( !count( $groups[$name] ) )
11591159 unset( $groups[$name] );
11601160 }
1161 -
 1161+
11621162 $thisSection = '';
1163 - #echo "$title => "; var_dump( $res ); echo "<br/>\n";
11641163 if ( !$res ) {
11651164 if ( !isset( $param['showlink'] ) ) {
11661165 $showlink = true;
@@ -1190,12 +1189,12 @@
11911190 ## Don't even show it.
11921191 }
11931192 }
1194 -
 1193+
11951194 if ( $thisGroup ) {
11961195 $thisSection .= $this->buildTableHeading( $group ) . $thisGroup . Xml::closeElement( 'table' );
11971196 }
11981197 }
1199 -
 1198+
12001199 if ( $thisSection ) {
12011200 $thisSection = Xml::tags( 'legend', null, wfMsgExt( "configure-section-$title", array( 'parseinline' ) ) ) . $thisSection;
12021201 $ret .= Xml::tags( 'fieldset', null, $thisSection );
@@ -1203,7 +1202,6 @@
12041203 }
12051204
12061205 }
1207 - #die;
12081206 return $ret;
12091207 }
12101208 }

Status & tagging log