Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -399,7 +399,7 @@ |
400 | 400 | |
401 | 401 | $this->sendMails(); |
402 | 402 | |
403 | | - $latestTimestamp = Revision::getTimestampFromId( $title->getLatestRevID() ); |
| 403 | + $latestTimestamp = Revision::getTimestampFromId( $title, $title->getLatestRevID() ); |
404 | 404 | // Do not update watchlists if something else already did. |
405 | 405 | if ( $timestamp >= $latestTimestamp && ($wgShowUpdatedMarker || $wgEnotifWatchlist) ) { |
406 | 406 | # Mark the changed watch-listed page with a timestamp, so that the page is |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -953,15 +953,13 @@ |
954 | 954 | |
955 | 955 | /** |
956 | 956 | * Get rev_timestamp from rev_id, without loading the rest of the row |
| 957 | + * @param Title $title |
957 | 958 | * @param integer $id |
958 | | - * @param integer $pageid, optional |
959 | 959 | */ |
960 | | - static function getTimestampFromId( $id, $pageId = 0 ) { |
| 960 | + static function getTimestampFromId( $title, $id ) { |
961 | 961 | $dbr = wfGetDB( DB_SLAVE ); |
962 | 962 | $conds = array( 'rev_id' => $id ); |
963 | | - if( $pageId ) { |
964 | | - $conds['rev_page'] = $pageId; |
965 | | - } |
| 963 | + $conds['rev_page'] = $title->getArticleId(); |
966 | 964 | $timestamp = $dbr->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__ ); |
967 | 965 | if ( $timestamp === false && wfGetLB()->getServerCount() > 1 ) { |
968 | 966 | # Not in slave, try master |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -1364,7 +1364,7 @@ |
1365 | 1365 | function lastModified() { |
1366 | 1366 | global $wgLang, $wgArticle; |
1367 | 1367 | if( $this->mRevisionId ) { |
1368 | | - $timestamp = Revision::getTimestampFromId( $this->mRevisionId, $wgArticle->getId() ); |
| 1368 | + $timestamp = Revision::getTimestampFromId( $wgArticle->getTitle(), $this->mRevisionId ); |
1369 | 1369 | } else { |
1370 | 1370 | $timestamp = $wgArticle->getTimestamp(); |
1371 | 1371 | } |