jenkins-bot has submitted this change and it was merged.
Change subject: Handle invalid titles on ProtectedPages and ProtectedTitles
......................................................................
Handle invalid titles on ProtectedPages and ProtectedTitles
bug: 46493
Change-Id: Iaa6e3378c185c53b77a4ede0ddfdfed8c6a2268a
(cherry picked from commit 19ecb69fbc2506568edbcf87cff110441bf90813)
---
M includes/specials/SpecialProtectedpages.php
M includes/specials/SpecialProtectedtitles.php
2 files changed, 12 insertions(+), 0 deletions(-)
Approvals:
Siebrand: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specials/SpecialProtectedpages.php
b/includes/specials/SpecialProtectedpages.php
index eb89bec..cdf053e 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -83,6 +83,12 @@
}
$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 6a94deb..0cba5eb 100644
--- a/includes/specials/SpecialProtectedtitles.php
+++ b/includes/specials/SpecialProtectedtitles.php
@@ -81,6 +81,12 @@
}
$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 ();
--
To view, visit https://gerrit.wikimedia.org/r/57936
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa6e3378c185c53b77a4ede0ddfdfed8c6a2268a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: MarkAHershberger <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits