Rev 384 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 384 | Rev 386 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | $uploadfile = $uploaddir . '/' . basename($req_filename); |
80 | $uploadfile = $uploaddir . '/' . basename($req_filename); |
81 | 81 | ||
82 | if (!file_exists($uploadfile)) throw new OIDplusException(_L('File does not exist')); |
82 | if (!file_exists($uploadfile)) throw new OIDplusException(_L('File does not exist')); |
83 | @unlink($uploadfile); |
83 | @unlink($uploadfile); |
84 | if (file_exists($uploadfile)) { |
84 | if (file_exists($uploadfile)) { |
85 | OIDplus::logger()->log("[ERR]OID($id)+[ERR]A!", "Attachment file '".basename($uploadfile)."' could not be deleted from object '$oid' (problem with permissions?)"); |
85 | OIDplus::logger()->log("[ERR]OID($id)+[ERR]A!", "Attachment file '".basename($uploadfile)."' could not be deleted from object '$id' (problem with permissions?)"); |
86 | $msg = _L('Attachment file "%1" could not be deleted from object "%2" (problem with permissions?)',basename($uploadfile),$oid); |
86 | $msg = _L('Attachment file "%1" could not be deleted from object "%2" (problem with permissions?)',basename($uploadfile),$id); |
87 | if (OIDplus::authUtils()::isAdminLoggedIn()) { |
87 | if (OIDplus::authUtils()::isAdminLoggedIn()) { |
88 | throw new OIDplusException($msg); |
88 | throw new OIDplusException($msg); |
89 | } else { |
89 | } else { |
90 | throw new OIDplusException($msg.'. '._L('Please contact the system administrator.')); |
90 | throw new OIDplusException($msg.'. '._L('Please contact the system administrator.')); |
91 | } |
91 | } |