Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1539)
+++ branches/2.8.x/CHANGELOG	(revision 1540)
@@ -11,6 +11,8 @@
 ! = Update/Change
 
 =========================== add small Features 2.8.2 ==========================
+11 Dez-2011 Build 1540 Dietmar Woellbrink (Luisehahne)
+! did some changes and fixes found by testers
 10 Dez-2011 Build 1539 Dietmar Woellbrink (Luisehahne)
 ! update phpmailer to version 5.1
 10 Dez-2011 Build 1538 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/media/index.php
===================================================================
--- branches/2.8.x/wb/admin/media/index.php	(revision 1539)
+++ branches/2.8.x/wb/admin/media/index.php	(revision 1540)
@@ -113,7 +113,7 @@
 // Parse template object
 $template->parse('main', 'main_block', false);
 $template->pparse('output', 'page');
-
+/*
 $endtime=explode(" ", microtime());
 $endtime=$endtime[0]+$endtime[1];
 $debugVMsg = '';
@@ -124,8 +124,6 @@
 	// $debugVMsg = print_message($debugVMsg,'#','debug',-1,false);
 	print $debugVMsg.'<br />';
  }
-
+*/
 // Print admin
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1539)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1540)
@@ -52,5 +52,5 @@
 
 // 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');
-if(!defined('REVISION')) define('REVISION', '1539');
+if(!defined('REVISION')) define('REVISION', '1540');
 if(!defined('SP')) define('SP', 'SP2');
Index: branches/2.8.x/wb/install/save.php
===================================================================
--- branches/2.8.x/wb/install/save.php	(revision 1539)
+++ branches/2.8.x/wb/install/save.php	(revision 1540)
@@ -301,7 +301,6 @@
 "";
 
 $config_filename = '../config.php';
