sub index : Local Path Args(0) {
my ( $self, $c ) = @_;
+
+ $c->res->redirect($c->uri_for('/wiki'));
}
sub default : Path {
$c->stash(dbh => $dbh);
+ $c->stash(sslurl => sub {
+ $_[0]->scheme('https') unless $c->debug;
+ return $_[0];
+ });
+
$dbh->do(q{SET timezone = 'GMT'});
$c->stash(TICK =>$dbh->selectrow_array('SELECT tick()',undef));
$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,