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
|
// Setup Logger
|
||||||
\ManiaControl\Logger::setup();
|
\ManiaControl\Logger::setup();
|
||||||
|
|
||||||
// Load libs
|
|
||||||
require_once MANIACONTROL_PATH . '/libs/curl-easy/autoload.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see \ManiaControl\Logger::log()
|
* @see \ManiaControl\Logger::log()
|
||||||
|
@ -34,18 +34,14 @@ abstract class AutoLoader {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plugin file
|
// Other file
|
||||||
$pluginFilePath = MANIACONTROL_PATH . 'plugins' . DIRECTORY_SEPARATOR . $classPath . '.php';
|
$paths = array('plugins', 'libs', 'libs' . DIRECTORY_SEPARATOR . 'curl-easy');
|
||||||
if (file_exists($pluginFilePath)) {
|
foreach ($paths as $path) {
|
||||||
include_once $pluginFilePath;
|
$filePath = MANIACONTROL_PATH . $path . DIRECTORY_SEPARATOR . $classPath . '.php';
|
||||||
|
if (file_exists($filePath)) {
|
||||||
|
include_once $filePath;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lib file
|
|
||||||
$libFilePath = MANIACONTROL_PATH . 'libs' . DIRECTORY_SEPARATOR . $classPath . '.php';
|
|
||||||
if (file_exists($libFilePath)) {
|
|
||||||
include_once $libFilePath;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user