jenkins-bot has submitted this change and it was merged.
Change subject: New logic to determine whether to show curation toolbar
......................................................................
New logic to determine whether to show curation toolbar
Change-Id: I19190601488e2b528ed3d94a98678d1dd733d9aa
---
M PageTriage.hooks.php
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Kaldari: Looks good to me, approved
jenkins-bot: Verified
diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index 79d0be1..a90de00 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -294,12 +294,14 @@
}
/**
- * Adds "mark as patrolled" link to articles
+ * Handler for hook ArticleViewFooter, this will determine whether to
load
+ * curation toolbar or 'mark as reviewed'/'reviewed' text
*
* @param &$article Article object to show link for.
+ * @param $patrolFooterShown bool whether the patrol footer is shown
* @return bool
*/
- public static function onArticleViewFooter( $article ) {
+ public static function onArticleViewFooter( $article,
$patrolFooterShown ) {
global $wgUser, $wgPageTriageMarkPatrolledLinkExpiry, $wgOut,
$wgPageTriageEnableCurationToolbar, $wgRequest,
$wgPageTriageNamespaces;
@@ -323,10 +325,8 @@
return true;
}
- // The presence of rcid means this is coming from
Special:NewPages,
- // and hence don't make any interference, this also applies to
- // user with no right
- if ( $wgRequest->getVal( 'rcid' ) ) {
+ // Don't do anything if [Mark this page as patrolled] is shown
+ if ( $patrolFooterShown ) {
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/66036
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I19190601488e2b528ed3d94a98678d1dd733d9aa
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits