mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
Fixing plugin loading.
This commit is contained in:
@@ -1256,13 +1256,15 @@ class Smarty
|
||||
if (!is_dir($this->plugin_dir))
|
||||
return false;
|
||||
|
||||
$included_files = implode(',', get_included_files());
|
||||
$dir_handle = opendir($this->plugin_dir);
|
||||
while ($entry = readdir($dir_handle)) {
|
||||
$plugin_file = $this->plugin_dir.'/'.$entry;
|
||||
|
||||
if ($entry == '.' || $entry == '..' ||
|
||||
!is_file($plugin_file) ||
|
||||
substr($plugin_file, -11) != '.plugin.php')
|
||||
substr($plugin_file, -11) != '.plugin.php' ||
|
||||
strpos($included_files, $entry) !== false)
|
||||
continue;
|
||||
|
||||
unset($smarty_plugin_info);
|
||||
|
@@ -1256,13 +1256,15 @@ class Smarty
|
||||
if (!is_dir($this->plugin_dir))
|
||||
return false;
|
||||
|
||||
$included_files = implode(',', get_included_files());
|
||||
$dir_handle = opendir($this->plugin_dir);
|
||||
while ($entry = readdir($dir_handle)) {
|
||||
$plugin_file = $this->plugin_dir.'/'.$entry;
|
||||
|
||||
if ($entry == '.' || $entry == '..' ||
|
||||
!is_file($plugin_file) ||
|
||||
substr($plugin_file, -11) != '.plugin.php')
|
||||
substr($plugin_file, -11) != '.plugin.php' ||
|
||||
strpos($included_files, $entry) !== false)
|
||||
continue;
|
||||
|
||||
unset($smarty_plugin_info);
|
||||
|
Reference in New Issue
Block a user