Note that updates specific to a content model should be provided by the
respective Content's getDeletionUpdates() method.
$page: the WikiPage
+$content: the Content to generate updates for
&$updates: the array of DataUpdate objects. Hook function may want to add to it.
'wfShellWikiCmd': Called when generating a shell-escaped command line
}
/**
- * Returns a list of updates to be performed when this page is deleted. The updates should remove any infomration
+ * Returns a list of updates to be performed when this page is deleted. The updates should remove any information
* about this page from secondary data stores such as links tables.
*
* @param Content|null $content optional Content object for determining the necessary updates
$content = $this->getContent( Revision::RAW );
}
- $updates = $this->getContent()->getDeletionUpdates( $this->mTitle );
+ if ( !$content ) {
+ $updates = array();
+ } else {
+ $updates = $content->getDeletionUpdates( $this->mTitle );
+ }
- wfRunHooks( 'WikiPageDeletionUpdates', array( $this, &$updates ) );
+ wfRunHooks( 'WikiPageDeletionUpdates', array( $this, $content, &$updates ) );
return $updates;
}