|
|
@ -58,6 +58,20 @@ sub register { |
|
|
|
$c->app->log->error($@); |
|
|
|
$c->app->log->error($@); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$app->helper(sid_by_name => sub { |
|
|
|
|
|
|
|
my ($c, $site) = @_; |
|
|
|
|
|
|
|
return $self->app->db->select('sites', 'id', {site => $site})->list; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$app->helper(pid_by_hash => sub { |
|
|
|
|
|
|
|
my ($c, $sid, $hash) = @_; |
|
|
|
|
|
|
|
return $self->app->db->select('pages', 'id', {sid => $sid, hash => $hash})->list; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$app->helper(comments_by_pid => sub { |
|
|
|
|
|
|
|
my ($c, $pid) = @_; |
|
|
|
|
|
|
|
return $self->app->db->select('comments', '*', {pid => $sid}, 'seq')->hashes; |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
1; |
|
|
|
1; |
|
|
|