From f0b3e5fe4f3d40a95e1f4f6e8cd62246a7c93c83 Mon Sep 17 00:00:00 2001
From: cfoe <cfoe@ispconfig3>
Date: Wed, 27 Jun 2012 05:02:13 -0400
Subject: [PATCH] changed template switch folder to _theme-name_/templates/_module-name_/*

---
 interface/lib/classes/remoting_lib.inc.php |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 9e19548..784b9c4 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -44,9 +44,9 @@
 *        Tabellendefinition
 *
 *        Datentypen:
-*        - INTEGER (Wandelt Ausdr�cke in Int um)
+*        - INTEGER (Wandelt Ausdr�cke in Int um)
 *        - DOUBLE
-*        - CURRENCY (Formatiert Zahlen nach W�hrungsnotation)
+*        - CURRENCY (Formatiert Zahlen nach W�hrungsnotation)
 *        - VARCHAR (kein weiterer Format Check)
 *        - DATE (Datumsformat, Timestamp Umwandlung)
 *
@@ -60,10 +60,10 @@
 *        - Wert oder Array
 *
 *        SEPARATOR
-*        - Trennzeichen f�r multiple Felder
+*        - Trennzeichen f�r multiple Felder
 *
 *        Hinweis:
-*        Das ID-Feld ist nicht bei den Table Values einzuf�gen.
+*        Das ID-Feld ist nicht bei den Table Values einzuf�gen.
 */
 
 class remoting_lib {
@@ -121,7 +121,7 @@
     	function loadFormDef($file) {
 			global $app,$conf;
             
-			include_once($file);
+			include($file);
 				
 			$this->formDef = $form;
 			unset($this->formDef['tabs']);
@@ -474,7 +474,7 @@
                                 break;
                                 case 'ISINT':
 									if(function_exists('filter_var')) {
-										if(!filter_var($field_value, FILTER_VALIDATE_INT)) {
+										if($vield_value != '' && filter_var($field_value, FILTER_VALIDATE_INT) === false) {
 											$errmsg = $validator['errmsg'];
                                             if(isset($this->wordbook[$errmsg])) {
                                                 $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
@@ -630,17 +630,19 @@
                                                         $sql_insert_val .= "'".$record[$key]."', ";
                                                 }
                                         } else {
+										
                                                 if($field['formtype'] == 'PASSWORD') {
-														if($field['encryption'] == 'CRYPT') {
+														if(isset($field['encryption']) && $field['encryption'] == 'CRYPT') {
                                                                 $record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
-                                                        } elseif ($field['encryption'] == 'MYSQL') {
-																$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
-														} elseif ($field['encryption'] == 'CLEARTEXT') {
-																$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
+																$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
+														} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
+																$sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), ";
+														} elseif (isset($field['encryption']) && $field['encryption'] == 'CLEARTEXT') {
+																$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
                                                         } else {
-                                                                $record[$key] = md5($record[$key]);
+                                                                $record[$key] = md5(stripslashes($record[$key]));
+																$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
                                                         }
-                                                        $sql_update .= "`$key` = '".$record[$key]."', ";
                                                 } elseif ($field['formtype'] == 'CHECKBOX') {
 														if($record[$key] == '') {
 															// if a checkbox is not set, we set it to the unchecked value

--
Gitblit v1.9.1