Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Commit c5c993c

Browse files
authored
Update overview.php
1 parent b8e77f0 commit c5c993c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/overview.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ function setModalText(iter, title, text, authorlink, photolink) {
261261
<div class="chart">
262262
<?php
263263
$refresh = $config['RECORDING_LENGTH'];
264+
$dividedrefresh = $refresh/4;
265+
if($dividedrefresh == 0) {
266+
$dividedrefresh = 1;
267+
}
264268
$time = time();
265269
if (file_exists('./Charts/'.$chart)) {
266270
echo "<img id='chart' src=\"/Charts/$chart?nocache=$time\">";
@@ -332,7 +336,7 @@ function refreshTopTen() {
332336
// image or audio didn't load for some reason, force a refresh in 5 seconds
333337
loadDetectionIfNewExists();
334338
}
335-
}, <?php echo intval($refresh/4); ?>*1000);
339+
}, <?php echo intval($dividedrefresh); ?>*1000);
336340

337341
function loadFiveMostRecentDetections() {
338342
const xhttp = new XMLHttpRequest();

0 commit comments

Comments
 (0)