r47017 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47016‎ | r47017 | r47018 >
Date:17:56, 8 February 2009
Author:aaron
Status:deferred
Tags:
Comment:
* Moved down getMemcValue()
* Changed '> article->getTouched()' to '>= article->getTouched()' to avoid silly cache misses
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -514,19 +514,6 @@
515515 ################# Synchronization and link update functions #################
516516
517517 /**
518 - * @param mixed $data Memc data returned
519 - * @param Article $article
520 - * @return mixed
521 - * Return memc value if not expired
522 - */
523 - public static function getMemcValue( $data, $article ) {
524 - if( is_object($data) && $data->time > $article->getTouched() ) {
525 - return $data->value;
526 - }
527 - return false;
528 - }
529 -
530 - /**
531518 * @param FlaggedRevision $srev, the stable revision
532519 * @param Article $article
533520 * @param ParserOutput $stableOutput, will fetch if not given
@@ -613,7 +600,7 @@
614601
615602 return $synced;
616603 }
617 -
 604+
618605 /**
619606 * @param string $val
620607 * @return obj array
@@ -627,6 +614,19 @@
628615 }
629616
630617 /**
 618+ * @param mixed $data Memc data returned
 619+ * @param Article $article
 620+ * @return mixed
 621+ * Return memc value if not expired
 622+ */
 623+ public static function getMemcValue( $data, $article ) {
 624+ if( is_object($data) && $data->time >= $article->getTouched() ) {
 625+ return $data->value;
 626+ }
 627+ return false;
 628+ }
 629+
 630+ /**
631631 * @param Article $article
632632 * @param int $revId, the *stable* rev ID
633633 * @param bool $forUpdate, use master?

Follow-up revisions

RevisionCommit summaryAuthorDate
r47018Forgot to commit this with r47017aaron17:57, 8 February 2009

Status & tagging log