From: umherirrender Date: Wed, 27 Mar 2013 11:30:14 +0000 (+0100) Subject: Handle invalid titles on ProtectedPages and ProtectedTitles X-Git-Tag: 1.31.0-rc.0~20209 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=19ecb69f;p=lhc%2Fweb%2Fwiklou.git Handle invalid titles on ProtectedPages and ProtectedTitles bug: 46493 Change-Id: Iaa6e3378c185c53b77a4ede0ddfdfed8c6a2268a --- diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 9ddce0c6ea..bc4f3bb101 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -83,6 +83,12 @@ class SpecialProtectedpages extends SpecialPage { } $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); + if( !$title ) { + return Html::rawElement( 'li', array(), + Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), + Linker::getInvalidTitleDescription( $this->getContext(), $row->page_namespace, $row->page_title ) ) ) . "\n"; + } + $link = Linker::link( $title ); $description_items = array (); diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 8548a7b507..a9d9cfff10 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -81,6 +81,12 @@ class SpecialProtectedtitles extends SpecialPage { } $title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title ); + if( !$title ) { + return Html::rawElement( 'li', array(), + Html::element( 'span', array( 'class' => 'mw-invalidtitle' ), + Linker::getInvalidTitleDescription( $this->getContext(), $row->pt_namespace, $row->pt_title ) ) ) . "\n"; + } + $link = Linker::link( $title ); $description_items = array ();