jenkins-bot has submitted this change and it was merged.

Change subject: Remove Special:Flow special page
......................................................................


Remove Special:Flow special page

Change-Id: Ica9de1dbe828df3b27e123d24492c2efcdda624e
---
M EXECUTION
D Flow.alias.php
M Flow.i18n.php
M Flow.php
M URLS
M container.php
M includes/Notifications/Controller.php
M includes/ParsoidUtils.php
M includes/UrlGenerator.php
M includes/View.php
D special/SpecialFlow.php
11 files changed, 21 insertions(+), 123 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/EXECUTION b/EXECUTION
index 8118afd..01aea8c 100644
--- a/EXECUTION
+++ b/EXECUTION
@@ -3,7 +3,10 @@
 
 == Controller ==
 
-All requests start at Special:Flow.  The code for this special page will:
+TODO: This part is out of date.
+
+Requests are captured by a hook, and an OccupationController determines whether
+or not the request should be handled by Flow.
 
 * Figure out which article title the request is asking for.
 * Figure out which workflow definition is being used against this article title
@@ -24,15 +27,13 @@
 
 === Why? ===
 
-Special:Flow is intended to bootstrap flow.
-
 The controller is intended to orchestrate the block implementation.  
 
 The rendering portion should be seperate from the form handling in 
 
 === What about API calls? ===
 
-Good Question.  Most of what Special:Flow does needs to be accessible from the 
API calls.
+Good Question.  Most UI-accessible actions need to be accessible from the API 
calls.
 
 == Blocks ==
 
diff --git a/Flow.alias.php b/Flow.alias.php
deleted file mode 100644
index 0d1f283..0000000
--- a/Flow.alias.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * Aliases for Flow
- *
- * @file
- * @ingroup Extensions
- */
-// @codingStandardsIgnoreFile
-
-$specialPageAliases = array();
-
-/** English (English) */
-$specialPageAliases['en'] = array(
-       'Flow' => array( 'Flow' ),
-);
-
-/** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
-       'Flow' => array( 'روند' ),
-);
-
-/** Korean (한국어) */
-$specialPageAliases['ko'] = array(
-       'Flow' => array( '플로우' ),
-);
-
-/** Macedonian (македонски) */
-$specialPageAliases['mk'] = array(
-       'Flow' => array( 'Тек' ),
-);
\ No newline at end of file
diff --git a/Flow.i18n.php b/Flow.i18n.php
index fc1b8eb..7959272 100644
--- a/Flow.i18n.php
+++ b/Flow.i18n.php
@@ -9,7 +9,7 @@
  */
 $messages['en'] = array(
        'flow-desc' => 'Workflow management system',
-       'flow-specialpage' => '$1 &ndash; Flow',
+       'flow-page-title' => '$1 &ndash; Flow',
 
        'log-name-flow' => 'Flow activity log',
        'logentry-delete-flow-delete-post' => '$1 {{GENDER:$2|deleted}} a [$4 
comment] on [[$3]]',
@@ -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-page-title' => '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..49cfef4 100755
--- a/Flow.php
+++ b/Flow.php
@@ -32,7 +32,7 @@
 }
 
 // Extension credits that will show up on Special:Version
-$wgExtensionCredits['specialpage'][] = array(
+$wgExtensionCredits['other'][] = array(
        'path' => __FILE__,
        'name' => 'Flow',
        'url' => 'https://www.mediawiki.org/wiki/Extension:Flow',
@@ -49,8 +49,6 @@
 require $dir . 'HistoryActions.php';
 
 $wgExtensionMessagesFiles['Flow'] = $dir . 'Flow.i18n.php';
-$wgExtensionMessagesFiles['FlowAlias'] = $dir . 'Flow.alias.php';
-
 
 $wgAutoloadClasses['FlowInsertDefaultDefinitions'] = $dir . 
'maintenance/FlowInsertDefaultDefinitions.php';
 
@@ -139,11 +137,6 @@
 $wgAutoloadClasses['Flow\Block\TopicListView'] = $dir . 
'includes/Block/TopicList.php';
 $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";
diff --git a/URLS b/URLS
index 447ae03..0c75263 100644
--- a/URLS
+++ b/URLS
@@ -11,17 +11,13 @@
 
 All workflows will be allowed to be marked with either Unique, or Not-Unique.
 
-Unique workflows, like the discussion, will be addressable with the following 
url structure:
+Unique workflows, like the discussion, will be addressable simply by going to 
an occupied page:
 
-/Special:Flow/User:Zomg
+/User talk:Zomg
 
 redirects to default workflow:
 
-/Special:Flow/User:Zomg?workflow=discussion
-
-or possibly
-
-/User_Flow:Zomg?workflow=discussion
+/User talk:Zomg?workflow=discussion
 
 It is expected that unique workflows will be used as a container for the 
non-unique workflows, 
 any URL refering to a non-unique workflow must, like closed objects, contain 
the object id.
@@ -29,7 +25,7 @@
 ----------
 How to address non-unique objects within a unique workflow?
 
-/Special:Flow/User:Zomg?objectId=12345
+/User talk:Zomg?objectId=12345
 
 This feels sucky,  
 
diff --git a/container.php b/container.php
index d8d3286..d6c20d5 100644
--- a/container.php
+++ b/container.php
@@ -77,7 +77,7 @@
 
 // TODO: this is still pass-thru untill it gets hooked up to the begin/commit
 //       transaction.  Easiest will be to explicitly start/end the transaction
-//       in Special:Flow ?
+//       in the entry point ?
 $c['memcache.buffered'] = $c->share( function( $c ) {
        return new LocalBufferedCache( $c['memcache'] );
 } );
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..e86d293 100644
--- a/includes/UrlGenerator.php
+++ b/includes/UrlGenerator.php
@@ -5,7 +5,6 @@
 use FlowHooks;
 use Flow\Data\ObjectManager;
 use Flow\Model\Workflow;
-use SpecialPage;
 use Title;
 
 class UrlGenerator {
@@ -41,12 +40,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 +77,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/includes/View.php b/includes/View.php
index 27adfd8..d43f1b5 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -25,7 +25,7 @@
                $workflow = $loader->getWorkflow();
 
                $title = $workflow->getArticleTitle();
-               $this->output->setPageTitle( wfMessage( 'flow-specialpage', 
$title->getPrefixedText() )->text() );
+               $this->output->setPageTitle( wfMessage( 'flow-page-title', 
$title->getPrefixedText() )->text() );
 
                $request = $this->context->getRequest();
                $user = $this->context->getUser();
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: merged
Gerrit-Change-Id: Ica9de1dbe828df3b27e123d24492c2efcdda624e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to