mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
autoload will respect main plugin class now (e.g. plugin_myplug class located in /myplug/myplug.php)
This commit is contained in:
11
class2.php
11
class2.php
@@ -2100,7 +2100,16 @@ function __autoload($className)
|
|||||||
array_shift($tmp); // remove 'plugin'
|
array_shift($tmp); // remove 'plugin'
|
||||||
$end = array_pop($tmp); // check for 'shortcodes' end phrase
|
$end = array_pop($tmp); // check for 'shortcodes' end phrase
|
||||||
|
|
||||||
if (!isset($tmp[0]) || !$tmp[0]) return; // In case we get an empty class part
|
if (!isset($tmp[0]) || !$tmp[0])
|
||||||
|
{
|
||||||
|
if($end)
|
||||||
|
{
|
||||||
|
// plugin root - e.g. plugin_myplug -> plugins/myplug/myplug.php, class plugin_myplug
|
||||||
|
$filename = e_PLUGIN.$end.'/'.$end.'.php';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return; // In case we get an empty class part
|
||||||
|
}
|
||||||
|
|
||||||
// Currently only batches inside shortcodes/ folder are auto-detected,
|
// Currently only batches inside shortcodes/ folder are auto-detected,
|
||||||
// read the todo for e_shortcode.php related problems
|
// read the todo for e_shortcode.php related problems
|
||||||
|
Reference in New Issue
Block a user