-/**
- * Is the devel package included?
- */
-if (is_dir(sprintf("%sdevel", PATH))) {
- /**
- * Load all development includes
- */
- ClassLoader::getInstance()->loadClasses("devel");
+// Does the user has an application specified?
+if (!empty($_GET['app'])) {
+ // Set the application from string
+ $application = (string) $_GET['app'];
+} elseif (!empty($_SERVER['argv'][1])) {
+ // Set the application from string
+ $application = (string) $_SERVER['argv'][1];
+ $app = explode('=', trim($application));
+ if ($app[0] == 'app') {
+ // Application is valid!
+ $application = trim($app[1]);
+ } else {
+ // Invalid entry found, first must be "app"!
+ $application = $cfg->readConfig('default_application');
+ }
+} else {
+ // Set the "application selector" application
+ $application = $cfg->readConfig('default_application');