From a00619b812393cf73d1c188af7961af820d36185 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 20 Sep 2009 20:59:18 -0700 Subject: * 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. --- modules/gallery/helpers/gallery_event.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/gallery/helpers/gallery_event.php') diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 64f2a9ff..446a8a91 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -53,4 +53,14 @@ class gallery_event_Core { $data[] = $item->name; $data[] = $item->title; } + + static function get_sort_fields($sort_order) { + $sort_order->fields = array_merge($sort_order->fields, + array("weight" => t("Manual"), + "created" => t("Date uploaded"), + "title" => t("Title"), + "updated" => t("Date modified"), + "view_count" => t("Number of views"), + "rand_key" => t("Random"))); + } } -- cgit v1.2.3