Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 695)
+++ trunk/CHANGELOG	(revision 696)
@@ -17,6 +17,7 @@
 10-Feb-2008 Thomas Hornik
 #	CAPTCHA: Wrong text for calc_ttf-captcha. 
 10-Feb-2008 Christian Sommer
+#	fixed E_NOTICE warning with already defined module frontend constants
 -	removed all stuff other than page_content from the blank template
 !	adapted color for onmouseover effect
 !	added disclaimer to the upgrade-script as the script is not sufficiently tested yet
Index: trunk/wb/framework/frontend.functions.php
===================================================================
--- trunk/wb/framework/frontend.functions.php	(revision 695)
+++ trunk/wb/framework/frontend.functions.php	(revision 696)
@@ -345,32 +345,32 @@
 			$base_file = "frontend.js";
 		}
 
-  		// gather information for all models embedded on actual page
+  	// gather information for all models embedded on actual page
 		$page_id = $wb->page_id;
-    	$query_modules = $database->query("SELECT module FROM " .TABLE_PREFIX ."sections 
+    $query_modules = $database->query("SELECT module FROM " .TABLE_PREFIX ."sections 
 			WHERE page_id=$page_id AND module<>'wysiwyg'");
 
-    	while($row = $query_modules->fetchRow()) {
-			// check if page module directory contains a frontend.js or frontend.css file
-    		if(file_exists(WB_PATH ."/modules/" .$row['module'] ."/$base_file")) {
+    while($row = $query_modules->fetchRow()) {
+		// check if page module directory contains a frontend.js or frontend.css file
+    	if(file_exists(WB_PATH ."/modules/" .$row['module'] ."/$base_file")) {
 				// create link with frontend.js or frontend.css source for the current module
 				$tmp_link = str_replace("{MODULE_DIRECTORY}", $row['module'], $base_link);
 
-        		// define constant indicating that the register_frontent_files was invoked
+        // define constant indicating that the register_frontent_files was invoked
 				if($file_id == 'css') {
-					define('MOD_FRONTEND_CSS_REGISTERED', true);
+					if(!defined('MOD_FRONTEND_CSS_REGISTERED')) define('MOD_FRONTEND_CSS_REGISTERED', true);
 				} else {
-					define('MOD_FRONTEND_JAVASCRIPT_REGISTERED', true);
+					if(!defined('MOD_FRONTEND_JAVASCRIPT_REGISTERED')) define('MOD_FRONTEND_JAVASCRIPT_REGISTERED', true);
 				}
 
-        		// ensure that frontend.js or frontend.css is only added once per module type
-        		if(strpos($head_links, $tmp_link) === false) {
+        // ensure that frontend.js or frontend.css is only added once per module type
+        if(strpos($head_links, $tmp_link) === false) {
 					$head_links .= $tmp_link ."\n";
 				}
 			}
-    	}
-  		// include the Javascript email protection function
-  		if($file_id != 'css' && file_exists(WB_PATH .'/modules/output_filter/js/mdcr.js')) {
+    }
+  	// include the Javascript email protection function
+  	if($file_id != 'css' && file_exists(WB_PATH .'/modules/output_filter/js/mdcr.js')) {
 			$head_links .= '<script type="text/javascript" src="'.WB_URL.'/modules/output_filter/js/mdcr.js"></script>' ."\n";
 		}
   		
