Select the first generated thumbnail, which should be the proper size
...most of the time. If all works well.
This commit is contained in:
parent
d5c733919b
commit
1981cb7662
@ -98,6 +98,7 @@ class File_thumbnail extends Managed_DataObject
|
|||||||
if ($notNullUrl) {
|
if ($notNullUrl) {
|
||||||
$thumb->whereAdd('url IS NOT NULL');
|
$thumb->whereAdd('url IS NOT NULL');
|
||||||
}
|
}
|
||||||
|
$thumb->orderBy('modified ASC'); // the first created, a somewhat ugly hack
|
||||||
$thumb->limit(1);
|
$thumb->limit(1);
|
||||||
if (!$thumb->find(true)) {
|
if (!$thumb->find(true)) {
|
||||||
throw new NoResultException($thumb);
|
throw new NoResultException($thumb);
|
||||||
|
Loading…
Reference in New Issue
Block a user