Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -1309,12 +1309,16 @@ |
1310 | 1310 | if( !$this->isDiffFromStable ) { |
1311 | 1311 | return false; // only safe to assume current if diff-to-stable |
1312 | 1312 | } |
1313 | | - $id = $this->parent->getTitle()->getLatestRevID(GAID_FOR_UPDATE); |
| 1313 | + $rev = Revision::newFromTitle( $this->parent->getTitle() ); |
| 1314 | + $id = $rev->getId(); |
| 1315 | + } else { |
| 1316 | + $rev = Revision::newFromTitle( $this->parent->getTitle(), $id ); |
1314 | 1317 | } |
| 1318 | + |
1315 | 1319 | # Load required messages |
1316 | 1320 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
1317 | | - # Must be a valid non-printable output |
1318 | | - if( !$id || $wgOut->isPrintable() ) { |
| 1321 | + # Must be a valid non-printable output and revision must be public |
| 1322 | + if( $wgOut->isPrintable() || !$rev || $rev->isDeleted(Revision::DELETED_TEXT) ) { |
1319 | 1323 | return false; |
1320 | 1324 | } |
1321 | 1325 | $useCurrent = false; |