r84469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84468‎ | r84469 | r84470 >
Date:18:37, 21 March 2011
Author:aaron
Status:ok
Tags:
Comment:
* Make use of log_search table for review log
* Renamed updateLog -> updateReviewLog
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevsLogs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1273,7 +1273,7 @@
12741274 ) );
12751275 $flaggedRevision->insertOn( $auto );
12761276 # Update the article review log
1277 - FlaggedRevsLogs::updateLog( $title,
 1277+ FlaggedRevsLogs::updateReviewLog( $title,
12781278 $flags, array(), '', $rev->getId(), $oldSvId, true, $auto );
12791279
12801280 # Update page and tracking tables and clear cache
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
@@ -436,7 +436,7 @@
437437
438438 # Update the article review log...
439439 $oldSvId = $oldSv ? $oldSv->getRevId() : 0;
440 - FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags,
 440+ FlaggedRevsLogs::updateReviewLog( $this->page, $this->dims, $this->oflags,
441441 $this->comment, $this->oldid, $oldSvId, true );
442442
443443 # Get the new stable version as of now
@@ -476,7 +476,7 @@
477477
478478 # Update the article review log
479479 $oldSvId = $oldSv ? $oldSv->getRevId() : 0;
480 - FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags,
 480+ FlaggedRevsLogs::updateReviewLog( $this->page, $this->dims, $this->oflags,
481481 $this->comment, $this->oldid, $oldSvId, false );
482482
483483 # Get the new stable version as of now
Index: trunk/extensions/FlaggedRevs/FlaggedRevsLogs.php
@@ -158,7 +158,7 @@
159159 }
160160
161161 /**
162 - * Record a log entry on the action
 162+ * Record a log entry on the review action
163163 * @param Title $title
164164 * @param array $dims
165165 * @param array $oldDims
@@ -168,7 +168,7 @@
169169 * @param bool $approve, approved? (otherwise unapproved)
170170 * @param bool $auto
171171 */
172 - public static function updateLog( $title, $dims, $oldDims, $comment,
 172+ public static function updateReviewLog( $title, $dims, $oldDims, $comment,
173173 $revId, $stableId, $approve, $auto = false )
174174 {
175175 $log = new LogPage( 'review',
@@ -214,7 +214,9 @@
215215 }
216216 $ts = Revision::getTimestampFromId( $title, $revId );
217217 # Param format is <rev id, old stable id, rev timestamp>
218 - $log->addEntry( $action, $title, $comment, array( $revId, $stableId, $ts ) );
 218+ $logid = $log->addEntry( $action, $title, $comment, array( $revId, $stableId, $ts ) );
 219+ # Make log easily searchable by rev_id
 220+ $log->addRelations( 'rev_id', array( $revId ), $logid );
219221 }
220222
221223 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r84583Follow-up: r84582; re-doing accidental overwrite from 84469krinkle23:16, 22 March 2011

Status & tagging log