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

Change subject: Switching to simpler "new MWTimestamp" and adding comment
......................................................................


Switching to simpler "new MWTimestamp" and adding comment

Changing MWTimestamp::getInstance to new MWTimestamp and also adding
a comment about how you can set $wgPageTriageNoIndexTemplates to
false to disable the noindex templates feature entirely. These
changes are based on feedback at change Ibf22b9d59.

Change-Id: If41bdf70362587c4a78fa6a7e8a445b7c3c04829
---
M PageTriage.hooks.php
M PageTriage.php
2 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index f860899..63ff02e 100755
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -316,8 +316,8 @@
                        if ( $pageCreationDateTime ) {
 
                                // Get the age of the article in days
-                               $timestamp = MWTimestamp::getInstance( 
$pageCreationDateTime );
-                               $dateInterval = $timestamp->diff( 
MWTimestamp::getInstance() );
+                               $timestamp = new MWTimestamp( 
$pageCreationDateTime );
+                               $dateInterval = $timestamp->diff( new 
MWTimestamp() );
                                $articleDaysOld = $dateInterval->format( '%a' );
 
                                // If it's younger than the maximum age, return 
true.
diff --git a/PageTriage.php b/PageTriage.php
index e9d86cf..ff69f81 100644
--- a/PageTriage.php
+++ b/PageTriage.php
@@ -63,7 +63,8 @@
 // 1 day - How long after visiting Special:NewPagesFeed do we show review 
links on articles
 $wgPageTriageMarkPatrolledLinkExpiry = 3600 * 24;
 // Title of page in MediaWiki namespace containing a list of templates that 
will
-// trigger noindexing of pages, e.g. speedy deletion templates
+// trigger noindexing of pages, e.g. speedy deletion templates. Set this to 
false
+// to disable this feature.
 $wgPageTriageNoIndexTemplates = 'Noindex templates';
 // Set this to true if new, unreviewed articles should be set to noindex. In 
other
 // words, if they should not be indexed by search engines until they are 
reviewed.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If41bdf70362587c4a78fa6a7e8a445b7c3c04829
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: Catrope <r...@wikimedia.org>
Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to