namespace wcf\system\package\plugin;
use wcf\system\cache\CacheHandler;
use wcf\system\exception\SystemException;
+use wcf\system\form\FormDocument;
use wcf\system\WCF;
use wcf\util\FileUtil;
if ($flushCache) CacheHandler::getInstance()->flushAll();
// run script
- $this->run($path.$this->instruction['value']);
+ $result = $this->run($path.$this->instruction['value']);
// delete script
- if (@unlink($path.$this->instruction['value'])) {
+ if (!($result instanceof FormDocument) && @unlink($path.$this->instruction['value'])) {
// delete file log entry
$sql = "DELETE FROM wcf".WCF_N."_package_installation_file_log
WHERE packageID = ?
$this->instruction['value']
]);
}
+
+ return $result;
}
/**
* @param string $scriptPath
*/
private function run($scriptPath) {
- include($scriptPath);
+ return include($scriptPath);
}
/**