Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1273,7 +1273,7 @@ |
1274 | 1274 | ) ); |
1275 | 1275 | $flaggedRevision->insertOn( $auto ); |
1276 | 1276 | # Update the article review log |
1277 | | - FlaggedRevsLogs::updateLog( $title, |
| 1277 | + FlaggedRevsLogs::updateReviewLog( $title, |
1278 | 1278 | $flags, array(), '', $rev->getId(), $oldSvId, true, $auto ); |
1279 | 1279 | |
1280 | 1280 | # Update page and tracking tables and clear cache |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -436,7 +436,7 @@ |
437 | 437 | |
438 | 438 | # Update the article review log... |
439 | 439 | $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
440 | | - FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags, |
| 440 | + FlaggedRevsLogs::updateReviewLog( $this->page, $this->dims, $this->oflags, |
441 | 441 | $this->comment, $this->oldid, $oldSvId, true ); |
442 | 442 | |
443 | 443 | # Get the new stable version as of now |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | |
478 | 478 | # Update the article review log |
479 | 479 | $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
480 | | - FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags, |
| 480 | + FlaggedRevsLogs::updateReviewLog( $this->page, $this->dims, $this->oflags, |
481 | 481 | $this->comment, $this->oldid, $oldSvId, false ); |
482 | 482 | |
483 | 483 | # Get the new stable version as of now |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsLogs.php |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
162 | | - * Record a log entry on the action |
| 162 | + * Record a log entry on the review action |
163 | 163 | * @param Title $title |
164 | 164 | * @param array $dims |
165 | 165 | * @param array $oldDims |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | * @param bool $approve, approved? (otherwise unapproved) |
170 | 170 | * @param bool $auto |
171 | 171 | */ |
172 | | - public static function updateLog( $title, $dims, $oldDims, $comment, |
| 172 | + public static function updateReviewLog( $title, $dims, $oldDims, $comment, |
173 | 173 | $revId, $stableId, $approve, $auto = false ) |
174 | 174 | { |
175 | 175 | $log = new LogPage( 'review', |
— | — | @@ -214,7 +214,9 @@ |
215 | 215 | } |
216 | 216 | $ts = Revision::getTimestampFromId( $title, $revId ); |
217 | 217 | # 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 ); |
219 | 221 | } |
220 | 222 | |
221 | 223 | /** |