Fixed critical escaping bug in pagination plugin and made this a hard dependency
diff --git a/lib/Korap.pm b/lib/Korap.pm
index c57a63a..987d08b 100644
--- a/lib/Korap.pm
+++ b/lib/Korap.pm
@@ -1,12 +1,11 @@
package Korap;
use Mojo::Base 'Mojolicious';
-our $VERSION = '0.05';
+our $VERSION = '0.06';
# Start dev with
# morbo -w lib -w templates -w public/sass -w public/js -w public/css script/korap
-
# Start the application and register all routes and plugins
sub startup {
my $self = shift;
@@ -28,17 +27,17 @@
KorapSearch
KorapInfo
KorapTagHelpers
- /) {
+ /) {
+ # Oro::Account
+ # Oro::Account::ConfirmMail
$self->plugin($_);
};
- $self->plugin(AssetPack => {
- minify => 1
- });
-
+ $self->plugin(AssetPack => { minify => 1 });
$self->plugin('AssetPack::LibSass');
$self->plugin('MailException' => $self->config('MailException'));
+ # Add assets for AssetPack
$self->asset(
'korap.css' => (
'/sass/style.scss',
@@ -78,6 +77,14 @@
# Routes
my $r = $self->routes;
+ # User account management
+ # $r->route('/login')->acct('login');
+ # $r->route('/login/forgotten')->acct('forgotten');
+ # $r->route('/login/remove')->acct('remove');
+ # $r->route('/register')->acct('register');
+ # $r->route('/logout')->acct('logout');
+ # $r->route('/preferences')->acct('preferences');
+
# Base search route
$r->get('/')->to('search#remote')->name('index');
diff --git a/lib/Korap/Plugin/KorapSearch.pm b/lib/Korap/Plugin/KorapSearch.pm
index 89faeff..9950eec 100644
--- a/lib/Korap/Plugin/KorapSearch.pm
+++ b/lib/Korap/Plugin/KorapSearch.pm
@@ -165,7 +165,7 @@
};
if ($json->{totalResults} > -1) {
- $c->app->log->warn('Set total result from cache');
+ $c->app->log->warn('Cache total result');
$c->stash('search.totalResults' => $json->{totalResults});
$c->chi->set('total-' . $cache_url => $json->{totalResults}, '30min');
};
diff --git a/lib/Korap/Search.pm b/lib/Korap/Search.pm
index d3716ab..5918fd9 100644
--- a/lib/Korap/Search.pm
+++ b/lib/Korap/Search.pm
@@ -19,7 +19,7 @@
my $url = Mojo::URL->new($api)->path('search');
$url->query({
- q => scalar $c->param('q') // '',
+ q => scalar $c->param('q') // '',
ql => scalar $c->param('ql') // 'poliqarp'
});