Fix special page for use with namespaces.

This commit is contained in:
Daniel Kraus
2017-08-31 21:13:58 +02:00
parent 4c67935491
commit 85e09b8f5d

View File

@ -97,7 +97,7 @@ class Special extends \SpecialPage {
*/ */
private function process( \WebRequest &$request, \OutputPage &$output) { private function process( \WebRequest &$request, \OutputPage &$output) {
// get our Namespaces // get our Namespaces
$namespacesClause = str_replace( '_', ' ','(' . implode( ', ',$this->config->namespaces ) . ')' ); $namespacesClause = str_replace( '_', ' ','(' . implode( ', ',$this->config->sourceNamespaces ) . ')' );
// Start the stopwatch // Start the stopwatch
$startTime = microtime( true ); $startTime = microtime( true );
@ -120,7 +120,7 @@ class Special extends \SpecialPage {
else else
{ {
// No end index was given. Therefore, count pages now. // No end index was given. Therefore, count pages now.
$end = $this->countPages($dbr, $namespacesClause ); $end = $this->countPages( $dbr, $namespacesClause );
}; };
array_key_exists( 'r', $postValues ) ? $reloads = $postValues['r'] : $reloads = 0; array_key_exists( 'r', $postValues ) ? $reloads = $postValues['r'] : $reloads = 0;
@ -180,9 +180,7 @@ class Special extends \SpecialPage {
// TODO: Put the page contents in messages in the i18n file. // TODO: Put the page contents in messages in the i18n file.
$output->addWikiText( $output->addWikiText(
<<<EOF <<<EOF
LinkTitles extension: http://www.mediawiki.org/wiki/Extension:LinkTitles LinkTitles extension: https://github.com/bovender/LinkTitles
Source code: http://github.com/bovender/LinkTitles
== Batch Linking == == Batch Linking ==
You can start a batch linking process by clicking on the button below. You can start a batch linking process by clicking on the button below.
@ -216,7 +214,7 @@ EOF
$output->addWikiText( $output->addWikiText(
<<<EOF <<<EOF
== Processing pages... == == Processing pages... ==
The [http://www.mediawiki.org/wiki/Extension:LinkTitles LinkTitles] The [https://github.com/bovender/LinkTitles LinkTitles]
extension is currently going through every page of your wiki, adding links to extension is currently going through every page of your wiki, adding links to
existing pages as appropriate. existing pages as appropriate.