r37831 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37830‎ | r37831 | r37832 >
Date:18:23, 18 July 2008
Author:ialex
Status:old
Tags:
Comment:
* maintenance scripts now use MW_INSTALL_PATH env variable to locate the wiki
* findSettings.php was broken since 0.6.0, now fixed
* Renamed $wgDefaultDirectoryChmod to $wgDirectoryMode
Modified paths:
  • /trunk/extensions/Configure/CHANGELOG (modified) (history)
  • /trunk/extensions/Configure/Configure.php (modified) (history)
  • /trunk/extensions/Configure/Configure.settings-core.php (modified) (history)
  • /trunk/extensions/Configure/findSettings.php (modified) (history)
  • /trunk/extensions/Configure/manage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/findSettings.php
@@ -11,9 +11,10 @@
1212 * @license GPLv2 or higher
1313 */
1414
15 -$dir = dirname( __FILE__ );
16 -$IP = "$dir/../..";
17 -@include( "$dir/../CorePath.php" ); // Allow override
 15+$IP = getenv( 'MW_INSTALL_PATH' );
 16+if( $IP === false )
 17+ $IP = dirname( __FILE__ ). '/../..';
 18+
1819 require_once( "$IP/maintenance/commandLine.inc" );
1920
2021 # Functions
@@ -58,7 +59,7 @@
5960 preg_match_all( '/\[\[[Mm]anual:\$(wg[A-Za-z0-9]+)\|/', $cont, $m );
6061 $allSettings = array_unique( $m[1] );
6162 } else {
62 - $allSettings = array_keys( ConfigurationSettings::getAllSettings( CONF_SETTINGS_CORE ) );
 63+ $allSettings = array_keys( ConfigurationSettings::singleton( CONF_SETTINGS_CORE )->getAllSettings() );
6364 }
6465
6566 // Now we'll need to open DefaultSettings.php
@@ -71,7 +72,7 @@
7273 $remain = array_diff( $allSettings, $definedSettings );
7374 $obsolete = array();
7475 foreach( $remain as $setting ){
75 - if( ConfigurationSettings::isSettingAvailable( CONF_SETTINGS_CORE, $setting ) )
 76+ if( ConfigurationSettings::singleton( CONF_SETTINGS_CORE )->isSettingAvailable( $setting ) )
7677 $obsolete[] = $setting;
7778 }
7879
Index: trunk/extensions/Configure/CHANGELOG
@@ -1,9 +1,14 @@
22 This file lists changes on this extension.
33 Localisation updates are done on betawiki and aren't listed here.
44
 5+0.6.2 - 18 July 2008
 6+ * maintenance scripts now use MW_INSTALL_PATH env variable to locate the wiki.
 7+ * findSettings.php was broken since 0.6.0, now fixed.
 8+ * Renamed $wgDefaultDirectoryChmod to $wgDirectoryMode.
 9+
510 0.6.1 - 17 July 2008
6 - * Added $wgDefaultDirectoryChmod and $wgDiff
7 - * Fixed array type of $wgContentNamespaces
 11+ * Added $wgDefaultDirectoryChmod and $wgDiff
 12+ * Fixed array type of $wgContentNamespaces
813
914 0.6.0 - 16 July 2008
1015 Added following settings to configure Configure itself:
Index: trunk/extensions/Configure/Configure.settings-core.php
@@ -21,7 +21,7 @@
2222 'wgActionPaths' => 'array',
2323 'wgAppleTouchIcon' => 'text',
2424 'wgArticlePath' => 'text',
25 - 'wgDefaultDirectoryChmod' => 'int',
 25+ 'wgDirectoryMode' => 'int',
2626 'wgDiff' => 'text',
2727 'wgDiff3' => 'text',
2828 'wgFavicon' => 'text',
@@ -821,7 +821,7 @@
822822 'wgActionPaths',
823823 'wgAppleTouchIcon',
824824 'wgArticlePath',
825 - 'wgDefaultDirectoryChmod',
 825+ 'wgDirectoryMode',
