/** * Delete the file, or an earlier version of it */ public function delete() { global $wgUploadMaintenance; if ($wgUploadMaintenance && $this->mTitle && $this->mTitle->getNamespace() == NS_FILE) { global $wgOut; $wgOut->wrapWikiMsg("<div class='error'>\n\$1\n</div>\n", array('filedelete-maintenance')); return; } $this->loadFile(); if (!$this->img->exists() || !$this->img->isLocal() || $this->img->getRedirected()) { // Standard article deletion parent::delete(); return; } $deleter = new FileDeleteForm($this->img); $deleter->execute(); }
/** * Delete the file, or an earlier version of it */ public function delete() { $file = $this->mPage->getFile(); if (!$file->exists() || !$file->isLocal() || $file->getRedirected()) { // Standard article deletion parent::delete(); return; } $deleter = new FileDeleteForm($file); $deleter->execute(); }
/** * Delete the file, or an earlier version of it */ public function delete() { if (!$this->img->exists() || !$this->img->isLocal()) { // Standard article deletion Article::delete(); return; } $deleter = new FileDeleteForm($this->img); $deleter->execute(); }