[MediaWiki-commits] [Gerrit] Set page title when we take over action=edit - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Set page title when we take over action=edit .. Set page title when we take over action=edit Bug: T125670 Change-Id: If2ac6457ba82fbd046649afb1e24eab3232c5d85 --- M VisualEditor.hooks.php 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, but someone else must approve Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index cbdbb0c..268771b 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -154,12 +154,17 @@ // Known-good parameters: edit, veaction, section, vesection, veswitched if ( !$ret ) { + $out = $article->getContext()->getOutput(); + $params['venoscript'] = '1'; $url = htmlspecialchars( wfScript() . '?' . wfArrayToCgi( $params ) ); - $article->getContext()->getOutput()->addHeadItem( + $out->addHeadItem( 've-noscript-fallback', "" ); + + $titleMsg = $title->exists() ? 'editing' : 'creating'; + $out->setPageTitle( wfMessage( $titleMsg, $title->getPrefixedText() ) ); } return $ret; } -- To view, visit https://gerrit.wikimedia.org/r/268610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2ac6457ba82fbd046649afb1e24eab3232c5d85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex MonkGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set page title when we take over action=edit - change (mediawiki...VisualEditor)
Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/268610 Change subject: Set page title when we take over action=edit .. Set page title when we take over action=edit Bug: T125670 Change-Id: If2ac6457ba82fbd046649afb1e24eab3232c5d85 --- M VisualEditor.hooks.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/10/268610/1 diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index cbdbb0c..268771b 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -154,12 +154,17 @@ // Known-good parameters: edit, veaction, section, vesection, veswitched if ( !$ret ) { + $out = $article->getContext()->getOutput(); + $params['venoscript'] = '1'; $url = htmlspecialchars( wfScript() . '?' . wfArrayToCgi( $params ) ); - $article->getContext()->getOutput()->addHeadItem( + $out->addHeadItem( 've-noscript-fallback', "" ); + + $titleMsg = $title->exists() ? 'editing' : 'creating'; + $out->setPageTitle( wfMessage( $titleMsg, $title->getPrefixedText() ) ); } return $ret; } -- To view, visit https://gerrit.wikimedia.org/r/268610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2ac6457ba82fbd046649afb1e24eab3232c5d85 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits