- return $page->doDeleteArticleReal( $reason, false, 0, true, $error, $user );
+ return $page->doDeleteArticleReal( $reason, false, 0, true, $error, $user, $tags );
+ }
+
+ /**
+ * @param File $file
+ * @return bool
+ */
+ protected static function canDeleteFile( File $file ) {
+ return $file->exists() && $file->isLocal() && !$file->getRedirected();