/usr/share/mediawiki-extensions/base/Renameuser/SpecialRenameuser.php is in mediawiki-extensions-base 2.5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | <?php
if (!defined('MEDIAWIKI')) die();
/**
* A Special Page extension to rename users, runnable by users with renameuser
* righs
*
* @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
*/
$wgAvailableRights[] = 'renameuser';
$wgGroupPermissions['bureaucrat']['renameuser'] = true;
$wgExtensionCredits['specialpage'][] = array(
'name' => 'Renameuser',
'author' => array( 'Ævar Arnfjörð Bjarmason', 'Aaron Schulz' ),
'url' => 'http://www.mediawiki.org/wiki/Extension:Renameuser',
'description' => 'Rename a user (need \'\'renameuser\'\' right)',
'descriptionmsg' => 'renameuser-desc',
'svn-date' => '$LastChangedDate: 2008-11-30 04:15:22 +0100 (Sun, 30 Nov 2008) $',
'svn-revision' => '$Rev: 44056 $',
);
# Internationalisation file
$dir = dirname(__FILE__) . '/';
$wgExtensionMessagesFiles['Renameuser'] = $dir . 'SpecialRenameuser.i18n.php';
$wgExtensionAliasesFiles['Renameuser'] = $dir . 'SpecialRenameuser.alias.php';
/**
* The maximum number of edits a user can have and still be allowed renaming,
* set it to 0 to disable the limit.
*/
define( 'RENAMEUSER_CONTRIBLIMIT', 2000000 );
define( 'RENAMEUSER_CONTRIBJOB', 10000 );
# Add a new log type
global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions;
$wgLogTypes[] = 'renameuser';
$wgLogNames['renameuser'] = 'renameuserlogpage';
$wgLogHeaders['renameuser'] = 'renameuserlogpagetext';
#$wgLogActions['renameuser/renameuser'] = 'renameuserlogentry';
$wgLogActionsHandlers['renameuser/renameuser'] = 'wfRenameUserLogActionText'; // deal with old breakage
function wfRenameUserLogActionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false ) {
if( !$title || $title->getNamespace() !== NS_USER ) {
$rv = ''; // handled in comment, the old way
} else {
$titleLink = $skin ?
$skin->makeLinkObj( $title, htmlspecialchars( $title->getPrefixedText() ) ) : $title->getText();
# Add title to params
array_unshift( $params, $titleLink );
$rv = wfMsgReal( 'renameuserlogentry', $params );
}
return $rv;
}
$wgAutoloadClasses['SpecialRenameuser'] = dirname( __FILE__ ) . '/SpecialRenameuser_body.php';
$wgAutoloadClasses['RenameUserJob'] = dirname(__FILE__) . '/RenameUserJob.php';
$wgSpecialPages['Renameuser'] = 'SpecialRenameuser';
$wgSpecialPageGroups['Renameuser'] = 'users';
$wgJobClasses['renameUser'] = 'RenameUserJob';
|