]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Root.pm
Basic infrastructure for private messages/threads
[ndwebbie.git] / lib / NDWeb / Controller / Root.pm
index cda2e94f62f1f5d20958bf809ff7b9d640e3ce22..2b16db2b71cc6435af34a4be89360eda88796963 100644 (file)
@@ -172,7 +172,8 @@ sub end : ActionClass('RenderView') {
                        $fleetupdate = 0 unless defined $fleetupdate;
                }
 
-               my ($unread,$newposts) = $dbh->selectrow_array(unread_query,undef,$c->user->id) or die $dbh->errstr;
+               my ($unread,$newposts) = $dbh->selectrow_array(q{SELECT * FROM unread_posts($1)}
+                       ,undef,$c->user->id);
 
                $c->stash(user => {
                        id => $c->user->id,