Index: /changelog
===================================================================
--- /changelog	(revision 7667)
+++ /changelog	(revision 7668)
@@ -331,2 +331,3 @@
 - Feature: Option "Nach dem entfernen eines Produktes auf die gÃŒnstigste Zahlungsart wechseln" hinzugefÃŒgt
 - Bugfix: Verlinkung aus ProduktgruppenÃŒbersicht ÃŒber Link "Zur Produktliste" funktioniert wieder
+- Bugfix: Einstellungen im Lieferscheinmodul sind jezt wieder speicherbar
Index: /controller/wpsg_SystemController.class.php
===================================================================
--- /controller/wpsg_SystemController.class.php	(revision 7667)
+++ /controller/wpsg_SystemController.class.php	(revision 7668)
@@ -99,5 +99,5 @@
 				// Not valid
 				
-				$GLOBALS['wpsg_sc']->addBackendError(__('Ihre Eingaben in den markierten Feldern waren ungÃŒltig, bitte ÃŒberprÃŒfen.', 'wpsg'));
+				$GLOBALS['wpsg_sc']->addBackendError(__('Ihre Eingaben in den markierten Feldern waren ungÃŒltig, bitte ÃŒberprÃŒfen.', 'wpsg').$key.$value);
 				
 				$_SESSION['sanitization_err_fields'][$key] = 0;
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 7667)
+++ /mods/wpsg_mod_basic.class.php	(revision 7668)
@@ -759,6 +759,7 @@
 		 * Hilfsfunktion, die von den Versand- und Zahlungsmodulen genutzt werden kann
 		 * Berechnet den Preis anhand des PreisschlÃŒssels und der MwSt
-		 * @param String $preis_key 	Der PreisschlÃŒssel derzeit absolute oder prozentuale Werte
-		 * @param double $preis			Der Preis auf den sich die prozentualen Angaben beziehen sollen
+		 * @param String $preis_key Der PreisschlÃŒssel derzeit absolute oder prozentuale Werte
+		 * @param double $preis Der Preis auf den sich die prozentualen Angaben beziehen sollen
+		 * @return float|int|string
 		 */
 		protected function getPreis($preis_key, $preis)
Index: /mods/wpsg_mod_deliverynote.class.php
===================================================================
--- /mods/wpsg_mod_deliverynote.class.php	(revision 7667)
+++ /mods/wpsg_mod_deliverynote.class.php	(revision 7668)
@@ -123,13 +123,37 @@
 		} // public function settings_edit()
 
