$r->{template_args}{photos} =
[$pager->search_sorted_by_tag($tag->id)];
}
+ $r->last_search();
}
sub multi_search {
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");