Changeset 928 for trunk/FluidApp
- Timestamp:
- 08/03/08 05:25:03 (16 months ago)
- Location:
- trunk/FluidApp
- Files:
-
- 2 modified
-
mt-static/plugins/FluidApp/fluid.js (modified) (2 diffs)
-
plugins/FluidApp/lib/FluidApp/Plugin.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/FluidApp/mt-static/plugins/FluidApp/fluid.js
r926 r928 1 1 (function () { 2 var DEBUG = 1;2 var DEBUG = 0; 3 3 if (typeof fluid == 'undefined') return; 4 4 … … 34 34 'arguments': { 35 35 '__mode' : 'fluid_update', 36 'blog_id' : 3,37 36 'since' : (lastQuery == undefined ? '' : lastQuery) 38 37 } -
trunk/FluidApp/plugins/FluidApp/lib/FluidApp/Plugin.pm
r926 r928 18 18 my $app = shift; 19 19 my $q = $app->{query}; 20 my $blog = $app->blog;21 20 require MT::Comment; 22 21 my $now = time; … … 24 23 my @growls; 25 24 if ($q->param('since') && $q->param('since') ne '') { 26 my @comments = MT::Comment->load({ created_on => { ">=" => $q->param('since') }, junk_status => 1, blog_id => $blog->id,},25 my @comments = MT::Comment->load({ created_on => { ">=" => $q->param('since') }, junk_status => 1, }, 27 26 { limit => 10, sort => "created_on" }); 28 27 foreach my $c (@comments) { 29 28 if ($c->visible) { 30 push @growls, { title => "New Comment", description => sprintf("%s posted a comment",$c->author) }; 29 push @growls, { title => sprintf("New Comment"), 30 description => sprintf("%s posted a comment on %s",$c->author,$c->blog->name), 31 blog_id => $c->blog->id }; 31 32 } else { 32 push @growls, { title => "New Comment", description => sprintf("A comment from %s is being held for moderation",$c->author) }; 33 push @growls, { title => sprintf("New Comment on %s",$c->blog->name), 34 description => sprintf("A comment from %s is being held for moderation on %s",$c->author,$c->blog->name), 35 blog_id => $c->blog->id }; 33 36 } 34 37 } 35 38 } 36 my $count = MT::Comment->count({ visible => 0, junk_status => 1, blog_id => $blog->id,});39 my $count = MT::Comment->count({ visible => 0, junk_status => 1, }); 37 40 return $app->json_result({ 38 41 label => 'Comments in moderation',
