housecleaning
This commit is contained in:
parent
ebdc8790e2
commit
dc6ef77754
|
@ -9,7 +9,6 @@ use List::Util qw{shuffle};
|
|||
use Regexp::Common qw{URI};
|
||||
use Number::Format qw{format_number};
|
||||
use WebService::Discord::Webhook;
|
||||
#use Data::Dumper; # Uncomment for debugging
|
||||
|
||||
# Load the model
|
||||
use lib 'lib';
|
||||
|
@ -19,7 +18,7 @@ use GuestbookNg::Model::Counter;
|
|||
# Plugins
|
||||
plugin 'Config';
|
||||
plugin 'TagHelpers::Pagination';
|
||||
plugin AssetPack => {pipes => [qw{Css JavaScript Combine}]};
|
||||
plugin AssetPack => {pipes => [qw{Css Combine}]};
|
||||
|
||||
# Helpers
|
||||
helper pg => sub {
|
||||
|
|
|
@ -4,10 +4,6 @@ use Mojo::Base -base, -signatures;
|
|||
|
||||
has 'pg';
|
||||
|
||||
sub new($class, $pg, $pg_object) {
|
||||
bless {$pg => $pg_object}, $class
|
||||
}
|
||||
|
||||
sub get_visitor_count($self) {
|
||||
$self->pg->db->query(<<~'END_SQL')->text()
|
||||
SELECT counter_value
|
||||
|
|
|
@ -4,13 +4,6 @@ use Mojo::Base -base, -signatures;
|
|||
|
||||
has 'pg';
|
||||
|
||||
sub new($class, $pg, $pg_object) {
|
||||
bless {
|
||||
$pg => $pg_object,
|
||||
max_posts => 5
|
||||
}, $class
|
||||
}
|
||||
|
||||
sub get_posts($self, $this_page = undef) {
|
||||
if ($this_page) {
|
||||
my $row_count = $self->{'max_posts'};
|
||||
|
|
Loading…
Reference in a new issue