826826 'wgDiff',
827827 'wgDiff3',
828828 'wgFavicon',
@@ -1120,7 +1120,7 @@
11211121 'wgRC2UDPOmitBots' => array( array( '1.13alpha', '>=' ) ),
11221122 'wgExtensionAliasesFiles' => array( array( '1.13alpha', '>=' ) ),
11231123 'wgXMLMimeTypes' => array( array( '1.13alpha', '>=' ) ),
1124 - 'wgDefaultDirectoryChmod' => array( array( '1.13alpha', '>=' ) ),
 1124+ 'wgDirectoryMode' => array( array( '1.13alpha', '>=' ) ),
11251125 'wgDiff' => array( array( '1.13alpha', '>=' ) ),
11261126 ## Obsolete
11271127 'wgProfileSampleRate' => array( array( '1.8alpha', '<' ) ),
Index: trunk/extensions/Configure/Configure.php
@@ -10,6 +10,16 @@
1111 * @author Alexandre Emsenhuber
1212 */
1313
 14+## Adding credit :)
 15+$wgExtensionCredits['specialpage'][] = array(
 16+ 'name' => 'Configure',
 17+ 'author' => 'Alexandre Emsenhuber',
 18+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure',
 19+ 'description' => 'Allow authorised users to configure the wiki by a web-based interface',
 20+ 'descriptionmsg' => 'configure-desc',
 21+ 'version' => '0.6.2',
 22+);
 23+
1424 ## Configuration part
1525
1626 /**
@@ -74,16 +84,6 @@
7585 */
7686 $wgConfigureStyleVersion = '5';
7787
78 -## Adding credit :)
79 -$wgExtensionCredits['specialpage'][] = array(
80 - 'name' => 'Configure',
81 - 'author' => 'Alexandre Emsenhuber',
82 - 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure',
83 - 'description' => 'Allow authorised users to configure the wiki by a web-based interface',
84 - 'descriptionmsg' => 'configure-desc',
85 - 'version' => '0.6.1',
86 -);
87 -
8888 ## Adding new rights...
8989 $wgAvailableRights[] = 'configure';
9090 $wgAvailableRights[] = 'configure-all';
@@ -100,16 +100,16 @@
101101 #$wgGroupPermissions['bureaucrat']['configure-interwiki'] = true;
102102 #$wgGroupPermissions['developer']['configure-all'] = true;
103103
 104+## Rights for Special:Extensions
 105+$wgGroupPermissions['bureaucrat']['extensions'] = true;
 106+#$wgGroupPermissions['bureaucrat']['extensions-interwiki'] = true;
 107+#$wgGroupPermissions['developer']['extensions-all'] = true;
 108+
104109 ## Rights for Special:ViewConfig
105110 $wgGroupPermissions['sysop']['viewconfig'] = true;
106111 #$wgGroupPermissions['sysop']['viewconfig-interwiki'] = true;
107112 #$wgGroupPermissions['developer']['viewconfig-all'] = true;
108113
109 -## Rights for Special:Extensions
110 -$wgGroupPermissions['bureaucrat']['extensions'] = true;
111 -#$wgGroupPermissions['bureaucrat']['extensions-interwiki'] = true;
112 -#$wgGroupPermissions['developer']['extensions-all'] = true;
113 -
114114 $dir = dirname( __FILE__ ) . '/';
115115
116116 ## Define some functions
Index: trunk/extensions/Configure/manage.php
@@ -12,9 +12,10 @@
1313 $optionsWithArgs = array( 'revert', 'delete' );
1414 define( 'EXT_CONFIGURE_NO_EXTRACT', true );
1515
16 -$dir = dirname( __FILE__ );
17 -$IP = "$dir/../..";
18 -@include( "$dir/../CorePath.php" ); // Allow override
 16+$IP = getenv( 'MW_INSTALL_PATH' );
 17+if( $IP === false )
 18+ $IP = dirname( __FILE__ ). '/../..';
 19+
1920 require_once( "$IP/maintenance/commandLine.inc" );
2021
2122 require_once( dirname( __FILE__ ) . "/manage.inc" );

Status & tagging log