mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 19:57:57 +02:00
@@ -19,7 +19,6 @@
|
|||||||
// Main engine defines
|
// Main engine defines
|
||||||
define('DS', DIRECTORY_SEPARATOR);
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
|
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
|
||||||
|
|
||||||
define('BACKEND', true);
|
define('BACKEND', true);
|
||||||
define('MONSTRA_ACCESS', true);
|
define('MONSTRA_ACCESS', true);
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
// Main engine defines
|
// Main engine defines
|
||||||
define('DS', DIRECTORY_SEPARATOR);
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
define('ROOT', rtrim(dirname(__FILE__), '\\/'));
|
define('ROOT', rtrim(dirname(__FILE__), '\\/'));
|
||||||
|
|
||||||
define('BACKEND', false);
|
define('BACKEND', false);
|
||||||
define('MONSTRA_ACCESS', true);
|
define('MONSTRA_ACCESS', true);
|
||||||
|
|
||||||
|
@@ -114,6 +114,7 @@ class Core
|
|||||||
|
|
||||||
// Init ORM
|
// Init ORM
|
||||||
if (defined('MONSTRA_DB_DSN')) {
|
if (defined('MONSTRA_DB_DSN')) {
|
||||||
|
require_once(ROOT . '/libraries/engine/Orm.php');
|
||||||
Orm::configure(MONSTRA_DB_DSN);
|
Orm::configure(MONSTRA_DB_DSN);
|
||||||
Orm::configure('username', MONSTRA_DB_USER);
|
Orm::configure('username', MONSTRA_DB_USER);
|
||||||
Orm::configure('password', MONSTRA_DB_PASSWORD);
|
Orm::configure('password', MONSTRA_DB_PASSWORD);
|
||||||
@@ -132,7 +133,7 @@ class Core
|
|||||||
// Set cache dir
|
// Set cache dir
|
||||||
Cache::configure('cache_dir', CACHE);
|
Cache::configure('cache_dir', CACHE);
|
||||||
|
|
||||||
// Load URI module
|
// Load Securitu module
|
||||||
require_once(ROOT . '/libraries/engine/Security.php');
|
require_once(ROOT . '/libraries/engine/Security.php');
|
||||||
|
|
||||||
// Load URI module
|
// 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
|
* Load Defines
|
||||||
*/
|
*/
|
||||||
|
@@ -45,7 +45,7 @@ class Monstra
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $registry = array();
|
private static $registry = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Autload
|
* Autload
|
||||||
*/
|
*/
|
||||||
@@ -61,7 +61,7 @@ class Monstra
|
|||||||
$className = substr($className, $lastNsPos + 1);
|
$className = substr($className, $lastNsPos + 1);
|
||||||
$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
|
$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;
|
require $path.DIRECTORY_SEPARATOR.$fileName;
|
||||||
}
|
}
|
||||||
@@ -114,5 +114,4 @@ class Monstra
|
|||||||
|
|
||||||
return self::$registry[$name];
|
return self::$registry[$name];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user