r50155 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50154‎ | r50155 | r50156 >
Date:08:28, 3 May 2009
Author:ialex
Status:deferred
Tags:
Comment:
Interaction beetween Configure and Farmer: Special:Farmer/admin will now link to Special:Configure and Special:Extensions
Modified paths:
  • /trunk/extensions/Configure/CHANGELOG (modified) (history)
  • /trunk/extensions/Configure/Configure.func.php (modified) (history)
  • /trunk/extensions/Configure/Configure.i18n.php (modified) (history)
  • /trunk/extensions/Configure/Configure.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/CHANGELOG
@@ -1,6 +1,10 @@
22 This file lists changes on this extension.
33 Localisation updates are done on betawiki and aren't listed here.
44
 5+0.13.15 - 3 May 2009
 6+ When using Farmer extension, Special:Farmer/admin will now link to
 7+ Special:Configure and Special:Extensions.
 8+
59 0.13.14 - 29 April 2009
610 Changed section for some settings in Special:Configure.
711
Index: trunk/extensions/Configure/Configure.php
@@ -18,7 +18,7 @@
1919 'url' => 'http://www.mediawiki.org/wiki/Extension:Configure',
2020 'description' => 'Allow authorised users to configure the wiki via a web-based interface',
2121 'descriptionmsg' => 'configure-desc',
22 - 'version' => '0.13.14',
 22+ 'version' => '0.13.13',
2323 );
2424
2525 # Configuration part
@@ -210,6 +210,12 @@
211211 # Add custom rights defined in $wgRestrictionLevels
212212 $wgHooks['UserGetAllRights'][] = 'efConfigureGetAllRights';
213213
 214+# For interaction with Extension:Farmer
 215+$wgHooks['FarmerAdminPermissions'][] = 'efConfigureFarmerAdminPermissions';
 216+$wgHooks['FarmerAdminSkin'][] = 'efConfigureFarmerAdminSkin';
 217+$wgHooks['FarmerAdminExtensions'][] = 'efConfigureFarmerAdminExtensions';
 218+$wgHooks['FarmerManageExtensions'][] = 'efConfigureFarmerManageExtensions';
 219+
214220 # Handlers
215221 $wgAutoloadClasses['ConfigureHandler'] = $dir . 'Configure.handler.php';
216222 $wgAutoloadClasses['ConfigureHandlerFiles'] = $dir . 'Configure.handler-files.php';
Index: trunk/extensions/Configure/Configure.i18n.php
@@ -207,6 +207,10 @@
208208 'configure-boolop-description-or' => 'At least one condition must be true',
209209 'configure-boolop-description-xor' => 'Exactly one condition must be true',
210210 'configure-boolop-description-not' => 'No conditions must be true',
 211+
 212+ 'configure-farmer-settings' => 'The settings for this wiki can be configured on [[Special:Configure]].',
 213+ 'configure-farmer-extensions' => 'The extensions used in this wiki can be configured on [[Special:Extensions]].',
 214+ 'configure-farmer-extensions-list' => 'The extensions available for this wiki are listed on [[Special:Extensions]].',
211215 );
212216
213217 /** Message documentation (Message documentation)
Index: trunk/extensions/Configure/Configure.func.php
@@ -114,3 +114,49 @@
115115 $rights = array_unique( array_merge( $rights, $newrights ) );
116116 return true;
117117 }
 118+
 119+/**
 120+ * Display link to Special:Configure
 121+ */
 122+function efConfigureFarmerAdminPermissions( $farmer ) {
 123+ global $wgOut;
 124+
 125+ wfLoadExtensionMessages( 'Configure' );
 126+ $wgOut->wrapWikiMsg( '== $1 ==', 'farmer-basic-permission' );
 127+ $wgOut->addWikiMsg( 'configure-farmer-settings' );
 128+
 129+ return false;
 130+}
 131+
 132+/**
 133+ * Avoid displaying anything :)
 134+ */
 135+function efConfigureFarmerAdminSkin( $farmer ) {
 136+ return false;
 137+}
 138+
 139+/**
 140+ * Display link to Special:Extensions
 141+ */
 142+function efConfigureFarmerAdminExtensions( $farmer ) {
 143+ global $wgOut;
 144+
 145+ wfLoadExtensionMessages( 'Configure' );
 146+ $wgOut->wrapWikiMsg( '== $1 ==', 'farmer-extensions' );
 147+ $wgOut->addWikiMsg( 'configure-farmer-extensions' );
 148+
 149+ return false;
 150+}
 151+
 152+/**
 153+ * Display link to Special:Extensions
 154+ */
 155+function efConfigureFarmerManageExtensions( $farmer ) {
 156+ global $wgOut;
 157+
 158+ wfLoadExtensionMessages( 'Configure' );
 159+ $wgOut->wrapWikiMsg( '== $1 ==', 'farmer-extensions-available' );
 160+ $wgOut->addWikiMsg( 'configure-farmer-extensions-list' );
 161+
 162+ return false;
 163+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r50159Fix for r50155: increment the version rather than decrementing it :)ialex18:25, 3 May 2009

Status & tagging log