]> 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 6421b001b6f3a8eabc69f4347f60c2a4328aed79..2b16db2b71cc6435af34a4be89360eda88796963 100644 (file)
@@ -36,7 +36,6 @@ sub index : Local Path Args(0) {
 
 sub default : Path {
        my ( $self, $c ) = @_;
-       $c->res->body( 'Page not found' );
        $c->response->status(404);
 }
 
@@ -173,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,