Use __DIR__ instead of dirname(__FILE__) (#817)

This commit is contained in:
Raimondas Rimkevičius
2022-09-27 13:03:34 +03:00
committed by GitHub
parent 4550fc0339
commit 1b556c7077
152 changed files with 250 additions and 250 deletions
+2 -2
View File
@@ -210,7 +210,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
// copy the working dirs from application
$debObj->setCompileDir($smarty->getCompileDir());
// init properties by hand as user may have edited the original Smarty class
$debObj->setPluginsDir(is_dir(dirname(__FILE__) . '/../plugins') ? dirname(__FILE__) .
$debObj->setPluginsDir(is_dir(__DIR__ . '/../plugins') ? __DIR__ .
'/../plugins' : $smarty->getPluginsDir());
$debObj->force_compile = false;
$debObj->compile_check = Smarty::COMPILECHECK_ON;
@@ -221,7 +221,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$debObj->debugging_ctrl = 'NONE';
$debObj->error_reporting = E_ALL & ~E_NOTICE;
$debObj->debug_tpl =
isset($smarty->debug_tpl) ? $smarty->debug_tpl : 'file:' . dirname(__FILE__) . '/../debug.tpl';
isset($smarty->debug_tpl) ? $smarty->debug_tpl : 'file:' . __DIR__ . '/../debug.tpl';
$debObj->registered_plugins = array();
$debObj->registered_resources = array();
$debObj->registered_filters = array();