diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:31:04 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:58:39 +0200 |
commit | f6d65e533c62f6deb21342d4901ece24497b433e (patch) | |
tree | f28adf0362d14bcd448f7b65a7aaf38650f923aa /extensions/Renameuser/Renameuser.php | |
parent | c27b2e832fe25651ef2410fae85b41072aae7519 (diff) |
Update to MediaWiki 1.25.1
Diffstat (limited to 'extensions/Renameuser/Renameuser.php')
-rw-r--r-- | extensions/Renameuser/Renameuser.php | 64 |
1 files changed, 13 insertions, 51 deletions
diff --git a/extensions/Renameuser/Renameuser.php b/extensions/Renameuser/Renameuser.php index d6832eb9..441b5712 100644 --- a/extensions/Renameuser/Renameuser.php +++ b/extensions/Renameuser/Renameuser.php @@ -1,53 +1,15 @@ <?php -if ( !defined( 'MEDIAWIKI' ) ) die(); -/** - * A Special Page extension to rename users, runnable by users with renameuser - * rights - * - * @file - * @ingroup 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( - 'path' => __FILE__, - 'name' => 'Renameuser', - 'author' => array( 'Ævar Arnfjörð Bjarmason', 'Aaron Schulz' ), - 'url' => 'https://www.mediawiki.org/wiki/Extension:Renameuser', - 'descriptionmsg' => 'renameuser-desc', -); - -# Internationalisation files -$wgMessagesDirs['Renameuser'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['Renameuser'] = __DIR__ . '/Renameuser.i18n.php'; -$wgExtensionMessagesFiles['RenameuserAliases'] = __DIR__ . '/Renameuser.alias.php'; - -/** - * Users with more than this number of edits will have their rename operation - * deferred via the job queue. - */ -define( 'RENAMEUSER_CONTRIBJOB', 5000 ); - -# Add a new log type -$wgLogTypes[] = 'renameuser'; -$wgLogActionsHandlers['renameuser/renameuser'] = 'RenameuserLogFormatter'; - -$wgAutoloadClasses['RenameuserHooks'] = __DIR__ . '/Renameuser.hooks.php'; -$wgAutoloadClasses['RenameUserJob'] = __DIR__ . '/RenameUserJob.php'; -$wgAutoloadClasses['RenameuserLogFormatter'] = __DIR__ . '/RenameuserLogFormatter.php'; -$wgAutoloadClasses['RenameuserSQL'] = __DIR__ . '/RenameuserSQL.php'; -$wgAutoloadClasses['SpecialRenameuser'] = __DIR__ . '/specials/SpecialRenameuser.php'; - -$wgSpecialPages['Renameuser'] = 'SpecialRenameuser'; -$wgSpecialPageGroups['Renameuser'] = 'users'; -$wgJobClasses['renameUser'] = 'RenameUserJob'; - -$wgHooks['ShowMissingArticle'][] = 'RenameuserHooks::onShowMissingArticle'; -$wgHooks['ContributionsToolLinks'][] = 'RenameuserHooks::onContributionsToolLinks'; -$wgHooks['GetLogTypesOnUser'][] = 'RenameuserHooks::onGetLogTypesOnUser'; +if ( function_exists( 'wfLoadExtension' ) ) { + wfLoadExtension( 'Renameuser' ); + // Keep i18n globals so mergeMessageFileList.php doesn't break + $wgMessagesDirs['Renameuser'] = __DIR__ . '/i18n'; + $wgExtensionMessagesFiles['RenameuserAliases'] = __DIR__ . '/Renameuser.alias.php'; + /* wfWarn( + 'Deprecated PHP entry point used for Renameuser extension. Please use wfLoadExtension instead, ' . + 'see https://www.mediawiki.org/wiki/Extension_registration for more details.' + ); */ + return true; +} else { + die( 'This version of the Renameuser extension requires MediaWiki 1.25+' ); +} |