Jdlrobson has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/389790 )
Change subject: Do not try to add edit links to the HTML in contexts without a
Title
......................................................................
Do not try to add edit links to the HTML in contexts without a Title
Bug: T179833
Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24
---
M includes/skins/SkinMinerva.php
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue
refs/changes/90/389790/1
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 6a4a25d..42a623a 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -188,6 +188,9 @@
* or <code>$wgMinervaAlwaysShowLanguageButton</code>
* is truthy.
*
+ * Expects getTitle to return a Title object. It should not be used in
contexts where
+ * Title is null.
+ *
* @param string $action
* @return bool
*/
@@ -223,7 +226,9 @@
* @return string
*/
public function doEditSectionLink( Title $nt, $section, $tooltip =
null, $lang = false ) {
- if ( $this->isAllowedPageAction( 'edit' ) ) {
+ // Title may be null in some contexts e.g. job queues. In these
contexts we do not want
+ // to embed an edit section link as there is no page (no Title)
to edit. (T179833)
+ if ( $nt && $this->isAllowedPageAction( 'edit' ) ) {
$lang = wfGetLangObj( $lang );
$message = $this->msg( 'mobile-frontend-editor-edit'
)->inLanguage( $lang )->text();
$html = Html::openElement( 'span' );
--
To view, visit https://gerrit.wikimedia.org/r/389790
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits