r78729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78728‎ | r78729 | r78730 >
Date:19:57, 21 December 2010
Author:pdhanda
Status:ok
Tags:
Comment:
Merged r78166 from trunk (bug 15515)
Modified paths:
  • /branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedArticle.php
@@ -275,21 +275,18 @@
276276 /**
277277 * Get the stable revision
278278 * @param int $flags
279 - * @return mixed (FlaggedRevision/false)
 279+ * @return mixed (FlaggedRevision/null)
280280 */
281281 public function getStableRev( $flags = 0 ) {
282282 # Cached results available?
283 - if ( !( $flags & FR_MASTER ) && $this->stableRev !== null ) {
 283+ if ( $this->stableRev == null || ( $flags & FR_MASTER ) ) {
 284+ $srev = FlaggedRevision::newFromStable( $this->getTitle(), $flags );
 285+ $this->stableRev = $srev ? $srev : false; // false => "found nothing"
 286+ }
 287+ if ( $this->stableRev ) {
284288 return $this->stableRev;
285289 }
286 - # Do we have one?
287 - $srev = FlaggedRevision::newFromStable( $this->getTitle(), $flags );
288 - if ( $srev ) {
289 - $this->stableRev = $srev;
290 - } else {
291 - $this->stableRev = false;
292 - }
293 - return $this->stableRev;
 290+ return null;
294291 }
295292
296293 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78044* (bug 15515) Fixed history highlighting and getPendingRevCount() to handle t...aaron05:17, 8 December 2010
r78051*(bug 15515) Fixed addToContribsLine() and addDraftTab() query w.r.t page imp...aaron07:31, 8 December 2010
r78092Improved getDiffRevMsgAndClass() for bug 15515aaron19:42, 8 December 2010
r78140* Made addToRCQuery() more selective for RCL. The RC hook should really requi...aaron21:28, 9 December 2010
r78166Cleanup return type for getStableRev() given r78092aaron03:23, 10 December 2010
r78557*Made 'excludeLastDays' act on 'totalContentEdits'/'totalCheckedEdits' too...aaron06:03, 18 December 2010
r78649Merged r78044 from trunk ( bug 15515 )pdhanda23:29, 20 December 2010
r78650Merged r78051 from trunk ( bug 15515 )pdhanda23:30, 20 December 2010
r78651Merged r78092 from trunk ( bug 15515 )pdhanda23:32, 20 December 2010

Status & tagging log