CoreLibs update

This commit is contained in:
Clemens Schwaighofer
2023-03-13 09:30:32 +09:00
parent 2aab94a842
commit 7be8bb06c9
6 changed files with 63 additions and 77 deletions

View File

@@ -135,17 +135,19 @@ $smarty->DATA['checkbox_test_pos_selected'] = ['0', '-1'];
$smarty->setSmartyVarsAdmin( $smarty->setSmartyVarsAdmin(
BASE . TEMPLATES_C, [
BASE . CACHE, 'compile_dir' => BASE . TEMPLATES_C,
CSS, 'cache_dir' => BASE . CACHE,
FONT, 'js' => JS,
JS, 'css' => CSS,
DEFAULT_ENCODING, 'font' => FONT,
G_TITLE, 'g_title' => G_TITLE,
ADMIN_STYLESHEET, 'default_encoding' => DEFAULT_ENCODING,
ADMIN_JAVASCRIPT, 'admin_stylesheet' => ADMIN_STYLESHEET,
PAGE_WIDTH, 'admin_javascript' => ADMIN_JAVASCRIPT,
$_SESSION['USER_NAME'] ?? '' 'page_width' => PAGE_WIDTH,
'user_name' => $_SESSION['USER_NAME'] ?? ''
]
); );
// error message // error message

2
www/composer.lock generated
View File

