Index: branches/5.1.x/core/install.php
===================================================================
diff -u -r14112 -r14162
--- branches/5.1.x/core/install.php	(.../install.php)	(revision 14112)
+++ branches/5.1.x/core/install.php	(.../install.php)	(revision 14162)
@@ -1,6 +1,6 @@
 <?php
 /**
-* @version	$Id: install.php 14112 2011-01-05 11:00:20Z alex $
+* @version	$Id: install.php 14162 2011-01-11 11:03:53Z alex $
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
@@ -737,7 +737,7 @@
 
 					// get domain name as entered by user on the form
 					$domain = $this->GetVar('domain') == 1 ? $_SERVER['HTTP_HOST'] : str_replace(' ', '', $this->GetVar('other'));
-					
+
 					$license_hash = $this->toolkit->getSystemConfig('Intechnic', 'License');
 					if ($license_hash) {
 						// when license present, then extract domain from it
@@ -1174,6 +1174,7 @@
 				$this->Application =& kApplication::Instance();
 				$this->toolkit->Application =& kApplication::Instance();
 
+				$this->includeModuleConstants();
 				$this->Application->Init();
 
 				$this->Conn =& $this->Application->GetADODBConnection();
@@ -1182,6 +1183,23 @@
 		}
 
 		/**
+		 * When no modules installed, then pre-include all modules contants, since they are used in unit configs
+		 *
+		 */
+		function includeModuleConstants()
+		{
+			$modules = $this->ScanModules();
+
+			foreach ($modules as $module_path) {
+				$contants_file = MODULES_PATH . '/' . $module_path . '/constants.php';
+
+				if ( file_exists($contants_file) ) {
+					k4_include_once($contants_file);
+				}
+			}
+		}
+
+		/**
 		 * Show next step screen
 		 *
 		 */