update 2023-02-13

This commit is contained in:
2023-02-13 16:55:11 +07:00
parent 36a32e0165
commit 7f00f39f1f
34 changed files with 372 additions and 19305 deletions
+4 -4
View File
@@ -3,7 +3,7 @@
/*******************************************************************
Module : /Data/Cache.php
Desc. : v4 - Class cache aplikasi
Desc. : v3 - Class cache aplikasi
Created By : Siau Pheng ([email protected]).
Created Date : March 16th, 2008.
Last Modified : May 8th, 2021.
@@ -14,7 +14,7 @@
declare(strict_types=1);
namespace siaupheng\fonia4\Data;
namespace siaupheng\fonia3\Data;
use MatthiasMullie\Minify;
@@ -31,7 +31,7 @@ final class Cache {
public function __construct($db = null){
if (is_resource($db)) { $this->__db = $db; }
else $this->__db = new \siaupheng\fonia4\DB\MySQL();
else $this->__db = new \siaupheng\fonia3\DB\MySQL();
$rootdir = $_SESSION['__WEB_APP']['REAL_PATH'];
$this->__cachedir = $rootdir . 'cache/';
@@ -162,7 +162,7 @@ final class Cache {
}
public function Main($type="css") {
$mode = (isset($_SESSION['__WEB_USER']) && is_array($_SESSION['__WEB_USER']) && $_SESSION['__WEB_USER']['UserID']>0) ? "index" : "login";
$mode = (($_SESSION['__WEB_USER']['UserID'] ?? 0) > 0) ? "index" : "login";
$afile = $this->gen_file($type, $mode);
$lastmod = $this->check_file($afile);
if ($lastmod <> intval($this->__ini[$type][$mode.'_stamp']) || !file_exists($this->__cachedir . $this->__ini[$type][$mode.'_file'])) {