Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1353)
+++ branches/2.8.x/CHANGELOG	(revision 1354)
@@ -11,6 +11,10 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.2 -------------------------------------
+26 Dec-2010 Dietmar Woellbrink (Luisehahne)
++ added admin/images
+# fixed save handling settings entries
+! local sync
 26 Dec-2010 Frank Heyne (FrankH)
 # security fix: in modules/admin.php - check whether section belongs to page
 ! security fix: changed $section_required into $no_section_required (apparently used by no module at all)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1353)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1354)
@@ -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.RC1');
-if(!defined('REVISION')) define('REVISION', '1353');
+if(!defined('REVISION')) define('REVISION', '1354');
 
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/admin/settings/save.php
===================================================================
--- branches/2.8.x/wb/admin/settings/save.php	(revision 1353)
+++ branches/2.8.x/wb/admin/settings/save.php	(revision 1354)
@@ -129,42 +129,61 @@
 	$dir_mode = "0".$u.$g.$o;
 }
 
+$allow_tags_in_fields = array('website_header', 'website_footer');
+$allow_empty_values = array('website_header','website_footer','sec_anchor','pages_directory','page_spacer');
+$disallow_in_fields = array('pages_directory', 'media_directory','wb_version');
 // Create new database object
 /*$database = new database(); */
 
 // Query current settings in the db, then loop through them and update the db with the new value
-$query = "SELECT name FROM ".TABLE_PREFIX."settings";
-$results = $database->query($query);
-while($setting = $results->fetchRow())
+$settings = array();
+$old_settings = array();
+// Query current settings in the db, then loop through them to get old values
+$sql = 'SELECT `name`, `value` FROM `'.TABLE_PREFIX.'settings`';
+$sql .= 'ORDER BY `name`';
+
+$res_settings = $database->query($sql);
+
+while($setting = $res_settings->fetchRow())
 {
+	$old_settings[$setting['name']] = $setting['value'];
 	$setting_name = $setting['name'];
 	$value = $admin->get_post($setting_name);
-	if ($setting_name!='wb_version')
+	switch ($setting_name) {
+		case 'default_timezone':
+			$value=$value*60*60;
+			break;
+		case 'string_dir_mode':
+			$value=$dir_mode;
+			break;
+		case 'string_file_mode':
+			$value=$file_mode;
+			break;
+		case 'pages_directory':
+			if(trim($value)=='/') $value='';
+			break;
+		default :
+
+			break;
+	}
+    if (!in_array($setting_name, $allow_tags_in_fields))
     {
-		$allow_tags_in_fields = array('website_header', 'website_footer','wbmailer_smtp_password');
-		if(!in_array($setting_name, $allow_tags_in_fields)) {
-			$value = strip_tags($value);
-		}
+        $value = strip_tags($value);
+    }
 
-		switch ($setting_name) {
-			case 'default_timezone':
-				$value=$value*60*60;
-				break;
-			case 'string_dir_mode':
-				$value=$dir_mode;
-				break;
-			case 'string_file_mode':
-				$value=$file_mode;
-				break;
-			case 'pages_directory':
-				if(trim($value)=='/') $value='';
-				break;
-			default :
+    $passed = in_array($setting_name, $allow_empty_values);
 
-				break;
-		}
-		$value = $admin->add_slashes($value);
-		$database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$setting_name'");
+    if ( !in_array($value, $disallow_in_fields) && ((trim($value) <> '') || $passed == true) )
+    {
+        $value = trim($admin->add_slashes($value));
+        $sql = 'UPDATE `'.TABLE_PREFIX.'settings` ';
+        $sql .= 'SET `value` = \''.$value.'\' ';
+        $sql .= 'WHERE `name` <> \'wb_version\' ';
+        $sql .= 'AND `name` = \''.$setting_name.'\' ';
+
+        if ($database->query($sql))
+        {
+        }
 	}
 }
 
Index: branches/2.8.x/wb/admin/images/modify_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/modify_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/noclock_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/noclock_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/minus_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/minus_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/hidden_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/hidden_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/clock_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/clock_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/visible_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/visible_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/none_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/none_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/delete_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/delete_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/blank.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/gif

Property changes on: branches/2.8.x/wb/admin/images/blank.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/gif
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/index.php
===================================================================
--- branches/2.8.x/wb/admin/images/index.php	(nonexistent)
+++ branches/2.8.x/wb/admin/images/index.php	(revision 1354)
@@ -0,0 +1,28 @@
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2008, Ryan Djurovich
+
+ Website Baker is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+header("Location: ../../index.php");
+
+?>
\ No newline at end of file

Property changes on: branches/2.8.x/wb/admin/images/index.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Revision Id HeadURL
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/reload_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/reload_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/deleted_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/deleted_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/down_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/down_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/view_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/view_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/private_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/private_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/keys_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/keys_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/folder_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/folder_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/clock_del_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/clock_del_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/up_folder_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/up_folder_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/README.txt
===================================================================
--- branches/2.8.x/wb/admin/images/README.txt	(nonexistent)
+++ branches/2.8.x/wb/admin/images/README.txt	(revision 1354)
@@ -0,0 +1,10 @@
+The folder admin/images isn't needed for WB 2.8. anymore.
+
+It remains only to keep backward compatibility to old modules
+wich make use of the images from this folder.
+
+Modules should be adapted as soon as possible to use images
+from the backend themes instead.
+
+If you are shure you have only Modules wich uses images from
+backend themes, this folder can be deleted.
\ No newline at end of file

Property changes on: branches/2.8.x/wb/admin/images/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Revision
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/restore_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/restore_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/plus_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/plus_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/up_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/up_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Index: branches/2.8.x/wb/admin/images/clock_red_16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Property changes on: branches/2.8.x/wb/admin/images/clock_red_16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
