Jamesmontalvo3 has uploaded a new change for review. https://gerrit.wikimedia.org/r/142763
Change subject: Make AdminLinks installable via Composer ...................................................................... Make AdminLinks installable via Composer * Update global vars in AdminLinks.php to use $GLOBALS... * Create composer.json * Bump version number in README Change-Id: If64794baf817fbeafa61b04b7a3e89c5d586a16a --- M AdminLinks.php M README A composer.json 3 files changed, 43 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AdminLinks refs/changes/63/142763/1 diff --git a/AdminLinks.php b/AdminLinks.php index 5732500..0a62bb8 100644 --- a/AdminLinks.php +++ b/AdminLinks.php @@ -8,28 +8,28 @@ if ( !defined( 'MEDIAWIKI' ) ) die(); // credits -$wgExtensionCredits['specialpage'][] = array( +$GLOBALS['wgExtensionCredits']['specialpage'][] = array( 'path' => __FILE__, 'name' => 'Admin Links', - 'version' => '0.2', + 'version' => '0.3.0', 'author' => 'Yaron Koren', 'url' => 'https://www.mediawiki.org/wiki/Extension:Admin_Links', 'descriptionmsg' => 'adminlinks-desc', ); -$wgAdminLinksIP = __DIR__ . '/'; -$wgMessagesDirs['AdminLinks'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['AdminLinks'] = $wgAdminLinksIP . 'AdminLinks.i18n.php'; -$wgExtensionMessagesFiles['AdminLinksAlias'] = $wgAdminLinksIP . 'AdminLinks.alias.php'; -$wgSpecialPages['AdminLinks'] = 'AdminLinks'; -$wgSpecialPageGroups['AdminLinks'] = 'users'; -$wgHooks['PersonalUrls'][] = 'AdminLinks::addURLToUserLinks'; -$wgAvailableRights[] = 'adminlinks'; +$GLOBALS['wgAdminLinksIP'] = __DIR__ . '/'; +$GLOBALS['wgMessagesDirs']['AdminLinks'] = __DIR__ . '/i18n'; +$GLOBALS['wgExtensionMessagesFiles']['AdminLinks'] = $GLOBALS['wgAdminLinksIP'] . 'AdminLinks.i18n.php'; +$GLOBALS['wgExtensionMessagesFiles']['AdminLinksAlias'] = $GLOBALS['wgAdminLinksIP'] . 'AdminLinks.alias.php'; +$GLOBALS['wgSpecialPages']['AdminLinks'] = 'AdminLinks'; +$GLOBALS['wgSpecialPageGroups']['AdminLinks'] = 'users'; +$GLOBALS['wgHooks']['PersonalUrls'][] = 'AdminLinks::addURLToUserLinks'; +$GLOBALS['wgAvailableRights'][] = 'adminlinks'; // by default, sysops see the link to this page -$wgGroupPermissions['sysop']['adminlinks'] = true; -$wgAutoloadClasses['AdminLinks'] - = $wgAutoloadClasses['ALTree'] - = $wgAutoloadClasses['ALSection'] - = $wgAutoloadClasses['ALRow'] - = $wgAutoloadClasses['ALItem'] - = $wgAdminLinksIP . 'AdminLinks_body.php'; +$GLOBALS['wgGroupPermissions']['sysop']['adminlinks'] = true; +$GLOBALS['wgAutoloadClasses']['AdminLinks'] + = $GLOBALS['wgAutoloadClasses']['ALTree'] + = $GLOBALS['wgAutoloadClasses']['ALSection'] + = $GLOBALS['wgAutoloadClasses']['ALRow'] + = $GLOBALS['wgAutoloadClasses']['ALItem'] + = $GLOBALS['wgAdminLinksIP'] . 'AdminLinks_body.php'; diff --git a/README b/README index 13696fa..bdb1d8e 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ Admin Links extension - Version 0.2 + Version 0.3 Yaron Koren This is free software licensed under the GNU General Public License. Please diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..c60a3e3 --- /dev/null +++ b/composer.json @@ -0,0 +1,25 @@ +{ + "name": "enterprisemediawiki/admin-links", + "type": "mediawiki-extension", + "description": "A MediaWiki special page holding special convenience links for sysops", + "keywords": [ + "MediaWiki" + ], + "homepage": "https://www.mediawiki.org/wiki/Extension:AdminLinks", + "license": "GPL-2.0+", + "authors": [ + { + "name": "Yaron Koren", + "role": "Author" + } + ], + "support": { + "issues": "https://bugzilla.wikimedia.org/" + }, + "require": { + "composer/installers": ">=1.0.1" + }, + "autoload": { + "files": ["AdminLinks.php"] + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/142763 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If64794baf817fbeafa61b04b7a3e89c5d586a16a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/AdminLinks Gerrit-Branch: master Gerrit-Owner: Jamesmontalvo3 <jamesmontal...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits