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
@@ -20,16 +20,6 @@ use LibreNMS\Exceptions\InvalidPortAssocModeException;
|
||||
use LibreNMS\Exceptions\SnmpVersionUnsupportedException;
|
||||
|
||||
|
||||
// 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('Console_Table', $config['install_dir'] . '/includes/console_table.php');
|
||||
$classLoader->registerClass('PHPMailer', $config['install_dir'] . "/includes/phpmailer/class.phpmailer.php");
|
||||
$classLoader->registerClass('SMTP', $config['install_dir'] . "/includes/phpmailer/class.smtp.php");
|
||||
$classLoader->registerClass('PasswordHash', $config['install_dir'] . '/html/lib/PasswordHash.php');
|
||||
$classLoader->register();
|
||||
|
||||
// Include from PEAR
|
||||
|
||||
include_once("Net/IPv4.php");
|
||||
|
||||
Reference in New Issue
Block a user