summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/config/config.php2
-rw-r--r--core/helpers/module.php10
2 files changed, 10 insertions, 2 deletions
diff --git a/core/config/config.php b/core/config/config.php
index 00046e80..128043c5 100644
--- a/core/config/config.php
+++ b/core/config/config.php
@@ -118,8 +118,6 @@ $config['extension_prefix'] = 'MY_';
*/
$config['modules'] = array(
MODPATH . 'forge',
- THEMEPATH . 'default',
- THEMEPATH . 'admin_default'
);
if (TEST_MODE) {
diff --git a/core/helpers/module.php b/core/helpers/module.php
index 2b9a919d..d08efd83 100644
--- a/core/helpers/module.php
+++ b/core/helpers/module.php
@@ -144,6 +144,16 @@ class module_Core {
self::event("gallery_ready");
}
+ public static function load_themes() {
+ $modules = Kohana::config('core.modules');
+ if (Router::$controller == "admin") {
+ array_unshift($modules, THEMEPATH . 'admin_default');
+ } else {
+ array_unshift($modules, THEMEPATH . 'default');
+ }
+ Kohana::config_set('core.modules', $modules);
+ }
+
public function get_var($module_name, $name, $default_value=null) {
$module = model_cache::get("module", $module_name, "name");
$var = ORM::factory("var")