mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Centralize class loader (#4169)
Move the classloader to as early as possible in defaults.inc.php This should cover all application entrances. Set install_dir based on the location of defaults.inc.php
This commit is contained in:
committed by
Neil Lathwood
parent
e920e28e48
commit
7b93b564da
+2
-7
@@ -26,15 +26,10 @@
|
||||
// get the current LibreNMS install directory
|
||||
$install_dir = realpath(__DIR__ . '/..');
|
||||
|
||||
require_once $install_dir . '/LibreNMS/ClassLoader.php';
|
||||
|
||||
// initialize the class loader
|
||||
$loader = new LibreNMS\ClassLoader();
|
||||
$loader->registerDir($install_dir . '/tests', 'LibreNMS\Tests');
|
||||
$loader->register();
|
||||
|
||||
require_once $install_dir . '/includes/defaults.inc.php';
|
||||
|
||||
$classLoader->registerDir($install_dir . '/tests', 'LibreNMS\Tests');
|
||||
|
||||
require_once $install_dir . '/includes/rrdtool.inc.php';
|
||||
require_once $install_dir . '/includes/syslog.php';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user