Skip to content
Closed
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 libs/sysplugins/smarty_internal_debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function display_debug($obj, $full = false)
// 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(__DIR__ . '/../plugins') ? __DIR__ . '/../plugins' : $smarty->getPluginsDir());
$debObj->setPluginsDir(is_dir(dirname(__FILE__) . '/../plugins') ? dirname(__FILE__) . '/../plugins' : $smarty->getPluginsDir());
$debObj->force_compile = false;
$debObj->compile_check = Smarty::COMPILECHECK_ON;
$debObj->left_delimiter = '{';
Expand All @@ -220,7 +220,7 @@ public function display_debug($obj, $full = false)
$debObj->debugging = false;
$debObj->debugging_ctrl = 'NONE';
$debObj->error_reporting = E_ALL & ~E_NOTICE;
$debObj->debug_tpl = isset($smarty->debug_tpl) ? $smarty->debug_tpl : 'file:' . __DIR__ . '/../debug.tpl';
$debObj->debug_tpl = isset($smarty->debug_tpl) ? $smarty->debug_tpl : 'file:' . dirname(__FILE__) . '/../debug.tpl';
$debObj->registered_plugins = array();
$debObj->registered_resources = array();
$debObj->registered_filters = array();
Expand Down
8 changes: 4 additions & 4 deletions utilities/BuildExpectedFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
* Time: 23:58
*/
$sysplugins = array();
$iterator = new DirectoryIterator(__DIR__ . '/../libs/sysplugins');
$iterator = new DirectoryIterator(dirname(__FILE__) . '/../libs/sysplugins');
foreach ($iterator as $file) {
if (!$file->isDot() && 'php' == $file->getExtension()) {
$filename = $file->getBasename();
$sysplugins[ $filename ] = true;
}
}
$plugins = array();
$iterator = new DirectoryIterator(__DIR__ . '/../libs/plugins');
$iterator = new DirectoryIterator(dirname(__FILE__) . '/../libs/plugins');
foreach ($iterator as $file) {
if (!$file->isDot() && 'php' == $file->getExtension()) {
$filename = $file->getBasename();
$plugins[ $filename ] = true;
}
}
$code = file_get_contents(__DIR__ . '/../libs/sysplugins/smarty_internal_testinstall.php');
$code = file_get_contents(dirname(__FILE__) . '/../libs/sysplugins/smarty_internal_testinstall.php');
$expectedPlugins = '$expectedPlugins = ' . var_export($plugins, true);
$code = preg_replace('#\$expectedPlugins =[^;]+#', $expectedPlugins, $code);
$expectedSysplugins = '$expectedSysplugins = ' . var_export($sysplugins, true);
$code = preg_replace('#\$expectedSysplugins =[^;]+#', $expectedSysplugins, $code);
file_put_contents(__DIR__ . '/../libs/sysplugins/smarty_internal_testinstall.php', $code);
file_put_contents(dirname(__FILE__) . '/../libs/sysplugins/smarty_internal_testinstall.php', $code);