mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Editcount
synced 2024-12-18 02:51:02 +00:00
38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
if (!defined('MEDIAWIKI')) die();
|
|
/**
|
|
* A Special Page extension that displays edit counts.
|
|
*
|
|
* This page can be accessed from Special:Editcount[/user] as well as being
|
|
* included like {{Special:Editcount/user[/namespace]}}
|
|
*
|
|
* @addtogroup Extensions
|
|
*
|
|
* @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
|
|
* @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
|
|
*/
|
|
|
|
$wgExtensionFunctions[] = 'wfSpecialEditcount';
|
|
$wgExtensionCredits['specialpage'][] = array(
|
|
'name' => 'Editcount',
|
|
'author' => 'Ævar Arnfjörð Bjarmason',
|
|
'description' => 'Displays [[Special:Editcount|edit count]] of a user',
|
|
);
|
|
|
|
function wfSpecialEditcount() {
|
|
global $IP, $wgMessageCache;
|
|
|
|
require_once ('SpecialEditcount.i18n.php' );
|
|
foreach( efSpecialEditcountMessages() as $lang => $messages )
|
|
$wgMessageCache->addMessages( $messages, $lang );
|
|
|
|
$GLOBALS['wgAutoloadClasses']['Editcount'] = dirname( __FILE__ ) .
|
|
'/SpecialEditcount_body.php';
|
|
|
|
$GLOBALS['wgSpecialPages']['editcount'] = array( /*class*/ 'Editcount',
|
|
/*name*/ 'Editcount', /* permission */'', /*listed*/ true,
|
|
/*function*/ false, /*file*/ false );
|
|
|
|
}
|