public function getContentModelName() {
if ( $this->exists() ) {
# look at the revision's actual content model
- $content = $this->getContent();
- return $content->getModelName();
+ $rev = $this->getRevision();
+ return $rev->getContentModelName();
} else {
# use the default model for this page
return $this->mTitle->getContentModelName();
$this->updateCategoryCounts( array(), $cats );
+ #TODO: move this to an Update object!
+
# If using cascading deletes, we can skip some explicit deletes
if ( !$dbw->cascadingDeletes() ) {
$dbw->delete( 'revision', array( 'rev_page' => $id ), __METHOD__ );