moved last remaining manual lib include into autoloader

This commit is contained in:
Steffen Schröder 2014-09-01 03:52:14 +02:00
parent b6f061510f
commit 0240c92d58
2 changed files with 8 additions and 15 deletions

View File

@ -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()

View File

@ -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';
return; if (file_exists($filePath)) {
} include_once $filePath;
return;
// Lib file }
$libFilePath = MANIACONTROL_PATH . 'libs' . DIRECTORY_SEPARATOR . $classPath . '.php';
if (file_exists($libFilePath)) {
include_once $libFilePath;
return;
} }
} }
} }