mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°3078 - Fix error on login while in maintenance mode
Fix infinite loop on login failure
This commit is contained in:
30
core/plugininstanciationmanager.class.inc.php
Normal file
30
core/plugininstanciationmanager.class.inc.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
class PluginInstanciationManager
|
||||
{
|
||||
public function InstantiatePlugins($m_aExtensionClassNames, $sInterface)
|
||||
{
|
||||
$newPerInstanceClasses = array();
|
||||
if (array_key_exists($sInterface, $m_aExtensionClassNames))
|
||||
{
|
||||
foreach ($m_aExtensionClassNames[$sInterface] as $sClassName)
|
||||
{
|
||||
if (class_exists($sClassName))
|
||||
{
|
||||
$class = new ReflectionClass($sClassName);
|
||||
|
||||
if ($class->isInstantiable())
|
||||
{
|
||||
$newPerInstanceClasses[$sClassName] = new $sClassName();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $newPerInstanceClasses;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user