Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace env value parser lib + smarty clear cache fixes #1201

Merged
merged 2 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@
"narrowspark/http-emitter": "^1.0",
"old-xoops-libraries/php-downloader": "1.*",
"php-console/php-console": "^3.1",
"phpexperts/laravel-env-polyfill": "^1.0",
"phpmailer/phpmailer": "^6.0.7",
"phpseclib/bcmath_compat": "^2.0",
"silinternational/php-env": "^2.1",
"simplepie/simplepie": "^1.5",
"smarty/smarty": "^4.0",
"smottt/wideimage": "^v1.1.3",
Expand Down Expand Up @@ -130,9 +130,9 @@
},
"files": [
"include/version.php",
"include/functions.php",
"include/constants.php",
"include/deprecated_constants.php",
"include/functions.php",
"include/cp_functions.php"
]
},
Expand Down
62 changes: 50 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function execute(Module $module, OutputDecorator $output, ...$params): bo
if (is_array($deltpl)) {
$xoopsDelTpl = new Template();
// clear cache files
$xoopsDelTpl->clear_cache(null, 'mod_' . $module->dirname);
$xoopsDelTpl->clearCache(null, 'mod_' . $module->dirname);
MekDrop marked this conversation as resolved.
Show resolved Hide resolved
// delete template file entry in db
$dcount = count($deltpl);
for ($i = 0; $i < $dcount; $i++) {
Expand Down
2 changes: 1 addition & 1 deletion core/View/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public static function template_clear_module_cache($mid)
$tpl->caching = 2;
for ($i = 0; $i < $count; $i++) {
if ($block_arr[$i]->template != '') {
$tpl->clear_cache('db:' . $block_arr[$i]->template, 'blk_' . $block_arr[$i]->bid);
$tpl->clearCache('db:' . $block_arr[$i]->template, 'blk_' . $block_arr[$i]->bid);
MekDrop marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
use ImpressCMS\Core\DataFilter;
use ImpressCMS\Core\Response\RedirectResponse;
use ImpressCMS\Core\Response\ViewResponse;
use Sil\PhpEnv\Env;

if (!function_exists('env')) {
function env(string $key, $defaultValue = null)
{
return Env::get($key, $defaultValue);
MekDrop marked this conversation as resolved.
Show resolved Hide resolved
MekDrop marked this conversation as resolved.
Show resolved Hide resolved
}
}

if (!function_exists('xoops_header')) {
/**
Expand Down