diff --git a/Ov3rw4tch.class.php b/Ov3rw4tch.class.php index 006ceaa..6a19e5e 100644 --- a/Ov3rw4tch.class.php +++ b/Ov3rw4tch.class.php @@ -5,15 +5,25 @@ * @package default */ + +define("OVERWATCH_ROOT", dirname(__FILE__)); +define("OVERWATCH_LIBRARIES", OVERWATCH_ROOT."/lib"); +define("OVERWATCH_MODULES", OVERWATCH_LIBRARIES."/modules/"); +// Load in module support and required classes. +require_once "vendor/autoload.php"; +require_once OVERWATCH_LIBRARIES."/libModOverwatch.class.php"; +require_once OVERWATCH_LIBRARIES."/libOverwatchAPI.class.php"; +require_once OVERWATCH_LIBRARIES."/libAPIQL.class.php"; +use Noodlehaus\Config; +echo PHP_EOL; + #error_reporting(0); $quit = 0; $arrOverwatch_Config = array(); $arrOverwatch_SystemConfig = array(); $application_channel = "release"; -define("OVERWATCH_ROOT", dirname(__FILE__)); -define("OVERWATCH_LIBRARIES", OVERWATCH_ROOT."/lib"); -define("OVERWATCH_MODULES", OVERWATCH_LIBRARIES."/modules/"); + // Load version information from built-in version file. (used for releases) $version = file_get_contents(OVERWATCH_ROOT."/build/version"); @@ -32,7 +42,6 @@ if (file_exists(".git")) { // Load the core version from the phar if we're running compiled. $coreversion = file_get_contents(OVERWATCH_ROOT."/build/core-version"); - // Now we'll define the core version of the software as well. $version = str_replace(PHP_EOL, "", $version); @@ -46,17 +55,10 @@ LogEcho("Overwatchd startup, version: $version (built from: $coreversion), chann function LogEcho($str, $level) { $str = str_replace(PHP_EOL, "", $str); $level = str_replace(PHP_EOL, "", $level); - echo "[$level] $str\r\n"; + echo "[$level] $str".PHP_EOL; } -// Load in module support and required classes. -require_once "vendor/autoload.php"; -require_once OVERWATCH_LIBRARIES."/libModOverwatch.class.php"; -require_once OVERWATCH_LIBRARIES."/libOverwatchAPI.class.php"; -require_once OVERWATCH_LIBRARIES."/libAPIQL.class.php"; -use Noodlehaus\Config; - LogEcho("Loading built-in API Modules...", "OVERWATCH"); LoadAPIModules(OVERWATCH_MODULES); diff --git a/lib/libOverwatchAPI.class.php b/lib/libOverwatchAPI.class.php index d74d9d1..c787386 100644 --- a/lib/libOverwatchAPI.class.php +++ b/lib/libOverwatchAPI.class.php @@ -31,7 +31,7 @@ function LoadAPIModules($path = OVERWATCH_MODULES) // We're good here if(defined("DEBUG")) { - LogEcho("API Module Loaded: $modulename", "OV3RW4TCH-API"); + LogEcho("API Module Loaded: $modulename", "OVERWATCH"); } } } @@ -40,7 +40,7 @@ function LoadAPIModules($path = OVERWATCH_MODULES) function LoadAPIModule($sql) { - // Force Module Loader to load a specified API Module when sent + // TODO: LoadAPIModule Implementation } function UnloadAPIModule($sql) {} diff --git a/lib/modules/InputDeviceServices/InputDeviceServices.API.php b/lib/modules/InputDeviceServices/InputDeviceServices.API.php index 29063da..f33ea2e 100644 --- a/lib/modules/InputDeviceServices/InputDeviceServices.API.php +++ b/lib/modules/InputDeviceServices/InputDeviceServices.API.php @@ -1,7 +1,7 @@