projects
/
quix0rs-gnu-social.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5c7339
)
Select the first generated thumbnail, which should be the proper size
author
Mikael Nordfeldth
<mmn@hethane.se>
Wed, 20 Jul 2016 22:37:43 +0000
(
00:37
+0200)
committer
Mikael Nordfeldth
<mmn@hethane.se>
Wed, 20 Jul 2016 22:38:16 +0000
(
00:38
+0200)
...most of the time. If all works well.
classes/File_thumbnail.php
patch
|
blob
|
history
diff --git
a/classes/File_thumbnail.php
b/classes/File_thumbnail.php
index 968883f2b86dc520656d41f68dc0e4b1d63c48db..91ba6537449b133c8caf236a5766e34d60ffb46b 100644
(file)
--- a/
classes/File_thumbnail.php
+++ b/
classes/File_thumbnail.php
@@
-98,6
+98,7
@@
class File_thumbnail extends Managed_DataObject
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);