From 871887a7be73b6b2c7aa0a4639ad1eddf2d9f035 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Thu, 9 Sep 2010 22:41:45 +0000 Subject: When viewing images associated with a given tag, sort the images by date captured. --- modules/tag/models/tag.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/tag/models') diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index e8bd69c5..96f926bb 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -31,7 +31,8 @@ class Tag_Model extends ORM { $model = ORM::factory("item") ->viewable() ->join("items_tags", "items.id", "items_tags.item_id") - ->where("items_tags.tag_id", "=", $this->id); + ->where("items_tags.tag_id", "=", $this->id) + ->order_by("captured", "DESC"); if ($type) { $model->where("items.type", "=", $type); } @@ -130,4 +131,4 @@ class Tag_Model extends ORM { } return $url; } -} \ No newline at end of file +} -- cgit v1.2.3