$titleObj = Title::newFromText($params['title']);
if(!$titleObj)
$this->dieUsageMsg(array('invalidtitle', $params['title']));
-
- if ($titleObj->getNamespace() == NS_IMAGE)
- $this->dieUsage('File undeletion is not supported', 'fileundeletionunsupported');
// Convert timestamps
if(!is_array($params['timestamps']))
if(!is_array($retval))
$this->dieUsageMsg(array('cannotundelete'));
- //wfRunHooks( 'FileUndeleteComplete', array(
- // $titleObj, $this->mFileVersions, $wgUser, $params['reason']) );
+ if($retval[1])
+ wfRunHooks( 'FileUndeleteComplete',
+ array($titleObj, array(), $wgUser, $params['reason']) );
$info['title'] = $titleObj->getPrefixedText();
$info['revisions'] = $retval[0];