diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-09-09 22:41:45 +0000 | 
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-09-09 22:41:45 +0000 | 
| commit | 871887a7be73b6b2c7aa0a4639ad1eddf2d9f035 (patch) | |
| tree | a84f98ca0c21de7d15bcaacf3d6d37ef5bcd3cfb /modules/tag/models | |
| parent | 538df03dd14f93419209ef61107a674575828e25 (diff) | |
When viewing images associated with a given tag, sort the images by date captured.
Diffstat (limited to 'modules/tag/models')
| -rw-r--r-- | modules/tag/models/tag.php | 5 | 
1 files changed, 3 insertions, 2 deletions
| 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 +} | 
