Modified:
development/4.0/textpattern/lib/txplib_misc.php
Log:
Keep $txp_current_plugin across nested require_plugin() / load_plugin()
calls.
Modified: development/4.0/textpattern/lib/txplib_misc.php
==============================================================================
--- development/4.0/textpattern/lib/txplib_misc.php (original)
+++ development/4.0/textpattern/lib/txplib_misc.php Fri Sep 5 11:21:00 2008
@@ -463,8 +463,10 @@
$plugins_ver[$rs['name']] = $rs['version'];
set_error_handler("pluginErrorHandler");
+ if(isset($txp_current_plugin)) $txp_parent_plugin = $txp_current_plugin;
$txp_current_plugin = $rs['name'];
eval($rs['code']);
+ if(isset($txp_parent_plugin)) $txp_current_plugin = $txp_parent_plugin;
restore_error_handler();
return true;