diff --git a/admin/index.php b/admin/index.php index 14a51e8..1645a87 100644 --- a/admin/index.php +++ b/admin/index.php @@ -19,7 +19,6 @@ // Main engine defines define('DS', DIRECTORY_SEPARATOR); define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/')); - define('BACKEND', true); define('MONSTRA_ACCESS', true); diff --git a/index.php b/index.php index fe56d05..4520560 100644 --- a/index.php +++ b/index.php @@ -19,7 +19,6 @@ // Main engine defines define('DS', DIRECTORY_SEPARATOR); define('ROOT', rtrim(dirname(__FILE__), '\\/')); - define('BACKEND', false); define('MONSTRA_ACCESS', true); diff --git a/libraries/engine/Core.php b/libraries/engine/Core.php index e451244..35bd505 100644 --- a/libraries/engine/Core.php +++ b/libraries/engine/Core.php @@ -114,6 +114,7 @@ class Core // Init ORM if (defined('MONSTRA_DB_DSN')) { + require_once(ROOT . '/libraries/engine/Orm.php'); Orm::configure(MONSTRA_DB_DSN); Orm::configure('username', MONSTRA_DB_USER); Orm::configure('password', MONSTRA_DB_PASSWORD); @@ -132,7 +133,7 @@ class Core // Set cache dir Cache::configure('cache_dir', CACHE); - // Load URI module + // Load Securitu module require_once(ROOT . '/libraries/engine/Security.php'); // Load URI module @@ -180,15 +181,6 @@ class Core } - /** - * Autoload helpers - * - * @param string $class_name Class name - */ - /*protected static function autoloadHelpers($class_name) { - if (file_exists($path = HELPERS . DS . strtolower($class_name) . '.php')) include $path; - }*/ - /** * Load Defines */ diff --git a/libraries/monstra/Orm.php b/libraries/engine/Orm.php similarity index 100% rename from libraries/monstra/Orm.php rename to libraries/engine/Orm.php diff --git a/libraries/monstra/Monstra.php b/libraries/monstra/Monstra.php index 2d78a7f..ea1af70 100644 --- a/libraries/monstra/Monstra.php +++ b/libraries/monstra/Monstra.php @@ -45,7 +45,7 @@ class Monstra * @var array */ private static $registry = array(); - + /** * Autload */ @@ -61,7 +61,7 @@ class Monstra $className = substr($className, $lastNsPos + 1); $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; } - $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; + $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; require $path.DIRECTORY_SEPARATOR.$fileName; } @@ -114,5 +114,4 @@ class Monstra return self::$registry[$name]; } - }