]> git.decadent.org.uk Git - memories.git/blobdiff - Memories/Tag.pm
Merge commit 'Memories as 1.3'
[memories.git] / Memories / Tag.pm
index e1afdd2f544715c613c9e7a44742c04084055ed0..1140185a307e45e07b328e919a463c9d4120c802 100644 (file)
@@ -38,6 +38,7 @@ sub view :Exported {
         $r->{template_args}{photos} =
             [$pager->search_sorted_by_tag($tag->id)];
     }
+    $r->last_search();
 }
 
 sub multi_search {
@@ -90,6 +91,14 @@ FROM tagging
 GROUP BY tag
 ORDER BY count DESC
     /);
+__PACKAGE__->set_sql(user_summary => qq/
+SELECT  tagging.id id, tag, count(*) AS count
+FROM tagging, photo
+WHERE tagging.photo = photo.id AND photo.uploader = ?
+GROUP BY tag
+ORDER BY count DESC
+/);
+
 Memories::Tagging->has_a("photo" => "Memories::Photo");
 Memories::Tagging->has_a("tag" => "Memories::Tag");