From 7be8bb06c9594de11566b5e44b45b1a07a864ed0 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Mon, 13 Mar 2023 09:30:32 +0900 Subject: [PATCH] CoreLibs update --- www/admin/class_test.smarty.php | 24 ++-- www/composer.lock | 2 +- www/vendor/composer/installed.json | 2 +- www/vendor/composer/installed.php | 2 +- .../publish/last.published | 2 +- .../src/Template/SmartyExtend.php | 108 ++++++++---------- 6 files changed, 63 insertions(+), 77 deletions(-) diff --git a/www/admin/class_test.smarty.php b/www/admin/class_test.smarty.php index ba96eaa7..ebe095a4 100644 --- a/www/admin/class_test.smarty.php +++ b/www/admin/class_test.smarty.php @@ -135,17 +135,19 @@ $smarty->DATA['checkbox_test_pos_selected'] = ['0', '-1']; $smarty->setSmartyVarsAdmin( - BASE . TEMPLATES_C, - BASE . CACHE, - CSS, - FONT, - JS, - DEFAULT_ENCODING, - G_TITLE, - ADMIN_STYLESHEET, - ADMIN_JAVASCRIPT, - PAGE_WIDTH, - $_SESSION['USER_NAME'] ?? '' + [ + 'compile_dir' => BASE . TEMPLATES_C, + 'cache_dir' => BASE . CACHE, + 'js' => JS, + 'css' => CSS, + 'font' => FONT, + 'g_title' => G_TITLE, + 'default_encoding' => DEFAULT_ENCODING, + 'admin_stylesheet' => ADMIN_STYLESHEET, + 'admin_javascript' => ADMIN_JAVASCRIPT, + 'page_width' => PAGE_WIDTH, + 'user_name' => $_SESSION['USER_NAME'] ?? '' + ] ); // error message diff --git a/www/composer.lock b/www/composer.lock index c73b9743..1b5f9d1c 100644 --- a/www/composer.lock +++ b/www/composer.lock @@ -12,7 +12,7 @@ "dist": { "type": "path", "url": "/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All", - "reference": "cf196d56ddcc38567112c7d933340349036ee3fa" + "reference": "583edbfe0a2220c2257017379139eb6b40fd1cf1" }, "require": { "php": ">=8.1" diff --git a/www/vendor/composer/installed.json b/www/vendor/composer/installed.json index a3b12dde..82a7feb6 100644 --- a/www/vendor/composer/installed.json +++ b/www/vendor/composer/installed.json @@ -7,7 +7,7 @@ "dist": { "type": "path", "url": "/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All", - "reference": "cf196d56ddcc38567112c7d933340349036ee3fa" + "reference": "583edbfe0a2220c2257017379139eb6b40fd1cf1" }, "require": { "php": ">=8.1" diff --git a/www/vendor/composer/installed.php b/www/vendor/composer/installed.php index f63e7fe1..c2ef2c55 100644 --- a/www/vendor/composer/installed.php +++ b/www/vendor/composer/installed.php @@ -13,7 +13,7 @@ 'egrajp/corelibs-composer-all' => array( 'pretty_version' => 'dev-development', 'version' => 'dev-development', - 'reference' => 'cf196d56ddcc38567112c7d933340349036ee3fa', + 'reference' => '583edbfe0a2220c2257017379139eb6b40fd1cf1', 'type' => 'library', 'install_path' => __DIR__ . '/../egrajp/corelibs-composer-all', 'aliases' => array(), diff --git a/www/vendor/egrajp/corelibs-composer-all/publish/last.published b/www/vendor/egrajp/corelibs-composer-all/publish/last.published index 50c496d2..904be6d4 100644 --- a/www/vendor/egrajp/corelibs-composer-all/publish/last.published +++ b/www/vendor/egrajp/corelibs-composer-all/publish/last.published @@ -1 +1 @@ -8.0.4 +8.0.5 diff --git a/www/vendor/egrajp/corelibs-composer-all/src/Template/SmartyExtend.php b/www/vendor/egrajp/corelibs-composer-all/src/Template/SmartyExtend.php index a2a08010..093bd830 100644 --- a/www/vendor/egrajp/corelibs-composer-all/src/Template/SmartyExtend.php +++ b/www/vendor/egrajp/corelibs-composer-all/src/Template/SmartyExtend.php @@ -452,96 +452,80 @@ class SmartyExtend extends \Smarty * wrapper call for setSmartyVars * this is for frontend type and will not set any only admin needed variables * - * @param string|null $compile_dir BASE . TEMPLATES_C - * @param string|null $cache_dir BASE . CACHE - * @param string|null $set_js JS - * @param string|null $set_css CSS - * @param string|null $set_font FONT - * @param string|null $set_default_encoding DEFAULT_ENCODING - * @param string|null $set_g_title G_TITLE - * @param string|null $set_stylesheet STYLESHEET - * @param string|null $set_javascript JAVASCRIPT + * @param array $options list with the following value: + * compile_dir :BASE . TEMPLATES_C + * cache_dir :BASE . CACHE + * js :JS + * css :CSS + * font :FONT + * default_encoding :DEFAULT_ENCODING + * g_title :G_TITLE + * stylesheet :STYLESHEET + * javascript :JAVASCRIPT * @param \CoreLibs\Admin\Backend|null $cms Optinal Admin Backend for * smarty variables merge * @return void */ public function setSmartyVarsFrontend( - ?string $compile_dir = null, - ?string $cache_dir = null, - ?string $set_js = null, - ?string $set_css = null, - ?string $set_font = null, - ?string $set_default_encoding = null, - ?string $set_g_title = null, - ?string $set_stylesheet = null, - ?string $set_javascript = null, - ?\CoreLibs\Admin\Backend $cms = null + array $options, + ?\CoreLibs\Admin\Backend $cms ): void { $this->setSmartyVars( false, $cms, - $compile_dir, - $cache_dir, - $set_js, - $set_css, - $set_font, - $set_default_encoding, - $set_g_title, + $options['compile_dir'] ?? null, + $options['cache_dir'] ?? null, + $options['js'] ?? null, + $options['css'] ?? null, + $options['font'] ?? null, + $options['default_encoding'] ?? null, + $options['g_title'] ?? null, null, null, null, null, - $set_stylesheet, - $set_javascript + $options['stylesheet'] ?? null, + $options['javascript'] ?? null ); } /** * wrapper call for setSmartyVars * this is only for admin interface and will set additional variables - * @param string|null $compile_dir BASE . TEMPLATES_C - * @param string|null $cache_dir BASE . CACHE - * @param string|null $set_js JS - * @param string|null $set_css CSS - * @param string|null $set_font FONT - * @param string|null $set_default_encoding DEFAULT_ENCODING - * @param string|null $set_g_title G_TITLE - * @param string|null $set_admin_stylesheet ADMIN_STYLESHEET - * @param string|null $set_admin_javascript ADMIN_JAVASCRIPT - * @param string|null $set_page_width PAGE_WIDTH - * @param string|null $set_user_name _SESSION['USER_NAME'] + * @param array $options list with the following value: + * compile_dir :BASE . TEMPLATES_C + * cache_dir :BASE . CACHE + * js :JS + * css :CSS + * font :FONT + * default_encoding :DEFAULT_ENCODING + * g_title :G_TITLE + * admin_stylesheet :ADMIN_STYLESHEET + * admin_javascript :ADMIN_JAVASCRIPT + * page_width :PAGE_WIDTH + * user_name :_SESSION['USER_NAME'] * @param \CoreLibs\Admin\Backend|null $cms Optinal Admin Backend for * smarty variables merge * @return void */ public function setSmartyVarsAdmin( - ?string $compile_dir = null, - ?string $cache_dir = null, - ?string $set_js = null, - ?string $set_css = null, - ?string $set_font = null, - ?string $set_default_encoding = null, - ?string $set_g_title = null, - ?string $set_admin_stylesheet = null, - ?string $set_admin_javascript = null, - ?string $set_page_width = null, - ?string $set_user_name = null, + array $options, ?\CoreLibs\Admin\Backend $cms = null ): void { $this->setSmartyVars( true, $cms, - $compile_dir, - $cache_dir, - $set_js, - $set_css, - $set_font, - $set_g_title, - $set_default_encoding, - $set_admin_stylesheet, - $set_admin_javascript, - $set_page_width, - $set_user_name, + $options['compile_dir'] ?? null, + $options['cache_dir'] ?? null, + $options['js'] ?? null, + $options['css'] ?? null, + $options['font'] ?? null, + $options['g_title'] ?? null, + $options['default_encoding'] ?? null, + $options['admin_stylesheet'] ?? null, + $options['admin_javascript'] ?? null, + $options['page_width'] ?? null, + $options['user_name'] ?? null, null, null ); @@ -565,9 +549,9 @@ class SmartyExtend extends \Smarty * @param string|null $set_admin_stylesheet ADMIN_STYLESHEET * @param string|null $set_admin_javascript ADMIN_JAVASCRIPT * @param string|null $set_page_width PAGE_WIDTH + * @param string|null $set_user_name _SESSION['USER_NAME'] * @param string|null $set_stylesheet STYLESHEET * @param string|null $set_javascript JAVASCRIPT - * @param string|null $set_user_name _SESSION['USER_NAME'] * @return void */ private function setSmartyVars(