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
@@ -17,13 +17,6 @@ require_once '../includes/defaults.inc.php';
|
||||
require_once '../config.php';
|
||||
require_once '../includes/definitions.inc.php';
|
||||
|
||||
// initialize the class loader and add custom mappings
|
||||
require_once $config['install_dir'] . '/LibreNMS/ClassLoader.php';
|
||||
$classLoader = new LibreNMS\ClassLoader();
|
||||
$classLoader->registerClass('Console_Color2', $config['install_dir'] . '/includes/console_colour.php');
|
||||
$classLoader->registerClass('PasswordHash', $config['install_dir'] . '/html/lib/PasswordHash.php');
|
||||
$classLoader->register();
|
||||
|
||||
require_once '../includes/common.php';
|
||||
require_once '../includes/dbFacile.php';
|
||||
require_once '../includes/rewrites.php';
|
||||
|
Reference in New Issue
Block a user