Ejemplo n.º 1
0
 private function check_file_name()
 {
     if (empty($this->file_name)) {
         return false;
     }
     $ext = Util_file::get_extension_from_filename($this->file_name);
     $accept_formats = Site_Upload::get_accept_format($this->type);
     if (!$accept_formats || !in_array($ext, $accept_formats)) {
         return false;
     }
     $this->extension = $ext;
     return true;
 }