function DeleteFileFromRepository($s_fld) { global $aFileVars, $FILE_REPOSITORY; if (!FILEUPLOADS || $FILE_REPOSITORY === "") { // // nothing to do // return false; } if (($a_upload = GetFileInfo($s_fld)) === false) { return false; } if (isset($a_upload["in_repository"]) && $a_upload["in_repository"]) { if (isset($a_upload["saved_as"]) && !empty($a_upload["saved_as"])) { @unlink($a_upload["saved_as"]); } } DeleteFileInfo($s_fld); return true; }
function DeleteFileFromRepository($s_fld) { global $aFileVars; if (!Settings::get('FILEUPLOADS') || Settings::get('FILE_REPOSITORY') === "") { return false; } if (($a_upload = GetFileInfo($s_fld)) === false) { return false; } if (isset($a_upload["in_repository"]) && $a_upload["in_repository"]) { if (isset($a_upload["saved_as"]) && !empty($a_upload["saved_as"])) { @unlink($a_upload["saved_as"]); } } DeleteFileInfo($s_fld); return true; }