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