/** * deletes a transfer * * @return boolean */ function _delete() { global $cfg; // delete if ($cfg["user"] == $this->owner || $cfg['isAdmin']) { // XFER: before deletion save upload/download xfer data to SQL if ($cfg['enable_xfer'] == 1) { $transferTotals = $this->getTransferCurrent($this->transfer); Xfer::save($this->owner, $transferTotals["downtotal"], $transferTotals["uptotal"]); } // update totals $this->_updateTotals(); // remove settings from db deleteTransferSettings($this->transfer); // client-cache $this->deleteCache($this->transfer); // command-clean CommandHandler::clean($this->transfer); // remove meta-file if (@file_exists($this->transferFilePath)) { @unlink($this->transferFilePath); } // remove stat-file if (@file_exists($this->transferFilePath . ".stat")) { @unlink($this->transferFilePath . ".stat"); } // if exist remove pid file if (@file_exists($this->transferFilePath . ".pid")) { @unlink($this->transferFilePath . ".pid"); } // if exist remove log-file if (@file_exists($this->transferFilePath . ".log")) { @unlink($this->transferFilePath . ".log"); } // if exist remove prio-file if (@file_exists($this->transferFilePath . ".prio")) { @unlink($this->transferFilePath . ".prio"); } AuditAction($cfg["constants"]["delete_transfer"], $this->transfer); return true; } else { AuditAction($cfg["constants"]["error"], "ILLEGAL DELETE: " . $this->transfer); return false; } }