Properly fix prev/next in set.

This commit is contained in:
Aaron van Geffen 2016-11-15 00:05:40 +01:00
parent fa5ef75205
commit 9b2cc5caae

View File

@ -515,12 +515,12 @@ class Asset
INNER JOIN assets AS a ON a.id_asset = t.id_asset
WHERE t.id_tag = {int:id_tag} AND
a.date_captured <= {datetime:date_captured} AND
a.id_asset != {int:id_asset}
a.id_asset <= {int:id_asset}
ORDER BY a.date_captured DESC'
: '
FROM assets AS a
WHERE date_captured >= {datetime:date_captured} AND
a.id_asset != {int:id_asset}
a.id_asset >= {int:id_asset}
ORDER BY date_captured ASC')
. '
LIMIT 1',