Fixing expiration and js warning.
This commit is contained in:
parent
010bd1840d
commit
1b90285833
@ -59,8 +59,10 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
executeAndroidExclusiveCode(Android)
|
executeAndroidExclusiveCode(Android)
|
||||||
}
|
}
|
||||||
searchMobile = document.querySelector('nav.mobile-shortcuts div.search')
|
searchMobile = document.querySelector('nav.mobile-shortcuts div.search')
|
||||||
|
if (searchMobile !== null) {
|
||||||
fakeSearchInput = searchMobile.querySelector('input')
|
fakeSearchInput = searchMobile.querySelector('input')
|
||||||
addListenersSearch()
|
addListenersSearch()
|
||||||
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
function fillFarmaciaGuardia() {
|
function fillFarmaciaGuardia() {
|
||||||
|
@ -18,6 +18,7 @@ use Crypt::Bcrypt qw/bcrypt bcrypt_check/;
|
|||||||
my $tracking;
|
my $tracking;
|
||||||
|
|
||||||
my $iso8601 = DateTime::Format::ISO8601->new;
|
my $iso8601 = DateTime::Format::ISO8601->new;
|
||||||
|
|
||||||
sub request {
|
sub request {
|
||||||
shift;
|
shift;
|
||||||
eval {
|
eval {
|
||||||
@ -40,12 +41,17 @@ sub stats {
|
|||||||
$self->render( text => 'You must login', status => 302 );
|
$self->render( text => 'You must login', status => 302 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$self->session( expiration => 0 );
|
||||||
my $data = $tracking->get_global_data($self);
|
my $data = $tracking->get_global_data($self);
|
||||||
my $data_per_url = $tracking->get_data_for_urls($self);
|
my $data_per_url = $tracking->get_data_for_urls($self);
|
||||||
my $google_data = $tracking->get_google_data($self);
|
my $google_data = $tracking->get_google_data($self);
|
||||||
$self->_filter_data_per_url($data_per_url);
|
$self->_filter_data_per_url($data_per_url);
|
||||||
$self->_filter_data_per_url($google_data);
|
$self->_filter_data_per_url($google_data);
|
||||||
$self->render(tracking_data => $data, tracking_by_url => $data_per_url, google_data => $google_data);
|
$self->render(
|
||||||
|
tracking_data => $data,
|
||||||
|
tracking_by_url => $data_per_url,
|
||||||
|
google_data => $google_data
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _filter_data_per_url ( $self, $data_per_url ) {
|
sub _filter_data_per_url ( $self, $data_per_url ) {
|
||||||
@ -106,9 +112,7 @@ sub valid_login {
|
|||||||
|
|
||||||
my ($date_text) = $login_cookie =~ /^date_end_login:(.*)$/;
|
my ($date_text) = $login_cookie =~ /^date_end_login:(.*)$/;
|
||||||
my $date;
|
my $date;
|
||||||
eval {
|
eval { $date = $iso8601->parse_datetime($date_text); };
|
||||||
$date = $iso8601->parse_datetime($date_text);
|
|
||||||
};
|
|
||||||
if ($@) {
|
if ($@) {
|
||||||
warn "Bad date in cookie $login_cookie.";
|
warn "Bad date in cookie $login_cookie.";
|
||||||
return;
|
return;
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user