Ejemplo n.º 1
0
 if (!file_exists($src)) {
     $errors[] = $this->Lang('filenotfound') . " {$file}";
     continue;
 }
 if (!is_readable($src)) {
     $errors[] = $this->Lang('insufficientpermission', $file);
     continue;
 }
 if (file_exists($dest)) {
     $errors[] = $this->Lang('fileexistsdest', $file);
     continue;
 }
 $thumb = '';
 $src_thumb = '';
 $dest_thumb = '';
 if (filemanager_utils::is_image_file($file)) {
     $tmp = 'thumb_' . $file;
     $src_thumb = filemanager_utils::join_path($basedir, $cwd, $tmp);
     $dest_thumb = filemanager_utils::join_path($basedir, $destdir, $tmp);
     if (file_exists($src_thumb)) {
         // have a thumbnail
         $thumb = $tmp;
         if (!is_readable($src_thumb)) {
             $errors[] = $this->Lang('insufficientpermission', $thumb);
             continue;
         }
         if (file_exists($dest_thumb)) {
             $errors[] = $this->Lang('fileexistsdest', $thumb);
             continue;
         }
     }