mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
only check for class.$classname.inc.php files, when scanning for plugins, as backupfiles postfixing the filename with an other extension stall EGroupware completly (Fatal Error: Can not redeclar class)
This commit is contained in:
parent
ae0542eaf7
commit
77647a9d31
@ -378,12 +378,12 @@ class importexport_helper_functions {
|
||||
while (false !== ($entry = $d->read())) {
|
||||
// Blacklisted?
|
||||
if(is_array(self::$blacklist_files[$appname]) && in_array($entry, self::$blacklist_files[$appname])) continue;
|
||||
|
||||
list( ,$classname, ,$extension) = explode('.',$entry);
|
||||
if (!preg_match('/^class\.([^.]+)\.inc\.php$/', $entry, $matches)) continue;
|
||||
$classname = $matches[1];
|
||||
$file = $appdir. '/'. $entry;
|
||||
|
||||
foreach ($types as $type) {
|
||||
if( !is_file($file) || strpos($entry, $type) === false || $extension != 'php' ) continue;
|
||||
if( !is_file($file) || strpos($entry, $type) === false) continue;
|
||||
require_once($file);
|
||||
$reflectionClass = new ReflectionClass($classname);
|
||||
if($reflectionClass->IsInstantiable() &&
|
||||
|
Loading…
Reference in New Issue
Block a user