-
 // Check if the file exists and is writable first.
 if(file_exists($config_filename) AND is_writable($config_filename)) {
 	if(!$handle = fopen($config_filename, 'w')) {
@@ -680,6 +679,7 @@
 	$dirs['modules'] = WB_PATH.'/modules/';
 	$dirs['templates'] = WB_PATH.'/templates/';
 	$dirs['languages'] = WB_PATH.'/languages/';
+
 	foreach($dirs AS $type => $dir) {
 		if($handle = opendir($dir)) {
 			while(false !== ($file = readdir($handle))) {
Index: branches/2.8.x/wb/install/index.php
===================================================================
--- branches/2.8.x/wb/install/index.php	(revision 1539)
+++ branches/2.8.x/wb/install/index.php	(revision 1540)
@@ -190,26 +190,44 @@
 		<tr>
 <?php
 	$config = '<font class="good">Writeable</font>';
+	$config_content = "<?php\n";
 	$configFile = '/config.php';
-	if(!isset($_SESSION['config_rename']) ) {
+	if(!isset($_SESSION['config_rename']) )
+	{
 
-		if( (file_exists($wb_path.$configFile)==true)) {
-			if ( filesize($wb_path.$configFile) > 128) {
+		if( (file_exists($wb_path.$configFile)==true))
+		{
+
+			if ( filesize($wb_path.$configFile) > 128)
+			{
 				$installFlag = false;
 				$config = '<font class="bad">Not empty!!?</font>';
-			} elseif( is_writeable($wb_path.$configFile)==true ) {
-				$config = '<font class="good">Writeable</font>';
-				$_SESSION['config_rename'] = true;
-			}
-		} elseif((file_exists($wb_path.'/config.php.new')==true)) {
+			} elseif(!$handle = fopen($wb_path.$configFile, 'w') )
+			{
+				$installFlag = false;
+                $config = '<font class="bad">Not Writeable</font>';
+			} else {
+				if (fwrite($handle, $config_content) === FALSE) {
+					$installFlag = false;
+	                $config = '<font class="bad">Not Writeable</font>';
+				} else {
+					$config = '<font class="good">Writeable</font>';
+					$_SESSION['config_rename'] = true;
+				}
+				// Close file
+				fclose($handle);
+				}
+
+		} elseif((file_exists($wb_path.'/config.php.new')==true))
+		{
 			$configFile = '/config.php.new';
 			$installFlag = false;
 			$config = '<font class="bad">Please rename</font>';
-		} else {
-				$installFlag = false;
-				$config = '<font class="bad">Missing!!?</font>';
+		} else
+		{
+			$installFlag = false;
+			$config = '<font class="bad">Missing!!?</font>';
 		}
-
 	}
 ?>
 			<td width="150px" style="color: #666666;"><?php print $wb_root.$configFile ?></td>
Index: branches/2.8.x/wb/modules/wrapper/info.php
===================================================================
--- branches/2.8.x/wb/modules/wrapper/info.php	(revision 1539)
+++ branches/2.8.x/wb/modules/wrapper/info.php	(revision 1540)
@@ -24,7 +24,7 @@
 /* -------------------------------------------------------- */
 
 $module_directory = 'wrapper';
-$module_name = 'Wrapper 2.8.3';
+$module_name = 'Wrapper';
 $module_function = 'page';
 $module_version = '2.8.3';
 $module_platform = '2.7 | 2.8.x';
Index: branches/2.8.x/wb/modules/wysiwyg/info.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/info.php	(revision 1539)
+++ branches/2.8.x/wb/modules/wysiwyg/info.php	(revision 1540)
@@ -23,7 +23,7 @@
 /* -------------------------------------------------------- */
 
 $module_directory = 'wysiwyg';
-$module_name = 'WYSIWYG 2.8.3';
+$module_name = 'WYSIWYG';
 $module_function = 'page';
 $module_version = '2.8.3';
 $module_platform = '2.8.2';
Index: branches/2.8.x/wb/modules/jsadmin/info.php
===================================================================
--- branches/2.8.x/wb/modules/jsadmin/info.php	(revision 1539)
+++ branches/2.8.x/wb/modules/jsadmin/info.php	(revision 1540)
@@ -16,7 +16,7 @@
  */
 
 $module_directory = 'jsadmin';
-$module_name = 'Javascript Admin 1.4.0';
+$module_name = 'Javascript Admin';
 $module_function = 'tool';
 $module_version = '1.4.0';
 $module_platform = '2.7 | 2.8.x';
Index: branches/2.8.x/wb/modules/droplets/install.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/install.php	(revision 1539)
+++ branches/2.8.x/wb/modules/droplets/install.php	(revision 1540)
@@ -25,81 +25,89 @@
 }
 /* -------------------------------------------------------- */
 
-global $admin;
+	// global $admin;
 
-$sql  = 'DROP TABLE IF EXISTS `'.TABLE_PREFIX.'mod_droplets` ';
-$database->query($sql);
+	$msg = array();
+	$sql  = 'DROP TABLE IF EXISTS `'.TABLE_PREFIX.'mod_droplets` ';
+	if( !$database->query($sql) ) {
+		$msg[] = $database->get_error();
+	}
 
-$sql  = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_droplets` ( ';
-$sql .= '`id` INT NOT NULL auto_increment, ';
-$sql .= '`name` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci  NOT NULL, ';
-$sql .= '`code` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci  NOT NULL , ';
-$sql .= '`description` TEXT  CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, ';
-$sql .= '`modified_when` INT NOT NULL default \'0\', ';
-$sql .= '`modified_by` INT NOT NULL default \'0\', ';
-$sql .= '`active` INT NOT NULL default \'0\', ';
-$sql .= '`admin_edit` INT NOT NULL default \'0\', ';
-$sql .= '`admin_view` INT NOT NULL default \'0\', ';
-$sql .= '`show_wysiwyg` INT NOT NULL default \'0\', ';
-$sql .= '`comments` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci  NOT NULL, ';
-$sql .= 'PRIMARY KEY ( `id` ) ';
-$sql .= ') ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
-$database->query($sql);
+	$sql  = 'CREATE TABLE IF NOT EXISTS `'.TABLE_PREFIX.'mod_droplets` ( ';
+	$sql .= '`id` INT NOT NULL auto_increment, ';
+	$sql .= '`name` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci  NOT NULL, ';
+	$sql .= '`code` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci  NOT NULL , ';
+	$sql .= '`description` TEXT  CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, ';
+	$sql .= '`modified_when` INT NOT NULL default \'0\', ';
+	$sql .= '`modified_by` INT NOT NULL default \'0\', ';
+	$sql .= '`active` INT NOT NULL default \'0\', ';
+	$sql .= '`admin_edit` INT NOT NULL default \'0\', ';
+	$sql .= '`admin_view` INT NOT NULL default \'0\', ';
+	$sql .= '`show_wysiwyg` INT NOT NULL default \'0\', ';
+	$sql .= '`comments` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci  NOT NULL, ';
+	$sql .= 'PRIMARY KEY ( `id` ) ';
+	$sql .= ') ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
+	if( !$database->query($sql) ) {
+		$msg[] = $database->get_error();
+	}
 
-//add all droplets from the droplet subdirectory
-$folder=opendir(WB_PATH.'/modules/droplets/example/.');
-$names = array();
-while ($file = readdir($folder)) {
-	$ext=strtolower(substr($file,-4));
-	if ($ext==".php"){
-		if ($file<>"index.php" ) {
-			$names[count($names)] = $file;
+	//add all droplets from the droplet subdirectory
+	$folder=opendir(WB_PATH.'/modules/droplets/example/.');
+	$names = array();
+	while ($file = readdir($folder)) {
+		$ext=strtolower(substr($file,-4));
+		if ($ext==".php"){
+			if ($file<>"index.php" ) {
+				$names[count($names)] = $file;
+			}
 		}
 	}
-}
-closedir($folder);
+	closedir($folder);
 
-foreach ($names as $dropfile) {
-	$droplet = addslashes(getDropletCodeFromFile($dropfile));
-	if ($droplet != "") {
-		$description = "Example Droplet";
-		$comments = "Example Droplet";
-		$cArray = explode("\n",$droplet);
-		if (substr($cArray[0],0,3) == "//:") {
-			$description = trim(substr($cArray[0],3));
-			array_shift ( $cArray );
+	foreach ($names as $dropfile)
+	{
+		$droplet = addslashes(getDropletCodeFromFile($dropfile));
+		if ($droplet != "")
+		{
+			$description = "Example Droplet";
+			$comments = "Example Droplet";
+			$cArray = explode("\n",$droplet);
+			if (substr($cArray[0],0,3) == "//:") {
+				$description = trim(substr($cArray[0],3));
+				array_shift ( $cArray );
+			}
+			if (substr($cArray[0],0,3) == "//:") {
+				$comments = trim(substr($cArray[0],3));
+				array_shift ( $cArray );
+			}
+			$droplet = implode ( "\n", $cArray );
+			$name = substr($dropfile,0,-4);
+			$modified_when = time();
+			$modified_by = (method_exists($admin, 'get_user_id') ? $admin->get_user_id() : 1);
+			$sql  = 'INSERT INTO `'.TABLE_PREFIX.'mod_droplets` SET ';
+			$sql .= '`name` = \''.$name.'\', ';
+			$sql .= '`code` = \''.$droplet.'\', ';
+			$sql .= '`description` = \''.$description.'\', ';
+			$sql .= '`comments` = \''.$comments.'\', ';
+			$sql .= '`active` = 1, ';
+			$sql .= '`modified_when` = '.$modified_when.', ';
+			$sql .= '`modified_by` = '.$modified_by;
+			if( !$database->query($sql) ) {
+				$msg[] = $database->get_error();
+			}
+			// do not output anything if this script is called during fresh installation
+			// if (method_exists($admin, 'get_user_id')) echo "Droplet import: $name<br/>";
 		}
-		if (substr($cArray[0],0,3) == "//:") {
-			$comments = trim(substr($cArray[0],3));
-			array_shift ( $cArray );
+	}
+
+	function getDropletCodeFromFile ( $dropletfile ) {
+		$data = '';
+		$filename = WB_PATH."/modules/droplets/example/".$dropletfile;
+		if (file_exists($filename)) {
+			$filehandle = fopen ($filename, "r");
+			$data = fread ($filehandle, filesize ($filename));
+			fclose($filehandle);
+			// unlink($filename); doesnt work in unix
 		}
-		$droplet = implode ( "\n", $cArray );
-		$name = substr($dropfile,0,-4);
-		$modified_when = time();
-		$modified_by = (method_exists($admin, 'get_user_id') ? $admin->get_user_id() : 1);
-		$sql  = 'INSERT INTO `'.TABLE_PREFIX.'mod_droplets` SET ';
-		$sql .= '`name` = \''.$name.'\', ';
-		$sql .= '`code` = \''.$droplet.'\', ';
-		$sql .= '`description` = \''.$description.'\', ';
-		$sql .= '`comments` = \''.$comments.'\', ';
-		$sql .= '`active` = 1, ';
-		$sql .= '`modified_when` = '.$modified_when.', ';
-		$sql .= '`modified_by` = '.$modified_by;
-		$database->query($sql);
-		
-		// do not output anything if this script is called during fresh installation
-		// if (method_exists($admin, 'get_user_id')) echo "Droplet import: $name<br/>";
+		return $data;
 	}
-}
-
-function getDropletCodeFromFile ( $dropletfile ) {
-	$data = '';
-	$filename = WB_PATH."/modules/droplets/example/".$dropletfile;
-	if (file_exists($filename)) {
-		$filehandle = fopen ($filename, "r");
-		$data = fread ($filehandle, filesize ($filename));
-		fclose($filehandle);
-		// unlink($filename); doesnt work in unix
-	}	
-	return $data;
-}
Index: branches/2.8.x/wb/modules/code/info.php
===================================================================
--- branches/2.8.x/wb/modules/code/info.php	(revision 1539)
+++ branches/2.8.x/wb/modules/code/info.php	(revision 1540)
@@ -25,7 +25,7 @@
 /* -------------------------------------------------------- */
 
 $module_directory	= 'code';
-$module_name		= 'Code 2.8.3';
+$module_name		= 'Code';
 $module_function	= 'page';
 $module_version		= '2.8.3';
 $module_platform	= '2.7 | 2.8.x';
Index: branches/2.8.x/wb/modules/news/info.php
===================================================================
--- branches/2.8.x/wb/modules/news/info.php	(revision 1539)
+++ branches/2.8.x/wb/modules/news/info.php	(revision 1540)
@@ -24,7 +24,7 @@
 }
 /* -------------------------------------------------------- */
 $module_directory   = 'news';
-$module_name        = 'News 3.5.6';
+$module_name        = 'News';
 $module_function    = 'page';
 $module_version     = '3.5.6';
 $module_platform    = '2.8.2';
