Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1442)
+++ branches/2.8.x/CHANGELOG	(revision 1443)
@@ -11,7 +11,12 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.2 -------------------------------------
-15 Apr-2011 Build 1441 Dietmar Woellbrink (Luisehahne)
+19 Apr-2011 Build 1443 Dietmar Woellbrink (Luisehahne)
+! remove auto including YUI Framework in backend for modules, enable with ->print_footer(true)
+! ->print_error and ->print_success too accept a message as array
+! auto validate in frontend if style block inside body tag
+! captcha now XHTML valide
+15 Apr-2011 Build 1442 Dietmar Woellbrink (Luisehahne)
 # bug fixed in class.database.php methode field_add in call field_exists
 ! update search, pls test, (Tks to Thorn)
 10 Apr-2011 Build 1441 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/include/captcha/captcha.php
===================================================================
--- branches/2.8.x/wb/include/captcha/captcha.php	(revision 1442)
+++ branches/2.8.x/wb/include/captcha/captcha.php	(revision 1443)
@@ -27,16 +27,22 @@
 if(!function_exists('display_captcha_real')) {
 	function display_captcha_real($kind='image') {
 		$t = time();
+		$output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ";
+		$output .= "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+		$output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"";
+		$output .= strtolower(LANGUAGE)."\" lang=\"".strtolower(LANGUAGE)."\">\n";
+		$output .= "\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n";
+		$output .= "\t\t<title>captcha</title>\n\t</head>\n\t<body>\n";
 		$_SESSION['captcha_time'] = $t;
-		$sec_id = '';
-		if(isset($_GET['s']) && is_numeric($_GET['s'])) $sec_id = $_GET['s'];
 		if($kind=='image') {
-			?><a title="reload" href="<?php echo WB_URL.'/include/captcha/captcha.php?display_captcha_X986E21=2'; ?>">
-			  <img style="border: none;" src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.".php?t=$t&amp;s=$sec_id"; ?>" alt="Captcha" />
-				</a><?php
+			$output .= "\t\t<a title=\"reload\" href=\"".WB_REL."/include/captcha/captcha.php?display_captcha_X986E21=2\">";
+			$output .= "<img style=\"border: none;\" src=\"".WB_REL."/include/captcha/captchas/";
+			$output .= CAPTCHA_TYPE.".php?t=".$t."\" alt=\"Captcha\" /></a>\n";
 		} else {
-			echo 'error';
+			$output .= "\t\t<h2>error</h2>";
 		}
+		$output .= "\t</body>\n</html>";
+		echo $output;
 	}
 }
 
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1442)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1443)
@@ -52,6 +52,6 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.2.RC5');
-if(!defined('REVISION')) define('REVISION', '1442');
+if(!defined('REVISION')) define('REVISION', '1443');
 
 ?>
Index: branches/2.8.x/wb/framework/class.admin.php
===================================================================
--- branches/2.8.x/wb/framework/class.admin.php	(revision 1442)
+++ branches/2.8.x/wb/framework/class.admin.php	(revision 1443)
@@ -175,11 +175,14 @@
 	}
 	
 	// Print the admin footer
-	function print_footer() {
+		function print_footer($activateJsAdmin = false) {
 		// include the required file for Javascript admin
-		if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')){
-		@include(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php');
+		if($activateJsAdmin != false) {
+			if(file_exists(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php')){
+				@include_once(WB_PATH.'/modules/jsadmin/jsadmin_backend_include.php');
+			}
 		}
+
 		$footer_template = new Template(THEME_PATH.'/templates');
 		$footer_template->set_file('page', 'footer.htt');
 		$footer_template->set_block('page', 'footer_block', 'header');
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 1442)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 1443)
@@ -377,6 +377,9 @@
 	// Print a success message which then automatically redirects the user to another page
 	function print_success( $message, $redirect = 'index.php' ) {
 	    global $TEXT;
+        if(is_array($message)) {
+           $message = implode ('<br />',$message);
+        }
 	    // fetch redirect timer for sucess messages from settings table
 	    $redirect_timer = ((defined( 'REDIRECT_TIMER' )) && (REDIRECT_TIMER <= 10000)) ? REDIRECT_TIMER : 0;
 	    // add template variables
@@ -402,6 +405,9 @@
 	// Print an error message
 	function print_error($message, $link = 'index.php', $auto_footer = true) {
 		global $TEXT;
+        if(is_array($message)) {
+           $message = implode ('<br />',$message);
+        }
 		$success_template = new Template(THEME_PATH.'/templates');
 		$success_template->set_file('page', 'error.htt');
 		$success_template->set_block('page', 'main_block', 'main');
@@ -461,4 +467,3 @@
 	}
 
 }
-?>
Index: branches/2.8.x/wb/framework/frontend.functions.php
===================================================================
--- branches/2.8.x/wb/framework/frontend.functions.php	(revision 1442)
+++ branches/2.8.x/wb/framework/frontend.functions.php	(revision 1443)
@@ -593,6 +593,26 @@
     }
 }
 
+	function moveCssToHead($content) {
+		// move css definitions into head section
+		$pattern1 = '/(?:.*?<body.*?)(<link[^>]*?\"text\/css\".*?\/>)(?:.*)/si';
+		$pattern2 = '/(?:.*?<body.*?)(<style[^>]*?\"text\/css\"[^>]*?>.*?<\/style>)(?:.*)/si';
+		$insert1 = array();
+		$insert2 = array();
+		if(preg_match_all($pattern1, $content, $matches)) {
+			$insert1 = $matches[1];
+			$content = str_replace($insert1, '', $content);
+		}
+		if(preg_match_all($pattern2, $content, $matches)) {
+			$insert2 = $matches[1];
+			$content = str_replace($insert2, '', $content);
+		}
+		$insert = array_merge($insert1, $insert2);
+		$insert = "\n".implode("\n", $insert)."\n</head>\n<body";
+		$content = preg_replace('/<\/head>.*?<body/si', $insert, $content);
+		return $content;
+	}
+
 // Begin WB < 2.4.x template compatibility code
 	// Make extra_sql accessable through private_sql
 	$private_sql = $extra_sql;
@@ -610,5 +630,3 @@
 // End WB < 2.4.x template compatibility code
 // Include template file
 
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/index.php
===================================================================
--- branches/2.8.x/wb/index.php	(revision 1442)
+++ branches/2.8.x/wb/index.php	(revision 1443)
@@ -145,7 +145,9 @@
         $output = filter_frontend_output($output);
     }
 }
+
+// move css definitions into head section
+$output = moveCssToHead($output);
 echo $output;
 // end of wb-script
 exit;
-?>
