Index: trunk/phase3/includes/Article.php |
— | — | @@ -369,7 +369,6 @@ |
370 | 370 | $lc->addGoodLinkObj( $data->page_id, $this->mTitle, $data->page_len, $data->page_is_redirect ); |
371 | 371 | |
372 | 372 | $this->mTitle->mArticleID = $data->page_id; |
373 | | - $this->mTitle->mTouched = wfTimestamp( TS_MW, $data->page_touched ); |
374 | 373 | |
375 | 374 | # Old-fashioned restrictions |
376 | 375 | $this->mTitle->loadRestrictions( $data->page_restrictions ); |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -69,7 +69,6 @@ |
70 | 70 | var $mLength = -1; ///< The page length, 0 for special pages |
71 | 71 | var $mRedirect = null; ///< Is the article at this title a redirect? |
72 | 72 | var $mNotificationTimestamp = array(); ///< Associative array of user ID -> timestamp/false |
73 | | - var $mTouched = null; // <last cache date> |
74 | 73 | //@} |
75 | 74 | |
76 | 75 | |
— | — | @@ -3136,15 +3135,13 @@ |
3137 | 3136 | |
3138 | 3137 | /** |
3139 | 3138 | * Get the last touched timestamp |
| 3139 | + * @param Database $db, optional db |
3140 | 3140 | * @return \type{\string} Last touched timestamp |
3141 | 3141 | */ |
3142 | | - public function getTouched() { |
3143 | | - if( !is_null($this->mTouched) ) { |
3144 | | - return wfTimestamp( TS_MW, $this->mTouched ); |
3145 | | - } |
3146 | | - $dbr = wfGetDB( DB_SLAVE ); |
3147 | | - $this->mTouched = $dbr->selectField( 'page', 'page_touched', $this->pageCond(), __METHOD__ ); |
3148 | | - return $this->mTouched; |
| 3142 | + public function getTouched( $db = NULL ) { |
| 3143 | + $db = isset($db) ? $db : wfGetDB( DB_SLAVE ); |
| 3144 | + $touched = $db->selectField( 'page', 'page_touched', $this->pageCond(), __METHOD__ ); |
| 3145 | + return $touched; |
3149 | 3146 | } |
3150 | 3147 | |
3151 | 3148 | /** |