Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1542)
+++ branches/2.8.x/CHANGELOG	(revision 1543)
@@ -11,6 +11,10 @@
 ! = Update/Change
 
 =========================== add small Features 2.8.2 ==========================
+14 Dez-2011 Build 1543 Dietmar Woellbrink (Luisehahne)
+# fix droplet sectionPicker
+# fix install config.php not writeable 
+# check table droplet if empty import examples
 12 Dez-2011 Build 1542 Dietmar Woellbrink (Luisehahne)
 # fix wrong background url in "Website Under Construction"
 12 Dez-2011 Build 1541 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1542)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1543)
@@ -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', '1542');
+if(!defined('REVISION')) define('REVISION', '1543');
 if(!defined('SP')) define('SP', 'SP2');
Index: branches/2.8.x/wb/admin/addons/reload.php
===================================================================
--- branches/2.8.x/wb/admin/addons/reload.php	(revision 1542)
+++ branches/2.8.x/wb/admin/addons/reload.php	(revision 1543)
@@ -143,5 +143,3 @@
 $admin->print_header();
 $admin->print_success(implode($msg, '<br />'), $js_back);
 $admin->print_footer();
-
-?>
\ No newline at end of file
Index: branches/2.8.x/wb/install/index.php
===================================================================
--- branches/2.8.x/wb/install/index.php	(revision 1542)
+++ branches/2.8.x/wb/install/index.php	(revision 1543)
@@ -194,30 +194,38 @@
 	$configFile = '/config.php';
 	if(!isset($_SESSION['config_rename']) )
 	{
-
+// cnfig.php or config.php.new
 		if( (file_exists($wb_path.$configFile)==true))
 		{
-
-			if ( filesize($wb_path.$configFile) > 128)
+// next operation only if file is writeable
+			if(is_writeable($wb_path.$configFile))
 			{
-				$installFlag = false;
-				$config = '<font class="bad">Not empty!!?</font>';
-			} elseif(!$handle = fopen($wb_path.$configFile, 'w') )
-			{
-				$installFlag = false;
-                $config = '<font class="bad">Not Writeable</font>';
-			} else {
-				if (fwrite($handle, $config_content) === FALSE) {
+// already installed? it's not empty
+				if ( filesize($wb_path.$configFile) > 128)
+				{
 					$installFlag = false;
+					$config = '<font class="bad">Not empty!!?</font>';
+// try to open and to write
+				} elseif( !$handle = fopen($wb_path.$configFile, 'w') )
+				{
+					$installFlag = false;
 	                $config = '<font class="bad">Not Writeable</font>';
 				} else {
-					$config = '<font class="good">Writeable</font>';
-					$_SESSION['config_rename'] = true;
-				}
-				// Close file
-				fclose($handle);
-				}
-
+					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);
+					}
+			} else {
+				$installFlag = false;
+                $config = '<font class="bad">Not Writeable</font>';
+			}
+// it's config.php.new
 		} elseif((file_exists($wb_path.'/config.php.new')==true))
 		{
 			$configFile = '/config.php.new';
Index: branches/2.8.x/wb/modules/droplets/example/SectionPicker.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/SectionPicker.php	(revision 1542)
+++ branches/2.8.x/wb/modules/droplets/example/SectionPicker.php	(revision 1543)
@@ -1,6 +1,6 @@
 //:Load the view.php from any other section-module
 //:Use [[SectionPicker?sid=123]]
-global $database, $wb, $TEXT, $DGTEXT;
+global $database, $wb, $TEXT, $DGTEXT, $output;
 $content = '';
 if( intval($sid)>0 ) {
 	$sql  = 'SELECT `page_id`, `section_id`, `module` FROM `'.TABLE_PREFIX.'sections` ';
@@ -14,15 +14,15 @@
 		$_sFrontendCss = '/modules/'.$module.'/frontend.css';
 		if(is_readable(WB_PATH.$_sFrontendCss)) {
 			$_sSearch = preg_quote(WB_URL.'/modules/'.$module.'/frontend.css', '/');
-			if(preg_match('/<link[^>]*?href\s*=\s*\"'.$_sSearch.'\".*?\/>/si', $wb_page_data)) {
+			if(preg_match('/<link[^>]*?href\s*=\s*\"'.$_sSearch.'\".*?\/>/si', $output)) {
 				$_sFrontendCss = '';
 			}else {
 				$_sFrontendCss = '<link href="'.WB_URL.$_sFrontendCss.'" rel="stylesheet" type="text/css" media="screen" />';
 			}
-		}
+		} else { $_sFrontendCss = ''; }
 		ob_start();
 		require(WB_PATH.'/modules/'.$module.'/view.php');
 		$content = $_sFrontendCss.ob_get_clean();
 	}
 }
-return $content;
+return $content;
\ No newline at end of file
Index: branches/2.8.x/wb/modules/droplets/tool.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/tool.php	(revision 1542)
+++ branches/2.8.x/wb/modules/droplets/tool.php	(revision 1543)
@@ -25,6 +25,7 @@
 }
 /* -------------------------------------------------------- */
 
+$msg = array();
 // Load Language file
 if(LANGUAGE_LOADED) {
 	if(!file_exists(WB_PATH.'/modules/droplets/languages/'.LANGUAGE.'.php')) {
@@ -50,17 +51,21 @@
 $admintool_url = ADMIN_URL .'/admintools/index.php';
 
 //removes empty entries from the table so they will not be displayed
-$sql = 'DELETE FROM '.TABLE_PREFIX.'mod_droplets ';
+$sql = 'DELETE FROM `'.TABLE_PREFIX.'mod_droplets` ';
 $sql .= 'WHERE name = \'\' ';
-$database->query($sql);
-
-?>
-
-<br />
+if( !$database->query($sql) ) {
+	$msg[] = $database->get_error();
+}
+// if import failed after installation, should be only 1 time
+$sql = 'SELECT COUNT(`id`) FROM `'.TABLE_PREFIX.'mod_droplets` ';
+if( !$database->get_one($sql) ) {
+	include('install.php');
+}
+?><br />
 <table summary="" cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
 	<td valign="bottom" width="50%">
-		<button class="add" type="button" name="add_droplet" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/droplets/add_droplet.php';"><?php echo $TEXT['ADD'].' '.$DR_TEXT['DROPLETS']; ?></button>	
+		<button class="add" type="button" name="add_droplet" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/droplets/add_droplet.php';"><?php echo $TEXT['ADD'].' '.$DR_TEXT['DROPLETS']; ?></button>
 	</td>
 	<!-- commentet out the droplets logo for a more similar backend design with other admin tools
 	<td align="center"><img src="<?php /*echo WB_URL;*/ ?>/modules/droplets/img/droplets_logo.png" border="1" alt=""/></td>
