if ($notNullUrl) {
$thumb->whereAdd('url IS NOT NULL');
}
+ $thumb->orderBy('modified ASC'); // the first created, a somewhat ugly hack
$thumb->limit(1);
if (!$thumb->find(true)) {
throw new NoResultException($thumb);
$file_filename = $this->getFile()->getFilename();
} catch (NoResultException $e) {
// reasonably the function calling us will handle the following as "File_thumbnail entry should be deleted"
- throw FileNotFoundException($thumbpath);
+ throw new FileNotFoundException($thumbpath);
} catch (InvalidFilenameException $e) {
// invalid filename in getFile()->getFilename(), just
// means the File object isn't stored locally and that
return File::getByID($this->file_id);
}
+ public function getFileId()
+ {
+ return $this->file_id;
+ }
static public function hashurl($url)
{