diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-29 11:22:19 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-29 11:22:19 -0700 |
commit | 08d7fda7f8ae68f06dfc063a8cf1acfa1a11eec7 (patch) | |
tree | 4ca658f6dadd4704194ad677e2aeab7880eb6cca /modules/gallery | |
parent | 6de10a54ddc4273499848be6508b9fd3c9d2c492 (diff) | |
parent | 1527f149a90a46428c48b4b811d4b8ecc10b9d2c (diff) |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/helpers/album.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index 1b6b875d..d46f21ac 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -116,13 +116,7 @@ class album_Core { $sort_order->dropdown("column", array("id" => "gAlbumSortColumn")) ->label(t("Sort by")) - ->options(array("weight" => t("Manual"), - "captured" => t("Date captured"), - "created" => t("Date uploaded"), - "title" => t("Title"), - "updated" => t("Date modified"), - "view_count" => t("Number of views"), - "rand_key" => t("Random"))) + ->options(album::get_sort_order_options()) ->selected($parent->sort_column); $sort_order->dropdown("direction", array("id" => "gAlbumSortDirection")) ->label(t("Order")) @@ -137,4 +131,17 @@ class album_Core { $form->add_rules_from(ORM::factory("item")); return $form; } + + /** + * Return a structured set of all the possible sort orders. + */ + static function get_sort_order_options() { + return array("weight" => t("Manual"), + "captured" => t("Date captured"), + "created" => t("Date uploaded"), + "title" => t("Title"), + "updated" => t("Date modified"), + "view_count" => t("Number of views"), + "rand_key" => t("Random")); + } } |