r107385 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107384‎ | r107385 | r107386 >
Date:15:20, 27 December 2011
Author:ialex
Status:deferred
Tags:
Comment:
Use $flags & EDIT_NEW to check for a new page instead of the number of revisions
Modified paths:
  • /trunk/extensions/SemanticTasks/SemanticTasks.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticTasks/SemanticTasks.classes.php
@@ -47,16 +47,8 @@
4848
4949 public static function mailAssigneesUpdatedTask( $article, $current_user, $text, $summary, $minoredit, $watchthis, $sectionanchor, $flags, $revision ) {
5050 if ( !$minoredit ) {
51 - // Get the revision count to determine if new article
52 - $rev = $article->estimateRevisionCount();
53 -
54 - if ( $rev == 1 ) {
55 - $title = $article->getTitle();
56 - if ( $title->isTalkPage() ) {
57 - $status = UPDATE;
58 - } else {
59 - $status = NEWTASK;
60 - }
 51+ if ( ( $flags & EDIT_NEW ) && !$article->getTitle()->isTalkPage() ) {
 52+ $status = NEWTASK;
6153 } else {
6254 $status = UPDATE;
6355 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r107386* Integrate $wgDeleteRevisionsLimit in Title::getUserPermissionsErrors() (onl...ialex15:29, 27 December 2011