moved last remaining manual lib include into autoloader
This commit is contained in:
parent
b6f061510f
commit
0240c92d58
@ -29,9 +29,6 @@ require_once MANIACONTROL_PATH . 'core' . DIRECTORY_SEPARATOR . 'AutoLoader.php'
|
||||
// Setup Logger
|
||||
\ManiaControl\Logger::setup();
|
||||
|
||||
// Load libs
|
||||
require_once MANIACONTROL_PATH . '/libs/curl-easy/autoload.php';
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see \ManiaControl\Logger::log()
|
||||
|
@ -34,18 +34,14 @@ abstract class AutoLoader {
|
||||
return;
|
||||
}
|
||||
|
||||
// Plugin file
|
||||
$pluginFilePath = MANIACONTROL_PATH . 'plugins' . DIRECTORY_SEPARATOR . $classPath . '.php';
|
||||
if (file_exists($pluginFilePath)) {
|
||||
include_once $pluginFilePath;
|
||||
return;
|
||||
}
|
||||
|
||||
// Lib file
|
||||
$libFilePath = MANIACONTROL_PATH . 'libs' . DIRECTORY_SEPARATOR . $classPath . '.php';
|
||||
if (file_exists($libFilePath)) {
|
||||
include_once $libFilePath;
|
||||
// Other file
|
||||
$paths = array('plugins', 'libs', 'libs' . DIRECTORY_SEPARATOR . 'curl-easy');
|
||||
foreach ($paths as $path) {
|
||||
$filePath = MANIACONTROL_PATH . $path . DIRECTORY_SEPARATOR . $classPath . '.php';
|
||||
if (file_exists($filePath)) {
|
||||
include_once $filePath;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user