MaxSem has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/372903 )
Change subject: Specify page being created as a URL parameter
......................................................................
Specify page being created as a URL parameter
We decided that doing so would make pageview analysis easier.
Bug: T173766
Change-Id: Ib632f87f98586e937f504630bf9856ad5d352583
---
M includes/Hooks.php
M includes/SpecialCreatePage.php
2 files changed, 3 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleCreationWorkflow
refs/changes/03/372903/1
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 011ab5f..859a973 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -27,9 +27,9 @@
if ( $workflow->shouldInterceptEditPage( $editPage ) ) {
$title = $editPage->getTitle();
- $redirTo = SpecialPage::getTitleFor( 'CreatePage',
$title->getPrefixedText() );
+ $redirTo = SpecialPage::getTitleFor( 'CreatePage' );
$output = $editPage->getContext()->getOutput();
- $output->redirect( $redirTo->getFullURL() );
+ $output->redirect( $redirTo->getFullURL( [ 'page' =>
$title->getPrefixedText() ] ) );
return false;
}
diff --git a/includes/SpecialCreatePage.php b/includes/SpecialCreatePage.php
index 5d28acb..bc48154 100644
--- a/includes/SpecialCreatePage.php
+++ b/includes/SpecialCreatePage.php
@@ -36,7 +36,7 @@
->makeConfig( 'ArticleCreationWorkflow' );
$workflow = new Workflow( $config );
- $destTitle = Title::newFromText( $subPage );
+ $destTitle = Title::newFromText( $this->getRequest()->getText(
'page' ) );
$destTitleText = $destTitle ? $destTitle->getPrefixedText() :
'';
$landingPageMessage = $workflow->getLandingPageMessage();
--
To view, visit https://gerrit.wikimedia.org/r/372903
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib632f87f98586e937f504630bf9856ad5d352583
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleCreationWorkflow
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits