jenkins-bot has submitted this change and it was merged. Change subject: Config var was confusing; all others are ArticleFeedbackv5 prefixed ......................................................................
Config var was confusing; all others are ArticleFeedbackv5 prefixed Also: not only object of type User is expected; null (system "user") is valid too Change-Id: I79f1b888780965c98a92ce559116786f761e63f8 --- M ArticleFeedbackv5.flagging.php M ArticleFeedbackv5.model.php M ArticleFeedbackv5.php M SpecialArticleFeedbackv5.php M maintenance/archiveFeedback.php M maintenance/setArchiveDate.php 6 files changed, 15 insertions(+), 15 deletions(-) Approvals: Bsitu: Looks good to me, approved jenkins-bot: Verified diff --git a/ArticleFeedbackv5.flagging.php b/ArticleFeedbackv5.flagging.php index f6a491d..ccc9940 100644 --- a/ArticleFeedbackv5.flagging.php +++ b/ArticleFeedbackv5.flagging.php @@ -159,7 +159,7 @@ * @param User $user * @return int */ - protected function log( $action, $pageId, $feedbackId, $comment, User $user ) { + protected function log( $action, $pageId, $feedbackId, $comment, User $user = null ) { $params = array(); if ( $this->source ) { $params['source'] = $this->source; diff --git a/ArticleFeedbackv5.model.php b/ArticleFeedbackv5.model.php index 80a09ae..59a22f1 100644 --- a/ArticleFeedbackv5.model.php +++ b/ArticleFeedbackv5.model.php @@ -589,15 +589,15 @@ if ( $this->isFeatured() || $this->isResolved() || $this->isNonActionable() || $this->isHidden() ) { return null; } elseif ( !$this->aft_archive_date ) { - global $wgArticleFeedbackAutoArchiveTtl; - $wgArticleFeedbackAutoArchiveTtl = (array) $wgArticleFeedbackAutoArchiveTtl; + global $wgArticleFeedbackv5AutoArchiveTtl; + $wgArticleFeedbackv5AutoArchiveTtl = (array) $wgArticleFeedbackv5AutoArchiveTtl; $ttl = '+5 years'; // ttl is set per x amount of unreviewed comments $count = static::getCount( 'unreviewed', $this->aft_page ); - ksort( $wgArticleFeedbackAutoArchiveTtl ); - foreach ( $wgArticleFeedbackAutoArchiveTtl as $amount => $time ) { + ksort( $wgArticleFeedbackv5AutoArchiveTtl ); + foreach ( $wgArticleFeedbackv5AutoArchiveTtl as $amount => $time ) { if ( $amount <= $count ) { $ttl = $time; } else { diff --git a/ArticleFeedbackv5.php b/ArticleFeedbackv5.php index 79a8737..d2e033e 100644 --- a/ArticleFeedbackv5.php +++ b/ArticleFeedbackv5.php @@ -99,7 +99,7 @@ * * @var bool true to enable, false to disable */ -$wgArticleFeedbackAutoArchiveEnabled = false; +$wgArticleFeedbackv5AutoArchiveEnabled = false; /** * Defines the auto-archive period for feedback that is not being considered useful. @@ -118,7 +118,7 @@ * * @var array|string strtotime-capable format */ -$wgArticleFeedbackAutoArchiveTtl = '+2 weeks'; +$wgArticleFeedbackv5AutoArchiveTtl = '+2 weeks'; // Defines whether or not there should be a link to the corresponding feedback on the page's talk page $wgArticleFeedbackv5TalkPageLink = true; diff --git a/SpecialArticleFeedbackv5.php b/SpecialArticleFeedbackv5.php index eb13f8a..a3b62ef 100644 --- a/SpecialArticleFeedbackv5.php +++ b/SpecialArticleFeedbackv5.php @@ -144,8 +144,8 @@ // don't display archived list unless specifically "enabled" (if cronjob // is not running, it would simply not work) - global $wgArticleFeedbackAutoArchiveEnabled; - if ( !$wgArticleFeedbackAutoArchiveEnabled ) { + global $wgArticleFeedbackv5AutoArchiveEnabled; + if ( !$wgArticleFeedbackv5AutoArchiveEnabled ) { $this->filters = array_diff( $this->filters, array( 'archived' ) ); } diff --git a/maintenance/archiveFeedback.php b/maintenance/archiveFeedback.php index 765df31..3ff14f5 100644 --- a/maintenance/archiveFeedback.php +++ b/maintenance/archiveFeedback.php @@ -52,10 +52,10 @@ * it works similar to any other action plus caches will update nicely. */ public function execute() { - global $wgArticleFeedbackv5Cluster, $wgArticleFeedbackAutoArchiveEnabled; + global $wgArticleFeedbackv5Cluster, $wgArticleFeedbackv5AutoArchiveEnabled; - if ( !$wgArticleFeedbackAutoArchiveEnabled ) { - $this->output( 'IMPORTANT! Auto-archive is currently disabled. To enable, set $wgArticleFeedbackAutoArchiveEnabled = true.'."\n" ); + if ( !$wgArticleFeedbackv5AutoArchiveEnabled ) { + $this->output( 'IMPORTANT! Auto-archive is currently disabled. To enable, set $wgArticleFeedbackv5AutoArchiveEnabled = true.'."\n" ); } else { $this->output( "Marking old feedback as archived.\n" ); diff --git a/maintenance/setArchiveDate.php b/maintenance/setArchiveDate.php index 6c60a7b..0a9333c 100644 --- a/maintenance/setArchiveDate.php +++ b/maintenance/setArchiveDate.php @@ -103,9 +103,9 @@ $this->output( "Done. Fixed " . $this->completeCount . " entries' archive dates.\n" ); - global $wgArticleFeedbackAutoArchiveEnabled; - if ( !$wgArticleFeedbackAutoArchiveEnabled ) { - $this->output( 'IMPORTANT! Auto-archive is currently disabled. To enable, set $wgArticleFeedbackAutoArchiveEnabled = true.'."\n" ); + global $wgArticleFeedbackv5AutoArchiveEnabled; + if ( !$wgArticleFeedbackv5AutoArchiveEnabled ) { + $this->output( 'IMPORTANT! Auto-archive is currently disabled. To enable, set $wgArticleFeedbackv5AutoArchiveEnabled = true.'."\n" ); } return true; -- To view, visit https://gerrit.wikimedia.org/r/60801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I79f1b888780965c98a92ce559116786f761e63f8 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5 Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org> Gerrit-Reviewer: Bsitu <bs...@wikimedia.org> Gerrit-Reviewer: Matthias Mullie <mmul...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits