public function limitbackup() { $fileList = $this->getBackupTimeList(); $connection = $this->getConnection(); for ($index = 0; count($fileList) > $this->limit - 1; ++$index) { $fileName = Vtiger_BackupZip::getDefaultFileName($fileList[$index]); @ftp_delete($connection, $fileName); unset($fileList[$index]); } }
public function limitbackup() { $directoryPath = $this->getPath(); $fileList = $this->getBackupTimeList(); for ($index = 0; count($fileList) > $this->limit - 1; ++$index) { $fileName = Vtiger_BackupZip::getDefaultFileName($fileList[$index]); unlink($directoryPath . $fileName); unset($fileList[$index]); } }