Ejemplo n.º 1
0
 public function removeThumbnail(Layout $layout, BBApplication $app)
 {
     $thumbnailfile = $layout->getPicPath();
     if (empty($thumbnail)) {
         return true;
     }
     File::resolveFilepath($thumbnailfile, null, array('include_path' => $app->getResourceDir()));
     while (true === is_file($thumbnailfile) && true === is_writable($thumbnailfile)) {
         @unlink($thumbnailfile);
         $thumbnailfile = $layout->getPicPath();
         File::resolveFilepath($thumbnailfile, null, array('include_path' => $app->getResourceDir()));
     }
     return true;
 }