From b0bd1aae89014749f1d03ce805ed74664b02b977 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 5 Jul 2011 16:18:30 +0000 Subject: [PATCH] Override IndexPager::getTitle() in AlphabeticPager instance of core to not rely on $wgTitle --- includes/specials/SpecialCategories.php | 7 +++++-- includes/specials/SpecialListusers.php | 3 +++ includes/specials/SpecialProtectedpages.php | 4 ++++ includes/specials/SpecialProtectedtitles.php | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php index bb5a5e8cc4..8817d7d812 100644 --- a/includes/specials/SpecialCategories.php +++ b/includes/specials/SpecialCategories.php @@ -79,6 +79,10 @@ class CategoryPager extends AlphabeticPager { ); } + function getTitle() { + return SpecialPage::getTitleFor( 'Categories' ); + } + function getIndexField() { # return array( 'abc' => 'cat_title', 'count' => 'cat_pages' ); return 'cat_title'; @@ -124,11 +128,10 @@ class CategoryPager extends AlphabeticPager { public function getStartForm( $from ) { global $wgScript; - $t = SpecialPage::getTitleFor( 'Categories' ); return Xml::tags( 'form', array( 'method' => 'get', 'action' => $wgScript ), - Html::hidden( 'title', $t->getPrefixedText() ) . + Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . Xml::fieldset( wfMsg( 'categories' ), Xml::inputLabel( wfMsg( 'categoriesfrom' ), 'from', 'from', 20, $from ) . diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 8d44576125..b8f42f1170 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -64,6 +64,9 @@ class UsersPager extends AlphabeticPager { parent::__construct(); } + function getTitle() { + return SpecialPage::getTitleFor( 'Listusers' ); + } function getIndexField() { return $this->creationSort ? 'user_id' : 'user_name'; diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 68e58db404..f6decfc579 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -319,6 +319,10 @@ class ProtectedPagesPager extends AlphabeticPager { return ''; } + function getTitle() { + return SpecialPage::getTitleFor( 'Protectedpages' ); + } + function formatRow( $row ) { return $this->mForm->formatRow( $row ); } diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index c768b3e2ba..d75b9c8e86 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -207,6 +207,10 @@ class ProtectedTitlesPager extends AlphabeticPager { return ''; } + function getTitle() { + return SpecialPage::getTitleFor( 'Protectedtitles' ); + } + function formatRow( $row ) { return $this->mForm->formatRow( $row ); } -- 2.20.1