User:Skizzerz/WhereIsExtension

WhereIsExtension patch. Fixes the following:
 * Removes dependency on deprecated ExtensionFunctions.php file
 * Adds special page sorting for mediawiki versions 1.13+
 * Makes the count of wikis using the extension part of the i18n message
 * Adds a message if no wikis are using a particular extension
 * Removes unneeded ?> from ends of files


 * Does not change the group needed to access the page, since I wasn't sure if you wanted it to be sysops and staff or just staff-only

Index: SpecialWhereIsExtension.i18n.php

=
====================================================== --- SpecialWhereIsExtension.i18n.php	(revision 1351) +++ SpecialWhereIsExtension.i18n.php	(working copy) @@ -23,11 +23,11 @@ 	exit(1) ; } -$messages = array( -	'en' => array( -		'whereisextension'			=> 'Where is extension',	//the name displayed on Special:SpecialPages -		'whereisextension-submit'	=> 'Search', -		'whereisextension-list'		=> 'List of wikis with enabled selected extension' -	) -); -?> \ No newline at end of file +$messages = array; + +$messages['en'] = array( +	'whereisextension'			=> 'Where is extension',	//the name displayed on Special:SpecialPages +	'whereisextension-submit'	=> 'Search', +	'whereisextension-list'		=> 'List of wikis with enabled selected extension ($1)', +	'whereisextension-none'		=> 'No wikis have the selected extension enabled' +); \ No newline at end of file Index: SpecialWhereIsExtension.php

=
====================================================== --- SpecialWhereIsExtension.php	(revision 1351) +++ SpecialWhereIsExtension.php	(working copy) @@ -28,8 +28,6 @@ $wgExtensionMessagesFiles['WhereIsExtension'] = dirname(__FILE__). '/SpecialWhereIsExtension.i18n.php'; //Register special page -if (!function_exists('extAddSpecialPage')) { -	require("$IP/extensions/ExtensionFunctions.php"); -} -extAddSpecialPage(dirname(__FILE__) . '/SpecialWhereIsExtension_body.php', 'WhereIsExtension', 'WhereIsExtension'); -?> \ No newline at end of file +$wgSpecialPages['WhereIsExtension'] = 'WhereIsExtension'; +$wgAutoloadClasses['WhereIsExtension'] = dirname(__FILE__). '/SpecialWhereIsExtension_body.php'; +$wgSpecialPageGroups['WhereIsExtension'] = 'wiki'; \ No newline at end of file Index: SpecialWhereIsExtension_body.php

=
====================================================== --- SpecialWhereIsExtension_body.php	(revision 1351) +++ SpecialWhereIsExtension_body.php	(working copy) @@ -113,5 +113,4 @@ 		return $aWikis; } -} -?> \ No newline at end of file +} \ No newline at end of file Index: templates/list.tmpl.php

=
====================================================== --- templates/list.tmpl.php	(revision 1351) +++ templates/list.tmpl.php	(working copy) @@ -22,7 +22,7 @@ 	$cnt = count($formData['wikis']); if (!empty($formData['wikis']) && $cnt) { ?> -		<?= wfMsg('whereisextension-list') ?> (<?= $cnt ?>) +		<?= wfMsg('whereisextension-list', $cnt) ?>   $wikiUrl) { @@ -33,6 +33,10 @@ 		?> 		  +		<?= wfMsg('whereisextension-none') ?> +		