summaryrefslogtreecommitdiff
path: root/classes/diskcache.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-22 21:47:48 +0300
committerAndrew Dolgov <[email protected]>2021-02-22 21:47:48 +0300
commite4107ac9520ca404d4ab49ef79ca74430e8fd772 (patch)
tree0d2d1e162ea9d5ed4e1f3bbb1dc2c29e494311fd /classes/diskcache.php
parent42173386b39bed4b06c5ac6c2fc0da510673b354 (diff)
wip: initial for config object
Diffstat (limited to 'classes/diskcache.php')
-rw-r--r--classes/diskcache.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/diskcache.php b/classes/diskcache.php
index 94f645f32..063a3847c 100644
--- a/classes/diskcache.php
+++ b/classes/diskcache.php
@@ -191,7 +191,7 @@ class DiskCache {
];
public function __construct($dir) {
- $this->dir = CACHE_DIR . "/" . basename(clean($dir));
+ $this->dir = Config::get(Config::CACHE_DIR) . "/" . basename(clean($dir));
}
public function get_dir() {
@@ -339,7 +339,7 @@ class DiskCache {
}
static function expire() {
- $dirs = array_filter(glob(CACHE_DIR . "/*"), "is_dir");
+ $dirs = array_filter(glob(Config::get(Config::CACHE_DIR) . "/*"), "is_dir");
foreach ($dirs as $cache_dir) {
$num_deleted = 0;
@@ -396,7 +396,7 @@ class DiskCache {
$tmppluginhost = new PluginHost();
- $tmppluginhost->load(PLUGINS, PluginHost::KIND_SYSTEM);
+ $tmppluginhost->load(Config::get(Config::PLUGINS), PluginHost::KIND_SYSTEM);
//$tmppluginhost->load_data();
if ($tmppluginhost->run_hooks_until(PluginHost::HOOK_SEND_LOCAL_FILE, true, $filename))