function _deleteMedia2($file) { global $_ARRAYLANG; if (self::isIllegalFileName($file)) { return $_ARRAYLANG['TXT_MEDIA_FILE_DONT_DELETE']; } $obj_file = new \File(); if (is_dir($this->path . $file)) { $this->dirLog = $obj_file->delDir($this->path, $this->webPath, $file); if ($this->dirLog != "error") { $status = $_ARRAYLANG['TXT_MEDIA_MSG_DIR_DELETE']; } else { $status = $_ARRAYLANG['TXT_MEDIA_MSG_ERROR_DIR']; } } else { if ($this->_isImage($this->path . $file)) { $thumb_name = basename(\ImageManager::getThumbnailFilename($this->path . $file)); if (file_exists($this->path . $thumb_name)) { $this->dirLog = $obj_file->delFile($this->path, $this->webPath, $thumb_name); } } $this->dirLog = $obj_file->delFile($this->path, $this->webPath, $file); if ($this->dirLog != "error") { $status = $_ARRAYLANG['TXT_MEDIA_MSG_FILE_DELETE']; } else { $status = $_ARRAYLANG['TXT_MEDIA_MSG_ERROR_FILE']; } } return $status; }