}
# Get the last editor
- $current = Revision::newFromTitle( $this->mTitle );
+ $current = $this->getRevision();
if ( is_null( $current ) ) {
# Something wrong... no page?
return array( array( 'notanarticle' ) );
public function getAutoDeleteReason( &$hasHistory ) {
global $wgContLang;
- $dbw = wfGetDB( DB_MASTER );
// Get the last revision
- $rev = Revision::newFromTitle( $this->getTitle() );
+ $rev = $this->getRevision();
if ( is_null( $rev ) ) {
return false;
}
}
+ $dbw = wfGetDB( DB_MASTER );
+
// Find out if there was only one contributor
// Only scan the last 20 revisions
$res = $dbw->select( 'revision', 'rev_user_text',