diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-20 20:59:18 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-20 20:59:18 -0700 |
| commit | a00619b812393cf73d1c188af7961af820d36185 (patch) | |
| tree | d19e6bf187c56bfc0a4c72db2adfb5e9560aa154 /modules/gallery/helpers/album.php | |
| parent | 09f998e7a5a58720636c7b1140279b5efbdb33c6 (diff) | |
* Move the captured field into the exif module where it is created and populated.
* Create a new API event get_sort_fields that allows modules to contribute new sort fields that they manage. the only condition is that the module needs to add it to the item table.
* Changed g2_import to call this api to get the allowable sort fields
* Changed album::get_edit_form to call this new api to get the available sort fields
Partial fix for ticket #627, as the Capture date is not available until the exif module is installed.
Diffstat (limited to 'modules/gallery/helpers/album.php')
| -rw-r--r-- | modules/gallery/helpers/album.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php index 9cd746d7..eeeb7e52 100644 --- a/modules/gallery/helpers/album.php +++ b/modules/gallery/helpers/album.php @@ -166,12 +166,10 @@ class album_Core { * 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")); + $sort_order = (object)array("fields" => array()); + module::event("get_sort_fields", $sort_order); + asort($sort_order->fields); + + return $sort_order->fields; } } |