-		public function settings_save()
-		{
-
-			$serText = @serialize($_REQUEST['text']);
+		public function settings_save() {
+
+			//$serText = @serialize($_REQUEST['text']);
+			
+			$bCheckTextField = true;
+			
+			foreach ($_REQUEST['text'] as $k => $v) {
+				
+				if (
+					!in_array($k, ['firma', 'name', 'strasse', 'plzort', 'land', 'tel', 'fax', 'mail', 'web', 'strnr', 'ustidnr', 'knr', 'blz', 'bank', 'user1', 'user2', 'user3', 'user4', 'user5']) ||
+					!wpsg_checkInput($v['text'], WPSG_SANITIZE_TEXTFIELD) ||
+					!wpsg_checkInput($v['x'], WPSG_SANITIZE_FLOAT) ||
+					!wpsg_checkInput($v['y'], WPSG_SANITIZE_FLOAT) ||
+					!wpsg_checkInput($v['color'], WPSG_SANITIZE_HEXCOLOR) ||
+					!wpsg_checkInput($v['fontsize'],WPSG_SANITIZE_INT)
+				) {
+					
+					$this->shop->addBackendError(__('Bitte ÃŒberprÃŒfen Sie die Textfelder.', 'wpsg'));
+					$bCheckTextField = false;
+					
+				}
+				
+			}
+						
+			if ($bCheckTextField) {
+				
+				$this->shop->update_option("wpsg_mod_deliverynote_texte", $_REQUEST['text']);
+				
+			}
 			
 		    $this->shop->update_option('wpsg_mod_deliverynote_nrformat', $_REQUEST['wpsg_mod_deliverynote_nrformat'], false, false, WPSG_SANITIZE_TEXTFIELD);
 		    $this->shop->update_option('wpsg_mod_deliverynote_nr', $_REQUEST['wpsg_mod_deliverynote_nr'], false, false, WPSG_SANITIZE_TEXTFIELD);
-		    $this->shop->update_option('wpsg_mod_deliverynote_foottext_standard', false, false, WPSG_SANITIZE_TEXTFIELD, ['allowEmpty' => true]);
-			$this->shop->update_option('wpsg_mod_deliverynote_texte', $serText, false, false, WPSG_SANITIZE_TEXTFIELD);
+		    $this->shop->update_option('wpsg_mod_deliverynote_foottext_standard', $_REQUEST['wpsg_mod_deliverynote_foottext_standard'], false, false, WPSG_SANITIZE_INT, ['allowEmpty' => true]);
 			$this->shop->update_option('wpsg_mod_deliverynote_url', $_REQUEST['wpsg_mod_deliverynote_url'], false, false, WPSG_SANITIZE_TEXTFIELD);
 			$this->shop->update_option('wpsg_mod_deliverynote_url_standard', $_REQUEST['wpsg_mod_deliverynote_url_standard'], false, false, WPSG_SANITIZE_CHECKBOX);
@@ -145,25 +169,22 @@
 			$this->shop->update_option('wpsg_mod_deliverynote_anr', $_REQUEST['wpsg_mod_deliverynote_anr'], false, false, WPSG_SANITIZE_VALUES, ['0', '1', '2']);
 
-			if (file_exists($_FILES['wpsg_mod_deliverynote_bp']['tmp_name']))
-			{
+			if (file_exists($_FILES['wpsg_mod_deliverynote_bp']['tmp_name'])) {
 
 				$ending = strtolower(preg_replace("/(.*)\./", "", $_FILES['wpsg_mod_deliverynote_bp']['name']));
 
-				if ($ending != "jpg" && $ending != "jpeg" && $ending != "pdf")
-				{
+				if ($ending != "jpg" && $ending != "jpeg" && $ending != "pdf") {
+					
 					$this->shop->addBackendError(__("UngÃŒltiger Dateityp (Briefpapier) ! Es sind nur JPG und PDF Dateien erlaubt!", "wpsg"));
-				}
-				else if ($ending == "jpg" || $ending == "jpeg")
-				{
+					
+				} else if ($ending == "jpg" || $ending == "jpeg") {
+					
 					move_uploaded_file($_FILES['wpsg_mod_deliverynote_bp']['tmp_name'], $this->getFilePath('').'wpsg_deliverynote_bp.jpg');
-				}
-				else if ($ending == "pdf")
-				{
+					
+				} else if ($ending == "pdf") {
+					
 					move_uploaded_file($_FILES['wpsg_mod_deliverynote_bp']['tmp_name'], $this->getFilePath('').'wpsg_deliverynote_bp.pdf');
 				}
 
-			}
-			else if ((array_key_exists('wpsg_mod_deliverynote_bp_del', $_REQUEST)) && ($_REQUEST['wpsg_mod_deliverynote_bp_del'] == "1"))
-			{
+			} else if ((array_key_exists('wpsg_mod_deliverynote_bp_del', $_REQUEST)) && ($_REQUEST['wpsg_mod_deliverynote_bp_del'] == "1")) {
 
 				@unlink($this->getFilePath('').'wpsg_deliverynote_bp.jpg');
@@ -173,5 +194,6 @@
 
 			}
-
+			
+			$wpsg_mod_deliverynote_logo_position = '';
 
 			if (array_key_exists('wpsg_mod_deliverynote_logo_position_left', $_REQUEST) && strpos($_REQUEST['wpsg_mod_deliverynote_logo_position_left'], 'selected') !== false)
@@ -185,21 +207,18 @@
 
 
-			if (file_exists($_FILES['wpsg_mod_deliverynote_logo']['tmp_name']))
-			{
+			if (file_exists($_FILES['wpsg_mod_deliverynote_logo']['tmp_name'])) {
 
 				$ending = strtolower(preg_replace("/(.*)\./", "", $_FILES['wpsg_mod_deliverynote_logo']['name']));
 
-				if ($ending != "jpg" && $ending != "jpeg")
-				{
+				if ($ending != "jpg" && $ending != "jpeg") {
+					
 					$this->shop->addBackendError(__("UngÃŒltiger Dateityp (Logo) ! Es sind nur JPG und PDF Dateien erlaubt!", "wpsg"));
-				}
-				else if ($ending == "jpg" || $ending == "jpeg")
-				{
+					
+				} else if ($ending == "jpg" || $ending == "jpeg") { 
+					
 					move_uploaded_file($_FILES['wpsg_mod_deliverynote_logo']['tmp_name'], $this->getFilePath('').'wpsg_deliverynote_logo.jpg');
 				}
 
-			}
-			else if ((array_key_exists('wpsg_mod_deliverynote_logo_del', $_REQUEST)) && (wpsg_sinput("key", $_REQUEST['wpsg_mod_deliverynote_logo_del']) == "1"))
-			{
+			} else if (isset($_REQUEST['wpsg_mod_deliverynote_logo_del']) && $_REQUEST['wpsg_mod_deliverynote_logo_del'] === '1') {
 
 				@unlink($this->getFilePath('').'wpsg_deliverynote_logo.jpg');
@@ -208,32 +227,6 @@
 
 			}
-
-			$bCheckTextField = false;
-			
-			foreach ($_REQUEST['text'] as $k => $v) {
-			    
-			    if (
-			        !in_array($k, ['firma', 'name', 'strasse', 'plzort', 'land', 'tel', 'fax', 'mail', 'web', 'strnr', 'ustidnr', 'knr', 'blz', 'bank', 'user1', 'user2', 'user3', 'user4', 'user5']) ||
-			        !wpsg_checkInput($v['text'], WPSG_SANITIZE_TEXTFIELD) ||
-			        !wpsg_checkInput($v['x'], WPSG_SANITIZE_FLOAT) ||
-			        !wpsg_checkInput($v['y'], WPSG_SANITIZE_FLOAT) ||
-			        !wpsg_checkInput($v['color'], WPSG_SANITIZE_HEXCOLOR) ||
-			        !wpsg_checkInput($v['fontsize'],WPSG_SANITIZE_INT)
-			        ) {
-			            
-			            $this->shop->addBackendError(__('Bitte ÃŒberprÃŒfen Sie die Textfelder.', 'wpsg'));
-			            $bCheckTextField = true;
-			            
-			        }
-			        
-			}
-			
-			if ($bCheckTextField) {
-			    
-			    $this->shop->update_option("wpsg_mod_deliverynote_texte", $_REQUEST['text']);
-			    
-			}
-			
-			$this->shop->update_option("wpsg_mod_deliverynote_logo_position", $wpsg_mod_deliverynote_logo_position ? $wpsg_mod_deliverynote_logo_position : null);
+ 			
+			$this->shop->update_option("wpsg_mod_deliverynote_logo_position", $wpsg_mod_deliverynote_logo_position, false, false, WPSG_SANITIZE_VALUES, ['left', 'right', 'center']);
 			$this->shop->update_option("wpsg_mod_deliverynote_logo_transparency", $_REQUEST['wpsg_mod_deliverynote_logo_transparency'], false, false, WPSG_SANITIZE_TEXTFIELD);
 
@@ -955,3 +948,2 @@
 	} // class wpsg_mod_deliverynote extends wpsg_mod_basic
 
-?>
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 7667)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 7668)
@@ -312,5 +312,5 @@
 			$this->shop->update_option("wpsg_gutschrift_format", $_REQUEST['wpsg_gutschrift_format'], false, false, WPSG_SANITIZE_TEXTFIELD);
 			$this->shop->update_option('wpsg_rechnungen_adresszeile', $_REQUEST['wpsg_rechnungen_adresszeile'], false, false, WPSG_SANITIZE_TEXTFIELD);
-			$this->shop->update_option('wpsg_rechnungen_foottext_standard', $_REQUEST['wpsg_rechnungen_foottext_standard'], false, false, WPSG_SANITIZE_CHECKBOX, ['allowEmpty' => true]);
+			$this->shop->update_option('wpsg_rechnungen_foottext_standard', $_REQUEST['wpsg_rechnungen_foottext_standard'], false, false, WPSG_SANITIZE_INT, ['allowEmpty' => true]);
 			$this->shop->update_option('wpsg_mod_rechnungen_hideCountry', $_REQUEST['wpsg_mod_rechnungen_hideCountry'], false, false, WPSG_SANITIZE_CHECKBOX);
 
