X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Memories%2FTag.pm;h=3354489cc661d3a15c9738dddb0687a7fecd669a;hb=857662436716c74a68a28b32aa55f2a468a0e4d2;hp=744a98a089e49af7da5fff6192c99f4cf7865a7f;hpb=7d238800e0117998a191d02f398fec1b7b879277;p=memories.git diff --git a/Memories/Tag.pm b/Memories/Tag.pm index 744a98a..3354489 100644 --- a/Memories/Tag.pm +++ b/Memories/Tag.pm @@ -74,22 +74,8 @@ sub list_js :Exported { package Memories::Tagging; use base qw(Memories::DBI); -use Class::DBI::Pager; -__PACKAGE__->columns(TEMP => qw/count/); -__PACKAGE__->columns(Essential => qw/id tag photo/); -__PACKAGE__->set_sql(summary => qq/ -SELECT id, tag, count(*) AS count -FROM tagging -GROUP BY tag -ORDER BY count DESC -LIMIT 75 - /); -__PACKAGE__->set_sql(all => qq/ -SELECT id, tag, count(*) AS count -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 @@ -98,12 +84,4 @@ GROUP BY tag ORDER BY count DESC /); -Memories::Tagging->has_a("photo" => "Memories::Photo"); -Memories::Tagging->has_a("tag" => "Memories::Tag"); - -Memories::Photo->has_many(tags => ["Memories::Tagging" => "tag"]); -Memories::Photo->has_many(taggings => "Memories::Tagging"); -Memories::Tag->has_many(photos => ["Memories::Tagging" => "photo"] ); -Memories::Tag->has_many(taggings => "Memories::Tagging"); - 1;