EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/129363

Change subject: Merge remote-tracking branch 'gerrit/master' into 
frontend-rewrite
......................................................................

Merge remote-tracking branch 'gerrit/master' into frontend-rewrite

Change-Id: If7062f7f5ada5e7123b8420fda988a85d8c360e8
---
M i18n/en.json
M includes/Block/Topic.php
M includes/Block/TopicList.php
M includes/View.php
4 files changed, 2 insertions(+), 168 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/63/129363/1

diff --git a/i18n/en.json b/i18n/en.json
index 45228c8..e678faf 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -276,7 +276,6 @@
     "flow-terms-of-use-new-topic": "By clicking 
\"{{int:flow-newtopic-save}}\", you agree to the terms of use for this wiki.",
     "flow-terms-of-use-reply": "By clicking \"{{int:flow-reply-submit}}\", you 
agree to the terms of use for this wiki.",
     "flow-terms-of-use-edit": "By saving your changes, you agree to the terms 
of use for this wiki.",
-<<<<<<< HEAD   (c7a894 Implement board-history in new frontend)
     "flow-anon-warning": "You are not logged in. To receive attribution with 
your name instead of your IP address, you can [$1 log in] or [$2 create an 
account].",
 
     "flow-topic-participants-second-try": "$1 started this 
topic{{PLURAL:$2|0=|1=, with 1 other participant|, with $2 other 
participants}}",
@@ -293,11 +292,8 @@
     "flow-sorting-tooltip": "You are currently reading the newest topics 
first. Click for more sorting options.",
     "flow-toggle-small-topics": "Toggle small topics view",
     "flow-toggle-topics": "Toggle topics only view",
-    "flow-toggle-topics-posts": "Toggle topics and posts view"
-=======
+    "flow-toggle-topics-posts": "Toggle topics and posts view",
     "flow-terms-of-use-summarize": "By clicking 
\"{{int:flow-summarize-topic-submit}}\", you agree to the terms of use for this 
wiki.",
     "flow-terms-of-use-close-topic": "By clicking 
\"{{int:flow-close-topic-submit}}\", you agree to the terms of use for this 
wiki.",
-    "flow-terms-of-use-reopen-topic": "By clicking 
\"{{int:flow-reopen-topic-submit}}\", you agree to the terms of use for this 
wiki.",
-    "flow-anon-warning": "You are not logged in. To receive attribution with 
your name instead of your IP address, you can [$1 log in] or [$2 create an 
account]."
->>>>>>> BRANCH (06ecee Localisation updates from https://translatewiki.net.)
+    "flow-terms-of-use-reopen-topic": "By clicking 
\"{{int:flow-reopen-topic-submit}}\", you agree to the terms of use for this 
wiki."
 }
diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index cdf7ec9..69af661 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -402,24 +402,6 @@
                                $newRevision->setChildren( array() );
                        }
 
-<<<<<<< HEAD   (c7a894 Implement board-history in new frontend)
-=======
-                       // FIXME special case
-                       if ( $this->action == 'edit-title' ) {
-                               $renderFunction = function( Templating 
$templating ) use ( $newRevision ) {
-                                       return $templating->getContent( 
$newRevision, 'wikitext' );
-                               };
-                       } elseif ( $this->action === 'moderate-topic' || 
$this->action === 'close-open-topic' ) {
-                               $renderFunction = function( Templating 
$templating ) use ( $self, $newRevision ) {
-                                       return $templating->renderTopic( 
$newRevision, $self );
-                               };
-                       } else {
-                               $renderFunction = function( Templating 
$templating ) use ( $self, $newRevision, $rootPost ) {
-                                       return $templating->renderPost( 
$newRevision, $self );
-                               };
-                       }
-
->>>>>>> BRANCH (06ecee Localisation updates from https://translatewiki.net.)
                        if ( is_array( $this->notification ) ) {
                                $this->notification['params']['revision'] = 
$this->newRevision;
                                // $this->topicTitle has already been loaded 
before in case
@@ -439,114 +421,8 @@
                }
        }
 
