1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-02 19:59:13 +00:00

wip: initial for config object

This commit is contained in:
Andrew Dolgov
2021-02-22 21:47:48 +03:00
parent 42173386b3
commit e4107ac952
30 changed files with 165 additions and 199 deletions

View File

@@ -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))