|
2 | 2 | /** |
3 | 3 | * sysPass |
4 | 4 | * |
5 | | - * @author nuxsmin |
6 | | - * @link https://syspass.org |
| 5 | + * @author nuxsmin |
| 6 | + * @link https://syspass.org |
7 | 7 | * @copyright 2012-2019, Rubén Domínguez nuxsmin@$syspass.org |
8 | 8 | * |
9 | 9 | * This file is part of sysPass. |
|
22 | 22 | * along with sysPass. If not, see <http://www.gnu.org/licenses/>. |
23 | 23 | */ |
24 | 24 |
|
| 25 | +use Composer\Autoload\ClassLoader; |
| 26 | +use SP\Modules\Web\Controllers\AuthenticatorController; |
| 27 | +use SP\Modules\Web\Controllers\AuthenticatorLoginController; |
| 28 | +use SP\Modules\Web\Plugins\Authenticator\Plugin; |
| 29 | + |
25 | 30 | $lib = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'lib'; |
26 | 31 |
|
27 | 32 | $base = [ |
28 | 33 | 'namespace' => 'SP\Modules\\Web\\Plugins\\Authenticator\\', |
29 | 34 | 'dir' => $lib |
30 | 35 | ]; |
31 | 36 |
|
32 | | -if (!class_exists(\SP\Modules\Web\Plugins\Authenticator\Plugin::class)) { |
33 | | - /** @var \Composer\Autoload\ClassLoader $loader */ |
| 37 | +if (!class_exists(Plugin::class)) { |
| 38 | + /** @var ClassLoader $loader */ |
34 | 39 | $loader = require APP_ROOT . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; |
35 | 40 | $loader->addPsr4($base['namespace'], $base['dir']); |
36 | 41 | $loader->addClassMap([ |
37 | | - \SP\Modules\Web\Controllers\AuthenticatorController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorController.php', |
38 | | - \SP\Modules\Web\Controllers\AuthenticatorLoginController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorLoginController.php' |
| 42 | + AuthenticatorController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorController.php', |
| 43 | + AuthenticatorLoginController::class => $lib . DIRECTORY_SEPARATOR . 'Controllers' . DIRECTORY_SEPARATOR . 'AuthenticatorLoginController.php' |
39 | 44 | ]); |
40 | 45 | } |
41 | 46 |
|
|
0 commit comments