mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 17:59:29 +02:00
Remove superfluous variable; comment code.
This commit is contained in:
@ -28,9 +28,10 @@
|
|||||||
error_log(print_r($var, TRUE) . "\n", 3, 'php://stderr');
|
error_log(print_r($var, TRUE) . "\n", 3, 'php://stderr');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Main function of the extensions. Sets up parser hooks and performs the
|
||||||
|
/// actual parsing.
|
||||||
|
/// TODO: Use the current PageContentSave hook rather than the deprecated ArticleSave hook.
|
||||||
class LinkTitles {
|
class LinkTitles {
|
||||||
static $targetTitleText;
|
|
||||||
|
|
||||||
/// Setup function, hooks the extension's functions to MediaWiki events.
|
/// Setup function, hooks the extension's functions to MediaWiki events.
|
||||||
public static function setup() {
|
public static function setup() {
|
||||||
global $wgLinkTitlesParseOnEdit;
|
global $wgLinkTitlesParseOnEdit;
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
die( 'Not an entry point.' );
|
die( 'Not an entry point.' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Provides a special page that can be used to batch-process all pages in
|
||||||
|
/// the wiki. By default, this can only be performed by sysops.
|
||||||
class SpecialLinkTitles extends SpecialPage {
|
class SpecialLinkTitles extends SpecialPage {
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
@ -33,6 +35,8 @@ class SpecialLinkTitles extends SpecialPage {
|
|||||||
parent::__construct('LinkTitles', 'linktitles-batch');
|
parent::__construct('LinkTitles', 'linktitles-batch');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Entry function of the special page class. Will abort if the user does
|
||||||
|
/// not have appropriate permissions ('linktitles-batch').
|
||||||
function execute($par) {
|
function execute($par) {
|
||||||
// Prevent non-authorized users from executing the batch processing.
|
// Prevent non-authorized users from executing the batch processing.
|
||||||
if ( !$this->userCanExecute( $this->getUser() ) ) {
|
if ( !$this->userCanExecute( $this->getUser() ) ) {
|
||||||
|
Reference in New Issue
Block a user