[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add copyright footer to all pages that need it

2018-01-18 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405046 )

Change subject: Add copyright footer to all pages that need it
..


Add copyright footer to all pages that need it

Bug: T184960
Change-Id: Ibba3a9909a63aedefcb9051c078156ae0fbe0161
---
M FlowActions.php
M includes/View.php
2 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index c2cd49f..3b316c0 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -46,6 +46,7 @@
  * *   All actions other than view should have an array here, unless the 
default
  * *   modules are known to work.  You can specify an empty array, or a custom 
set of modules.
  * * moduleStyles: Style modules to insert with RL to html page for this 
action instead of the defaults
+ * * showsArticleContent: Whether this action renders a page consisting of 
user-generated content
  */
 $wgFlowActions = [
'create-header' => [
@@ -650,6 +651,7 @@
 
'view' => [
'performs-writes' => false,
+   'showsArticleContent' => true,
'log_type' => false, // don't log views
'rc_insert' => false, // won't even be called, actually; only 
for writes
'permissions' => [
@@ -801,6 +803,7 @@
 
'view-topic-summary' => [
'performs-writes' => false,
+   'showsArticleContent' => true,
'log_type' => false, // don't log views
'rc_insert' => false, // won't even be called, actually; only 
for writes
'permissions' => [
@@ -831,6 +834,7 @@
// title.
'view-topic-title' => [
'performs-writes' => false,
+   'showsArticleContent' => true,
'log_type' => false, // don't log views
'rc_insert' => false, // won't even be called, actually; only 
for writes
'permissions' => [
@@ -854,23 +858,28 @@
// or just move these to a different file
// @todo: we should probably at least add 'permissions' in these below
'compare-header-revisions' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
'view-header' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
'compare-post-revisions' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
// @todo - This is a very bad action name, consolidate with view-post 
action
'single-view' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
'compare-postsummary-revisions' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
diff --git a/includes/View.php b/includes/View.php
index f1284e8..8f044e3 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -77,6 +77,10 @@
$block->setPageTitle( $output );
}
 
+   if ( $this->actions->getValue( $action, 'showsArticleContent' ) 
) {
+   $output->setArticleFlag( true );
+   }
+
$robotPolicy = $this->getRobotPolicy( $action, 
$loader->getWorkflow(), $blocks );
$this->renderApiResponse( $apiResponse, $robotPolicy );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibba3a9909a63aedefcb9051c078156ae0fbe0161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add copyright footer to all pages that need it

2018-01-18 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405046 )

Change subject: Add copyright footer to all pages that need it
..

Add copyright footer to all pages that need it

Bug: T184960
Change-Id: Ibba3a9909a63aedefcb9051c078156ae0fbe0161
---
M FlowActions.php
M includes/View.php
2 files changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/FlowActions.php b/FlowActions.php
index c2cd49f..3b316c0 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -46,6 +46,7 @@
  * *   All actions other than view should have an array here, unless the 
default
  * *   modules are known to work.  You can specify an empty array, or a custom 
set of modules.
  * * moduleStyles: Style modules to insert with RL to html page for this 
action instead of the defaults
+ * * showsArticleContent: Whether this action renders a page consisting of 
user-generated content
  */
 $wgFlowActions = [
'create-header' => [
@@ -650,6 +651,7 @@
 
'view' => [
'performs-writes' => false,
+   'showsArticleContent' => true,
'log_type' => false, // don't log views
'rc_insert' => false, // won't even be called, actually; only 
for writes
'permissions' => [
@@ -801,6 +803,7 @@
 
'view-topic-summary' => [
'performs-writes' => false,
+   'showsArticleContent' => true,
'log_type' => false, // don't log views
'rc_insert' => false, // won't even be called, actually; only 
for writes
'permissions' => [
@@ -831,6 +834,7 @@
// title.
'view-topic-title' => [
'performs-writes' => false,
+   'showsArticleContent' => true,
'log_type' => false, // don't log views
'rc_insert' => false, // won't even be called, actually; only 
for writes
'permissions' => [
@@ -854,23 +858,28 @@
// or just move these to a different file
// @todo: we should probably at least add 'permissions' in these below
'compare-header-revisions' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
'view-header' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
'compare-post-revisions' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
// @todo - This is a very bad action name, consolidate with view-post 
action
'single-view' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
'compare-postsummary-revisions' => [
+   'showsArticleContent' => true,
'handler-class' => 'Flow\Actions\FlowAction',
'modules' => [],
],
diff --git a/includes/View.php b/includes/View.php
index f1284e8..8f044e3 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -77,6 +77,10 @@
$block->setPageTitle( $output );
}
 
+   if ( $this->actions->getValue( $action, 'showsArticleContent' ) 
) {
+   $output->setArticleFlag( true );
+   }
+
$robotPolicy = $this->getRobotPolicy( $action, 
$loader->getWorkflow(), $blocks );
$this->renderApiResponse( $apiResponse, $robotPolicy );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibba3a9909a63aedefcb9051c078156ae0fbe0161
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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