-<<<<<<< HEAD   (c7a894 Implement board-history in new frontend)
        public function render( Templating $templating, array $options ) {
                throw new FlowException( 'deprecated' );
-=======
-       public function render( Templating $templating, array $options, $return 
= false ) {
-               if ( $this->action === 'history' ) {
-                       $templating->getOutput()->addModuleStyles( array( 
'ext.flow.history' ) );
-                       $templating->getOutput()->addModules( array( 
'ext.flow.history' ) );
-               } else {
-                       $templating->getOutput()->addModuleStyles( array( 
'ext.flow.discussion.styles', 'ext.flow.moderation.styles' ) );
-                       $templating->getOutput()->addModules( array( 
'ext.flow.discussion' ) );
-               }
-
-               $prefix = '';
-
-               switch( $this->action ) {
-               case 'history':
-                       $root = $this->loadRootPost();
-                       if ( !$root ) {
-                               return '';
-                       }
-
-                       // BC: old history links used to also have postId for 
topic history
-                       if ( isset( $options['postId'] ) && 
!$root->getPostId()->equals( UUID::create( $options['postId'] ) ) ) {
-                               return $prefix . $this->renderPostHistory( 
$templating, $options, $return );
-                       }
-
-                       $history = $this->loadTopicHistory();
-
-                       return $prefix . $templating->render( 
"flow:topic-history.html.php", array(
-                               'block' => $this,
-                               'topic' => $this->workflow,
-                               'root' => $root,
-                               'history' => new History( $history ),
-                               'historyRenderer' => new HistoryRenderer( 
$this->permissions, $templating, $this ),
-                       ), $return );
-
-               case 'edit-post':
-                       return $prefix . $this->renderEditPost( $templating, 
$options, $return );
-
-               case 'edit-title':
-                       $topicTitle = $this->loadTopicTitle();
-                       if ( !$this->permissions->isAllowed( $topicTitle, 
'edit-title' ) ) {
-                               return $prefix . $templating->render( 
'flow:error-permissions.html.php' );
-                       }
-                       return $prefix . $templating->render( 
"flow:edit-title.html.php", array(
-                               'block' => $this,
-                               'topic' => $this->workflow,
-                               'topicTitle' => $this->newRevision ?: 
$topicTitle, // if already submitted, use submitted revision,
-                       ), $return );
-
-               case 'compare-post-revisions':
-                       if ( !isset( $options['newRevision'] ) ) {
-                               throw new InvalidInputException( 'A revision 
must be provided for comparison', 'revision-comparison' );
-                       }
-
-                       $revisionView = PostRevisionView::newFromId( 
$options['newRevision'], $templating, $this, $this->user );
-                       if ( !$revisionView ) {
-                               throw new InvalidInputException( 'An invalid 
revision was provided for comparison', 'revision-comparison' );
-                       }
-
-                       if ( isset( $options['oldRevision'] ) ) {
-                               return $revisionView->renderDiffViewAgainst( 
$options['oldRevision'], $return );
-                       } else {
-                               return 
$revisionView->renderDiffViewAgainstPrevious( $return );
-                       }
-                       break;
-
-               default:
-                       $root = $this->loadRootPost();
-                       if ( !$root ) {
-                               return '';
-                       }
-
-                       if ( !isset( $options['topiclist-block'] ) ) {
-                               $title = $templating->getContent( $root, 
'wikitext' );
-                               $templating->getOutput()->setHtmlTitle( $title 
);
-                               $templating->getOutput()->setPageTitle( $title 
);
-
-                               $prefix = $templating->render(
-                                       'flow:topic-permalink-warning.html.php',
-                                       array(
-                                               'block' => $this,
-                                       ),
-                                       $return
-                               );
-                       }
-
-                       if ( !$this->permissions->isAllowed( $root, 'view' ) ) {
-                               return $prefix . $templating->render( 
'flow:error-permissions.html.php' );
-                       } elseif ( isset( $options['revId'] ) ) {
-                               $revisionView = PostRevisionView::newFromId( 
$options['revId'], $templating, $this, $this->user );
-                               if ( !$revisionView ) {
-                                       throw new InvalidInputException( 'The 
requested revision could not be found', 'missing-revision' );
-                               } else if ( !$this->permissions->isAllowed( 
$revisionView->getRevision(), 'view' ) ) {
-                                       $this->addError( 'moderation', 
wfMessage( 'flow-error-not-allowed' ) );
-                                       return null;
-                               }
-                               return $revisionView->renderSingleView( $return 
);
-                       } else {
-                               return $prefix . $templating->renderTopic(
-                                       $root,
-                                       $this,
-                                       $return
-                               );
-                       }
-               }
->>>>>>> BRANCH (06ecee Localisation updates from https://translatewiki.net.)
        }
 
        protected function renderPostHistory( Templating $templating, array 
$options, $return = false ) {
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index e17187c..07699b3 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -176,39 +176,7 @@
        }
 
        public function render( Templating $templating, array $options ) {
-<<<<<<< HEAD   (c7a894 Implement board-history in new frontend)
                throw new FlowException( 'deprecated' );
-=======
-               $templating->getOutput()->addModuleStyles(
-                       array(
-                               'ext.flow.base.styles',
-                               'ext.flow.discussion.styles',
-                               'ext.flow.moderation.styles',
-                       )
-               );
-               $templating->getOutput()->addModules( array( 
'ext.flow.discussion' ) );
-               if ( $this->workflow->isNew() ) {
-                       $templating->render( "flow:topiclist.html.php", array(
-                               'block' => $this,
-                               'topics' => array(),
-                               'user' => $this->user,
-                               'page' => false,
-                               'permissions' => $this->permissions,
-                       ) );
-               } else {
-                       $findOptions = $this->getFindOptions( $options );
-                       $page = $this->getPage( $findOptions );
-                       $topics = $this->getTopics( $page );
-
-                       $templating->render( "flow:topiclist.html.php", array(
-                               'block' => $this,
-                               'topics' => $topics,
-                               'user' => $this->user,
-                               'page' => $page,
-                               'permissions' => $this->permissions,
-                       ) );
-               }
->>>>>>> BRANCH (06ecee Localisation updates from https://translatewiki.net.)
        }
 
        public function renderAPI( Templating $templating, array $options ) {
diff --git a/includes/View.php b/includes/View.php
index 6f57592..4fbd9d8 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -38,14 +38,8 @@
 
        public function show( WorkflowLoader $loader, $action ) {
                $out = $this->getOutput();
-<<<<<<< HEAD   (c7a894 Implement board-history in new frontend)
                $out->addModuleStyles( array( 'mediawiki.ui', 
'mediawiki.ui.button', 'ext.flow.new.styles' ) );
                $out->addModules( array( 'ext.flow.new' ) );
-
-=======
-               $out->addModuleStyles( array( 'mediawiki.ui', 
'mediawiki.ui.button', 'ext.flow.base.styles' ) );
-               $out->addModules( array( 'ext.flow.base', 'ext.flow.editor' ) );
->>>>>>> BRANCH (06ecee Localisation updates from https://translatewiki.net.)
 
                // Allow other extensions to add modules
                wfRunHooks( 'FlowAddModules', array( $out ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/129363
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7062f7f5ada5e7123b8420fda988a85d8c360e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to