From dc70a49f52e85de5b16ea07bc4f673f1407f5cb0 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 1 Mar 2024 13:44:46 +0700 Subject: [PATCH] upload path --- system/boot.php | 6 +++--- system/controllers/settings.php | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/system/boot.php b/system/boot.php index 9dc14843..c766baf5 100644 --- a/system/boot.php +++ b/system/boot.php @@ -78,9 +78,9 @@ $ui->assign('_domain', str_replace('www.', '', parse_url(APP_URL, PHP_URL_HOST)) $ui->assign('_url', APP_URL . '/index.php?_route='); $ui->assign('_path', __DIR__); $ui->assign('_c', $config); -$ui->assign('UPLOAD_PATH', $UPLOAD_PATH); -$ui->assign('CACHE_PATH', $CACHE_PATH); -$ui->assign('PAGES_PATH', $PAGES_PATH); +$ui->assign('UPLOAD_PATH', str_replace($root_path, '', $UPLOAD_PATH)); +$ui->assign('CACHE_PATH', str_replace($root_path, '', $CACHE_PATH)); +$ui->assign('PAGES_PATH', str_replace($root_path, '', $PAGES_PATH)); $ui->assign('_system_menu', 'dashboard'); function _msglog($type, $msg) diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 40e476d9..0fc790c6 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -31,7 +31,6 @@ switch ($action) { } $UPLOAD_URL_PATH = str_replace($root_path,'', $UPLOAD_PATH); - if (file_exists($UPLOAD_PATH . DIRECTORY_SEPARATOR . 'logo.png')) { $logo = $UPLOAD_URL_PATH . DIRECTORY_SEPARATOR . 'logo.png?' . time(); } else {