mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 10:27:52 +02: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
29b578cd0b
commit
2d7584d459
@ -124,7 +124,7 @@ class importexport_helper_functions {
|
|||||||
$account_ids[] = $account_id;
|
$account_ids[] = $account_id;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle groups listed as Group, <name>
|
// Handle groups listed as Group, <name>
|
||||||
if ( $account_lid[0] == ' ' && $account_id = $GLOBALS['egw']->accounts->name2id( trim($account_lid))) {
|
if ( $account_lid[0] == ' ' && $account_id = $GLOBALS['egw']->accounts->name2id( trim($account_lid))) {
|
||||||
$account_ids[] = $account_id;
|
$account_ids[] = $account_id;
|
||||||
@ -381,12 +381,12 @@ class importexport_helper_functions {
|
|||||||
while (false !== ($entry = $d->read())) {
|
while (false !== ($entry = $d->read())) {
|
||||||
// Blacklisted?
|
// Blacklisted?
|
||||||
if(is_array(self::$blacklist_files[$appname]) && in_array($entry, self::$blacklist_files[$appname])) continue;
|
if(is_array(self::$blacklist_files[$appname]) && in_array($entry, self::$blacklist_files[$appname])) continue;
|
||||||
|
if (!preg_match('/^class\.([^.]+)\.inc\.php$/', $entry, $matches)) continue;
|
||||||
list( ,$classname, ,$extension) = explode('.',$entry);
|
$classname = $matches[1];
|
||||||
$file = $appdir. '/'. $entry;
|
$file = $appdir. '/'. $entry;
|
||||||
|
|
||||||
foreach ($types as $type) {
|
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);
|
require_once($file);
|
||||||
$reflectionClass = new ReflectionClass($classname);
|
$reflectionClass = new ReflectionClass($classname);
|
||||||
if($reflectionClass->IsInstantiable() &&
|
if($reflectionClass->IsInstantiable() &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user