mirror of
https://framagit.org/fiat-tux/hat-softwares/lutim.git
synced 2026-07-07 02:11:06 +02:00
Disable images' counter option
This commit is contained in:
@@ -55,6 +55,7 @@ sub startup {
|
||||
},
|
||||
cache_max_size => 0,
|
||||
quiet_logs => 0,
|
||||
disable_img_stats => 0,
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+12
-8
@@ -629,10 +629,12 @@ sub short {
|
||||
$c->app->log->info('[VIEW] someone viewed '.$image->filename.' (path: '.$image->path.')') unless $c->config('quiet_logs');
|
||||
|
||||
# Update record
|
||||
if ($c->config('minion')->{enabled}) {
|
||||
$c->app->minion->enqueue(accessed => [$image->short, time]);
|
||||
} else {
|
||||
$image->accessed(time);
|
||||
unless ($c->config('disable_img_stats')) {
|
||||
if ($c->config('minion')->{enabled}) {
|
||||
$c->app->minion->enqueue(accessed => [$image->short, time]);
|
||||
} else {
|
||||
$image->accessed(time);
|
||||
}
|
||||
}
|
||||
|
||||
# Delete image if needed
|
||||
@@ -731,10 +733,12 @@ sub zip {
|
||||
$c->app->log->info('[VIEW] someone viewed '.$image->filename.' (path: '.$image->path.')') unless $c->config('quiet_logs');
|
||||
|
||||
# Update counter and record
|
||||
if ($c->config('minion')->{enabled}) {
|
||||
$c->app->minion->enqueue(accessed => [$image->short, time]);
|
||||
} else {
|
||||
$image->accessed(time);
|
||||
unless ($c->config('disable_img_stats')) {
|
||||
if ($c->config('minion')->{enabled}) {
|
||||
$c->app->minion->enqueue(accessed => [$image->short, time]);
|
||||
} else {
|
||||
$image->accessed(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif ($image->path && !$image->enabled) {
|
||||
|
||||
@@ -48,6 +48,7 @@ sub startup {
|
||||
},
|
||||
cache_max_size => 0,
|
||||
quiet_logs => 0,
|
||||
disable_img_stats => 0,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user