@@ -12,7 +12,7 @@
"dist": { "dist": {
"type": "path", "type": "path",
"url": "/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All", "url": "/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All",
"reference": "cf196d56ddcc38567112c7d933340349036ee3fa" "reference": "583edbfe0a2220c2257017379139eb6b40fd1cf1"
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.1"

View File

@@ -7,7 +7,7 @@
"dist": { "dist": {
"type": "path", "type": "path",
"url": "/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All", "url": "/storage/var/www/html/developers/clemens/core_data/composer-packages/CoreLibs-Composer-All",
"reference": "cf196d56ddcc38567112c7d933340349036ee3fa" "reference": "583edbfe0a2220c2257017379139eb6b40fd1cf1"
}, },
"require": { "require": {
"php": ">=8.1" "php": ">=8.1"

View File

@@ -13,7 +13,7 @@
'egrajp/corelibs-composer-all' => array( 'egrajp/corelibs-composer-all' => array(
'pretty_version' => 'dev-development', 'pretty_version' => 'dev-development',
'version' => 'dev-development', 'version' => 'dev-development',
'reference' => 'cf196d56ddcc38567112c7d933340349036ee3fa', 'reference' => '583edbfe0a2220c2257017379139eb6b40fd1cf1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../egrajp/corelibs-composer-all', 'install_path' => __DIR__ . '/../egrajp/corelibs-composer-all',
'aliases' => array(), 'aliases' => array(),

View File

@@ -1 +1 @@
8.0.4 8.0.5

View File

@@ -452,96 +452,80 @@ class SmartyExtend extends \Smarty
* wrapper call for setSmartyVars * wrapper call for setSmartyVars
* this is for frontend type and will not set any only admin needed variables * this is for frontend type and will not set any only admin needed variables
* *
* @param string|null $compile_dir BASE . TEMPLATES_C * @param array<string,string> $options list with the following value:
* @param string|null $cache_dir BASE . CACHE * compile_dir :BASE . TEMPLATES_C
* @param string|null $set_js JS * cache_dir :BASE . CACHE
* @param string|null $set_css CSS * js :JS
* @param string|null $set_font FONT * css :CSS
* @param string|null $set_default_encoding DEFAULT_ENCODING * font :FONT
* @param string|null $set_g_title G_TITLE * default_encoding :DEFAULT_ENCODING
* @param string|null $set_stylesheet STYLESHEET * g_title :G_TITLE
* @param string|null $set_javascript JAVASCRIPT * stylesheet :STYLESHEET
* javascript :JAVASCRIPT
* @param \CoreLibs\Admin\Backend|null $cms Optinal Admin Backend for * @param \CoreLibs\Admin\Backend|null $cms Optinal Admin Backend for
* smarty variables merge * smarty variables merge
* @return void * @return void
*/ */
public function setSmartyVarsFrontend( public function setSmartyVarsFrontend(
?string $compile_dir = null, array $options,
?string $cache_dir = null, ?\CoreLibs\Admin\Backend $cms
?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
): void { ): void {
$this->setSmartyVars( $this->setSmartyVars(
false, false,
$cms, $cms,
$compile_dir, $options['compile_dir'] ?? null,
$cache_dir, $options['cache_dir'] ?? null,
$set_js, $options['js'] ?? null,
$set_css, $options['css'] ?? null,
$set_font, $options['font'] ?? null,
$set_default_encoding, $options['default_encoding'] ?? null,
$set_g_title, $options['g_title'] ?? null,
null, null,
null, null,
null, null,
null, null,
$set_stylesheet, $options['stylesheet'] ?? null,
$set_javascript $options['javascript'] ?? null
); );
} }
/** /**
* wrapper call for setSmartyVars * wrapper call for setSmartyVars
* this is only for admin interface and will set additional variables * this is only for admin interface and will set additional variables
* @param string|null $compile_dir BASE . TEMPLATES_C * @param array<string,string> $options list with the following value:
* @param string|null $cache_dir BASE . CACHE * compile_dir :BASE . TEMPLATES_C
* @param string|null $set_js JS * cache_dir :BASE . CACHE
* @param string|null $set_css CSS * js :JS
* @param string|null $set_font FONT * css :CSS
* @param string|null $set_default_encoding DEFAULT_ENCODING * font :FONT
* @param string|null $set_g_title G_TITLE * default_encoding :DEFAULT_ENCODING
* @param string|null $set_admin_stylesheet ADMIN_STYLESHEET * g_title :G_TITLE
* @param string|null $set_admin_javascript ADMIN_JAVASCRIPT * admin_stylesheet :ADMIN_STYLESHEET
* @param string|null $set_page_width PAGE_WIDTH * admin_javascript :ADMIN_JAVASCRIPT
* @param string|null $set_user_name _SESSION['USER_NAME'] * page_width :PAGE_WIDTH
* user_name :_SESSION['USER_NAME']
* @param \CoreLibs\Admin\Backend|null $cms Optinal Admin Backend for * @param \CoreLibs\Admin\Backend|null $cms Optinal Admin Backend for
* smarty variables merge * smarty variables merge
* @return void * @return void
*/ */
public function setSmartyVarsAdmin( public function setSmartyVarsAdmin(
?string $compile_dir = null, array $options,
?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,
?\CoreLibs\Admin\Backend $cms = null ?\CoreLibs\Admin\Backend $cms = null
): void { ): void {
$this->setSmartyVars( $this->setSmartyVars(
true, true,
$cms, $cms,
$compile_dir, $options['compile_dir'] ?? null,
$cache_dir, $options['cache_dir'] ?? null,
$set_js, $options['js'] ?? null,
$set_css, $options['css'] ?? null,
$set_font, $options['font'] ?? null,
$set_g_title, $options['g_title'] ?? null,
$set_default_encoding, $options['default_encoding'] ?? null,
$set_admin_stylesheet, $options['admin_stylesheet'] ?? null,
$set_admin_javascript, $options['admin_javascript'] ?? null,
$set_page_width, $options['page_width'] ?? null,
$set_user_name, $options['user_name'] ?? null,
null, null,
null null
); );
@@ -565,9 +549,9 @@ class SmartyExtend extends \Smarty
* @param string|null $set_admin_stylesheet ADMIN_STYLESHEET * @param string|null $set_admin_stylesheet ADMIN_STYLESHEET
* @param string|null $set_admin_javascript ADMIN_JAVASCRIPT * @param string|null $set_admin_javascript ADMIN_JAVASCRIPT
* @param string|null $set_page_width PAGE_WIDTH * @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_stylesheet STYLESHEET
* @param string|null $set_javascript JAVASCRIPT * @param string|null $set_javascript JAVASCRIPT
* @param string|null $set_user_name _SESSION['USER_NAME']
* @return void * @return void
*/ */
private function setSmartyVars( private function setSmartyVars(