fixes
This commit is contained in:
parent
ad21dca2f0
commit
b24c9fc884
6
core/app/cache/CacheEngine.php
vendored
6
core/app/cache/CacheEngine.php
vendored
@ -65,9 +65,11 @@
|
||||
}
|
||||
|
||||
public function initializeCache(bool $clear = true): int {
|
||||
$count = 0;
|
||||
if (!file_exists($this->path)) mkdir($this->path);
|
||||
elseif ($clear) return FileUtils::emptyDirectory($this->path);
|
||||
return 0;
|
||||
elseif ($clear) $count = FileUtils::emptyDirectory($this->path);
|
||||
$this->app->dispatcher->trigger("crispage.cache.initialize", $count);
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function createBucket(string $name): string {
|
||||
|
@ -99,7 +99,7 @@
|
||||
public function upload(array $file): ?Extension {
|
||||
$sn = FileUtils::sanitizeName($file["name"]);
|
||||
$time = time();
|
||||
$upath = ROOT . Config::TEMP_PATH . "/pkguploads/$time\_$sn";
|
||||
$upath = ROOT . Config::TEMP_PATH . "/pkguploads/{$time}_$sn";
|
||||
|
||||
if ($file["error"] != UPLOAD_ERR_OK) {
|
||||
$this->status = static::ERR_UPLOAD_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user