summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/helpers/album.php12
-rw-r--r--modules/gallery/helpers/gallery_event.php10
-rw-r--r--modules/gallery/helpers/gallery_installer.php17
-rw-r--r--modules/gallery/module.info2
4 files changed, 10 insertions, 31 deletions
diff --git a/modules/gallery/helpers/album.php b/modules/gallery/helpers/album.php
index eeeb7e52..9cd746d7 100644
--- a/modules/gallery/helpers/album.php
+++ b/modules/gallery/helpers/album.php
@@ -166,10 +166,12 @@ class album_Core {
* Return a structured set of all the possible sort orders.
*/
static function get_sort_order_options() {
- $sort_order = (object)array("fields" => array());
- module::event("get_sort_fields", $sort_order);
- asort($sort_order->fields);
-
- return $sort_order->fields;
+ 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"));
}
}
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php
index 446a8a91..64f2a9ff 100644
--- a/modules/gallery/helpers/gallery_event.php
+++ b/modules/gallery/helpers/gallery_event.php
@@ -53,14 +53,4 @@ 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")));
- }
}
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index aebb7a32..6500482b 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -68,6 +68,7 @@ class gallery_installer {
$db->query("CREATE TABLE {items} (
`id` int(9) NOT NULL auto_increment,
`album_cover_item_id` int(9) default NULL,
+ `captured` int(9) default NULL,
`created` int(9) default NULL,
`description` varchar(2048) default NULL,
`height` int(9) default NULL,
@@ -267,7 +268,7 @@ class gallery_installer {
module::set_var("gallery", "show_credits", 1);
// @todo this string needs to be picked up by l10n_scanner
module::set_var("gallery", "credits", "Powered by <a href=\"%url\">Gallery %version</a>");
- module::set_version("gallery", 13);
+ module::set_version("gallery", 12);
}
static function upgrade($version) {
@@ -363,20 +364,6 @@ class gallery_installer {
$db->query("UPDATE {items} SET `relative_url_cache` = NULL, `relative_path_cache` = NULL");
module::set_version("gallery", $version = 12);
}
-
- if ($version == 12) {
- // remove the capture field if exif is not installed and it has no data
- if (!module::is_active("exif")) {
- $total_records = $db->query("SELECT COUNT(id) as total_records FROM {items}")
- ->current()->total_records;
- $count_null = $db->query("SELECT COUNT(id) as count_null FROM {items} where `captured`is NULL")
- ->current()->count_null;
- if ($total_records == $count_null) {
- $db->query("ALTER TABLE {items} DROP COLUMN `captured`");
- }
- }
- module::set_version("gallery", $version = 13);
- }
}
static function uninstall() {
diff --git a/modules/gallery/module.info b/modules/gallery/module.info
index 65a0691c..70bd91e2 100644
--- a/modules/gallery/module.info
+++ b/modules/gallery/module.info
@@ -1,3 +1,3 @@
name = "Gallery 3"
description = "Gallery core application"
-version = 13
+version = 12