Browse Source

Update functions.php

pull/674/head
danpros 1 year ago
parent
commit
060339d726
1 changed files with 11 additions and 9 deletions
  1. +11
    -9
      system/includes/functions.php

+ 11
- 9
system/includes/functions.php View File

@ -2668,16 +2668,18 @@ function not_found($request = null)
$layout = '';
}
if (!is_null($request)) {
$filename = "content/data/views.json";
$views = array();
if (file_exists($filename)) {
$views = json_decode(file_get_contents($filename), true);
}
if (isset($views[$request])) {
unset($views[$request]);
if (config('views.counter') == 'true') {
if (!is_null($request)) {
$filename = "content/data/views.json";
$views = array();
if (file_exists($filename)) {
$views = json_decode(file_get_contents($filename), true);
}
if (isset($views[$request])) {
unset($views[$request]);
}
save_json_pretty($filename, $views);
}
save_json_pretty($filename, $views);
}
header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");


Loading…
Cancel
Save