summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-05-21 01:31:29 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-05-21 01:31:29 +0000
commita9e3692027dc767b340242ed18fe7184cbfd883d (patch)
tree125e9d3cdb28c5acdd34e1bc15fe80df030bf8e7 /modules/tag/helpers
parentf24c8f66ea9673d812c882dd7db6fbe49bd01dfb (diff)
1) This provides the editting functionality for albums and photos in the
organize feature. 2) Remove the tag functionality at this point 3) Added a callback to handle validating conflicting names (only used by organize at this point. 4) Closes #231
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/tag_event.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index a13ae99c..735422b5 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -59,38 +59,4 @@ class tag_event_Core {
"SELECT `tag_id` from {items_tags} WHERE `item_id` = $item->id)");
$db->delete("items_tags", array("item_id" => "$item->id"));
}
-
- static function organize_form_creation($event_parms) {
- $v = new View("tag_organize.html");
- $v->tags = array();
-
- $ids = implode(", ", $event_parms->itemids);
- $db = Database::instance();
- $tags = $db->query("SELECT it.tag_id, t.name,
- COUNT(DISTINCT it.item_id) as item_count,
- UPPER(SUBSTR(t.name, 1, 1)) as first_letter
- FROM {items_tags} it, {tags} t
- WHERE it.tag_id = t.id
- AND it.item_id in($ids)
- GROUP BY it.tag_id
- ORDER BY first_letter ASC, t.name ASC");
- foreach ($tags as $tag) {
- $v->tags[$tag->first_letter]["taglist"][] =
- array("id" => $tag->tag_id, "tag" => $tag->name, "count" => $tag->item_count);
- }
- $v->tag_count = $tags->count();
-
- $letters = $db->query("SELECT COUNT(DISTINCT it.item_id) as letter_count,
- UPPER(SUBSTR(t.name, 1, 1)) as first_letter
- FROM {items_tags} it, {tags} t
- WHERE it.tag_id = t.id
- AND it.item_id in($ids)
- GROUP BY first_letter
- ORDER BY first_letter ASC");
- foreach ($letters as $letter) {
- $v->tags[$letter->first_letter]["count"] = $letter->letter_count;
- }
-
- $event_parms->panes[] = array("label" => t("Manage Tags"), "content" => $v);
- }
}