r43976 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43975‎ | r43976 | r43977 >
Date:12:12, 26 November 2008
Author:ialex
Status:ok
Tags:
Comment:
* Set $wgConfigureEditableSettings to an empty array by default
* Fix XHTML error on Special:Configure
Modified paths:
  • /trunk/extensions/Configure/Configure.page.php (modified) (history)
  • /trunk/extensions/Configure/Configure.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.page.php
@@ -341,9 +341,9 @@
342342 $skin = $wgUser->getSkin();
343343 $title = $this->getTitle();
344344 $prev = null;
345 -
 345+
346346 ksort($versions); ## Put in ascending order for now.
347 -
 347+
348348 foreach ( $versions as $ts => $data ) {
349349 if ( $count > 10 ) {
350350 break;
@@ -374,7 +374,7 @@
375375 $links[] = $text;
376376 }
377377 }
378 -
 378+
379379 ## Reset into descending order
380380 $links = array_reverse( $links );
381381
@@ -760,15 +760,14 @@
761761 * Like before but only for the header
762762 *
763763 * @param $msg String: name of the message to display
764 - * @param $close Bool: whether to close a table before the header
765764 * @return String xhtml fragment
766765 */
767 - protected function buildTableHeading( $msg, $close = true ) {
 766+ protected function buildTableHeading( $msg ) {
768767 $msgName = 'configure-section-' . $msg;
769768 $msgVal = wfMsgExt( $msgName, array( 'parseinline' ) );
770769 if ( wfEmptyMsg( $msgName, $msgVal ) )
771770 $msgVal = $msg;
772 - return ( $close ? '</table>' : '' ) . "\n<h2>" . $msgVal . "</h2>\n<table class=\"configure-table\">\n";
 771+ return "\n<h2>" . $msgVal . "</h2>\n<table class=\"configure-table\">\n";
773772 }
774773
775774 /**
@@ -1190,13 +1189,13 @@
11911190 }
11921191 }
11931192
1194 - if ($thisGroup) {
1195 - $thisSection .= $this->buildTableHeading( $group, !$first ) . $thisGroup . Xml::closeElement( 'table' );
 1193+ if ( $thisGroup ) {
 1194+ $thisSection .= $this->buildTableHeading( $group ) . $thisGroup . Xml::closeElement( 'table' );
11961195 $first = false;
11971196 }
11981197 }
11991198
1200 - if ($thisSection) {
 1199+ if ( $thisSection ) {
12011200 $thisSection = Xml::tags( 'legend', null, wfMsgExt( "configure-section-$title", array( 'parseinline' ) ) ) . $thisSection;
12021201 $ret .= Xml::tags( 'fieldset', null, $thisSection );
12031202 }
Index: trunk/extensions/Configure/Configure.php
@@ -107,18 +107,21 @@
108108 $wgConfigureNotEditableSettings = array();
109109
110110 /**
111 - * Editable settings
 111+ * Editable settings. If this is a non-empty array, only the settings in this
 112+ * array will be allowed to be modified.
112113 */
113 - # Suggested configuration:
114 -$wgConfigureEditableSettings = array(
115 - 'wgSitename', 'wgLogo', 'wgContentNamespaces', 'wgMetaNamespace', 'wgMetaNamespaceTalk',
116 - 'wgNamespaceAliases', 'wgNamespaceProtection', 'wgNamespaceRobotPolicies', 'wgNamespacesToBeSearchedDefault',
117 - 'wgNamespacesToBeSearchedProject', 'wgNamespacesWithSubpages', 'wgNoFollowNsExceptions', 'wgNonincludableNamespaces',
118 - 'wgSitemapNamespaces', 'wgAutopromote', 'wgGroupPermissions', 'wgAddGroups', 'wgRemoveGroups', 'wgGroupsAddToSelf',
119 - 'wgGroupsRemoveFromSelf', 'wgArticleRobotPolicies', 'wgCapitalLinks', 'wgDefaultLanguageVariant', 'wgExtraSubtitle',
120 - 'wgImportSources', 'wgRateLimits', 'wgAutoConfirmAge', 'wgAutoConfirmCount', 'wgMaxSigChars'
121 -);
 114+$wgConfigureEditableSettings = array();
122115
 116+# Suggested configuration:
 117+#$wgConfigureEditableSettings = array(
 118+# 'wgSitename', 'wgLogo', 'wgContentNamespaces', 'wgMetaNamespace', 'wgMetaNamespaceTalk',
 119+# 'wgNamespaceAliases', 'wgNamespaceProtection', 'wgNamespaceRobotPolicies', 'wgNamespacesToBeSearchedDefault',
 120+# 'wgNamespacesToBeSearchedProject', 'wgNamespacesWithSubpages', 'wgNoFollowNsExceptions', 'wgNonincludableNamespaces',
 121+# 'wgSitemapNamespaces', 'wgAutopromote', 'wgGroupPermissions', 'wgAddGroups', 'wgRemoveGroups', 'wgGroupsAddToSelf',
 122+# 'wgGroupsRemoveFromSelf', 'wgArticleRobotPolicies', 'wgCapitalLinks', 'wgDefaultLanguageVariant', 'wgExtraSubtitle',
 123+# 'wgImportSources', 'wgRateLimits', 'wgAutoConfirmAge', 'wgAutoConfirmCount', 'wgMaxSigChars'
 124+#);
 125+
123126 /**
124127 * Whether to use the API module
125128 */

Status & tagging log