mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 09:49:31 +02:00
Fix special page for use with namespaces.
This commit is contained in:
@ -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.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user