Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/93615
Change subject: Remove Special:Flow specal page
......................................................................
Remove Special:Flow specal page
Change-Id: Ica9de1dbe828df3b27e123d24492c2efcdda624e
---
M Flow.i18n.php
M Flow.php
M includes/Notifications/Controller.php
M includes/ParsoidUtils.php
M includes/UrlGenerator.php
D special/SpecialFlow.php
6 files changed, 8 insertions(+), 74 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/15/93615/1
diff --git a/Flow.i18n.php b/Flow.i18n.php
index fc1b8eb..b3d795f 100644
--- a/Flow.i18n.php
+++ b/Flow.i18n.php
@@ -187,7 +187,7 @@
*/
$messages['qqq'] = array(
'flow-desc' =>
'{{desc|name=Flow|url=http://www.mediawiki.org/wiki/Extension:Flow}}',
- 'flow-specialpage' => 'Used as page title in [[Special:Flow]].
Parameters:
+ 'flow-specialpage' => 'Used as page title in a flow board. Parameters:
* $1 - page title',
'log-name-flow' => '{{doc-logpage}}
Name of the Flow log filter on the [[Special:Log]] page.',
diff --git a/Flow.php b/Flow.php
index b8bf4a7..47c749c 100755
--- a/Flow.php
+++ b/Flow.php
@@ -140,11 +140,6 @@
$wgAutoloadClasses['Flow\Block\TopicBlock'] = $dir .
'includes/Block/Topic.php';
$wgAutoloadClasses['Flow\Block\TopicView'] = $dir . 'includes/Block/Topic.php';
-// Special page for rendering flows
-$wgAutoloadClasses['SpecialFlow'] = $dir . 'special/SpecialFlow.php';
-$wgSpecialPages['Flow'] = 'SpecialFlow';
-$wgSpecialPageGroups['Flow'] = 'unknown';
-
// API modules
$wgAutoloadClasses['ApiQueryFlow'] = "$dir/includes/api/ApiQueryFlow.php";
$wgAutoloadClasses['ApiParsoidUtilsFlow'] =
"$dir/includes/api/ApiParsoidUtilsFlow.php";
diff --git a/includes/Notifications/Controller.php
b/includes/Notifications/Controller.php
index 7ca9da0..6891779 100644
--- a/includes/Notifications/Controller.php
+++ b/includes/Notifications/Controller.php
@@ -275,7 +275,7 @@
protected function getMentionedUsersFromWikitext( $wikitext ) {
global $wgParser;
- $title = \SpecialPage::getTitleFor( 'Flow' ); // Bogus title
used for parser
+ $title = \Title::newMainPage(); // Bogus title used for parser
$options = new \ParserOptions;
$options->setTidy( true );
diff --git a/includes/ParsoidUtils.php b/includes/ParsoidUtils.php
index 280d272..f015847 100644
--- a/includes/ParsoidUtils.php
+++ b/includes/ParsoidUtils.php
@@ -53,7 +53,8 @@
$wgRequest,
array(
'action' => 'visualeditor',
- 'page' => \SpecialPage::getTitleFor( 'Flow'
)->getPrefixedDBkey(),
+ // Bogus title used for parser
+ 'page' =>
\Title::newMainPage()->getPrefixedDBkey(),
// 'basetimestamp' => ?,
// 'starttimestamp' => ?,
'paction' => $action,
@@ -92,7 +93,8 @@
global $wgParser;
- $title = \SpecialPage::getTitleFor( 'Flow' );
+ // Bogus title used for parser
+ $title = \Title::newMainPage();
$options = new \ParserOptions;
$options->setTidy( true );
diff --git a/includes/UrlGenerator.php b/includes/UrlGenerator.php
index 2295650..eca18c8 100644
--- a/includes/UrlGenerator.php
+++ b/includes/UrlGenerator.php
@@ -41,12 +41,7 @@
*/
public function buildUrlData( $title, $action = 'view', array $query =
array() ) {
$query['action'] = $action;
-
- $linkTitle = $this->occupationController->isTalkpageOccupied(
$title )
- ? $title
- : SpecialPage::getTitleFor( 'Flow',
$title->getPrefixedText() );
-
- return array( $linkTitle, $query );
+ return array( $title, $query );
}
/**
@@ -83,7 +78,7 @@
// Only way to know what title the workflow points at
$workflow = $this->storage->get( $workflowId );
if ( !$workflow ) {
- return array( SpecialPage::getTitleFor( 'Flow'
), 'missing=true' );
+ throw \MWException( 'Invalid workflow: ' .
$workflowId );
}
}
diff --git a/special/SpecialFlow.php b/special/SpecialFlow.php
deleted file mode 100644
index 6f0bf12..0000000
--- a/special/SpecialFlow.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-use Flow\Model\UUID;
-use Flow\Model\Workflow;
-use Flow\WorkflowLoader;
-
-/**
- * SpecialFlow is intended to bootstrap flow. It sets up the generic parts of
flow that apply
- * to everything, figures out which title/workflow/etc is being requested, and
then passes control
- * off to a controller specifically able to handle that type of workflow.
- */
-
-class SpecialFlow extends SpecialPage {
-
- protected $action;
-
- public function __construct() {
- parent::__construct( 'Flow' );
- }
-
- public function execute( $subPage ) {
- $this->setHeaders();
-
- if ( empty( $subPage ) ) {
- // If no specific article was requested, render the
users flow
- throw new \MWException( 'TODO: Redirect to users
board?' );
- }
-
- $container = Flow\Container::getContainer();
- $request = $this->getRequest();
- $title = $this->loadTitle( $subPage );
- $workflowId = $request->getVal( 'workflow' );
- $action = $request->getVal( 'action', 'view' );
-
- $loader = $container['factory.loader.workflow']
- ->createWorkflowLoader( $title, UUID::create(
$workflowId ) );
-
- $view = new Flow\View(
- $container['templating'],
- $container['url_generator'],
- $this->getContext()
- );
-
- $view->show( $loader, $action );
- }
-
- protected function loadTitle( $text ) {
- $title = Title::newFromText( $text );
- if ( $title === null ) {
- throw new MWException( 'Invalid article requested' );
- }
- if ( $title->mInterwiki ) {
- throw new MWException( 'Interwiki not implemented yet'
);
- }
-
- return $title;
- }
-}
--
To view, visit https://gerrit.wikimedia.org/r/93615
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica9de1dbe828df3b27e123d24492c2efcdda624e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits