Index: trunk/core/units/modules/modules_config.php
===================================================================
diff -u -r1566 -r2060
--- trunk/core/units/modules/modules_config.php (.../modules_config.php) (revision 1566)
+++ trunk/core/units/modules/modules_config.php (.../modules_config.php) (revision 2060)
@@ -5,7 +5,7 @@
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ModulesEventHandler','file'=>'modules_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'ModulesTagProcessor','file'=>'modules_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
Index: trunk/kernel/units/modules/modules_config.php
===================================================================
diff -u -r1566 -r2060
--- trunk/kernel/units/modules/modules_config.php (.../modules_config.php) (revision 1566)
+++ trunk/kernel/units/modules/modules_config.php (.../modules_config.php) (revision 2060)
@@ -5,7 +5,7 @@
'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'ModulesEventHandler','file'=>'modules_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'ModulesTagProcessor','file'=>'modules_tag_processor.php','build_event'=>'OnBuild'),
'AutoLoad' => true,
'hooks' => Array(),
'QueryString' => Array(
Index: trunk/core/kernel/utility/unit_config_reader.php
===================================================================
diff -u -r1834 -r2060
--- trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 1834)
+++ trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 2060)
@@ -32,7 +32,7 @@
parent::Init($prefix,$special);
$db =& $this->Application->GetADODBConnection();
- $this->modules_installed = $db->GetCol('SELECT CONCAT(\'/\',Path) AS Path, Name FROM '.TABLE_PREFIX.'Modules','Name');
+ $this->modules_installed = $db->GetCol('SELECT CONCAT(\'/\',Path) AS Path, Name FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1','Name');
$this->scanModules(MODULES_PATH);
}
Index: trunk/kernel/units/modules/modules_tag_processor.php
===================================================================
diff -u
--- trunk/kernel/units/modules/modules_tag_processor.php (revision 0)
+++ trunk/kernel/units/modules/modules_tag_processor.php (revision 2060)
@@ -0,0 +1,15 @@
+SelectParam($params, 'name,module');
+ $sql = 'SELECT Loaded FROM '.$this->Application->getUnitOption('mod', 'TableName').'
+ WHERE Name = "'.$module.'"';
+ return $this->Conn->GetOne($sql) ? 1 : 0;
+ }
+
+}
+
+?>
\ No newline at end of file
Index: trunk/core/kernel/event_manager.php
===================================================================
diff -u -r1560 -r2060
--- trunk/core/kernel/event_manager.php (.../event_manager.php) (revision 1560)
+++ trunk/core/kernel/event_manager.php (.../event_manager.php) (revision 2060)
@@ -194,6 +194,14 @@
function registerHook($hookto_prefix, $hookto_special, $hookto_event, $mode, $do_prefix, $do_special, $do_event, $conditional)
{
+ if( !$this->Application->getUnitOptions($hookto_prefix) )
+ {
+ if($this->Application->isDebugMode())
+ {
+ trigger_error('Prefix '.$hookto_prefix.' doesn\'t exist when trying to hook from '.$do_prefix.':'.$do_event.'', E_USER_WARNING);
+ }
+ return;
+ }
$hookto_prefix_special = rtrim($hookto_prefix.'.'.$hookto_special, '.');
if ($mode == hBEFORE) {
$this->beforeHooks[strtolower($hookto_prefix_special.'.'.$hookto_event)][] = Array(
Index: trunk/core/units/modules/modules_tag_processor.php
===================================================================
diff -u
--- trunk/core/units/modules/modules_tag_processor.php (revision 0)
+++ trunk/core/units/modules/modules_tag_processor.php (revision 2060)
@@ -0,0 +1,15 @@
+SelectParam($params, 'name,module');
+ $sql = 'SELECT Loaded FROM '.$this->Application->getUnitOption('mod', 'TableName').'
+ WHERE Name = "'.$module.'"';
+ return $this->Conn->GetOne($sql) ? 1 : 0;
+ }
+
+}
+
+?>
\ No newline at end of file
Index: trunk/core/kernel/processors/main_processor.php
===================================================================
diff -u -r1677 -r2060
--- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 1677)
+++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 2060)
@@ -715,7 +715,7 @@
$module =& $this->Application->recallObject('mod.'.$module_name);
$this->Application->SetVar('m_cat_id', $module->GetDBField('RootCat') );
}
-
+
/*
function Login($params)
{