From ec09b18c9c44f85ceb6d9e7588a03a221cd1193f Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Fri, 12 Dec 2008 05:47:05 -0500 Subject: [PATCH] Disallow server changes for existing records in mail_domain_edit.php --- interface/lib/classes/listform.inc.php | 25 +++++++++++-------------- 1 files changed, 11 insertions(+), 14 deletions(-) diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php index 2c1ef02..a57fab5 100644 --- a/interface/lib/classes/listform.inc.php +++ b/interface/lib/classes/listform.inc.php @@ -28,14 +28,6 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** -* Listenbehandlung -* -* @package listform -* @author Till Brehm -* @version 1.1 -*/ - class listform { private $debug = 0; @@ -46,7 +38,7 @@ private $pagingValues; private $searchChanged = 0; private $module; - private $dateformat = 'd.m.Y'; + private $dateformat = 'Y-m-d H:i'; public $wordbook; public function loadListDef($file, $module = '') @@ -67,6 +59,9 @@ } //* Set local Language File + $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/'.$_SESSION['s']['language'].'_list.lng'; + if(!file_exists($lng_file)) $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/en_'.'_list.lng'; + include($lng_file); $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_'.$this->listDef['name'].'_list.lng'; if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$this->listDef['name'].'_list.lng'; include($lng_file); @@ -123,7 +118,7 @@ $record = array(); $values = $app->$datasource_class->$datasource_function($field, $record); } else { - $this->errorMessage .= "Custom datasource class or function is empty<br>\r\n"; + $this->errorMessage .= "Custom datasource class or function is empty<br />\r\n"; } } return $values; @@ -276,6 +271,7 @@ public function decode($record) { + global $conf; if(is_array($record)) { foreach($this->listDef['item'] as $field){ $key = $field['field']; @@ -283,7 +279,7 @@ switch ($field['datatype']){ case 'VARCHAR': case 'TEXT': - $record[$key] = htmlentities(stripslashes($record[$key])); + $record[$key] = htmlentities(stripslashes($record[$key]),ENT_QUOTES,$conf["html_content_encoding"]); break; case 'DATE': @@ -295,7 +291,7 @@ break; case 'DOUBLE': - $record[$key] = htmlentities($record[$key]); + $record[$key] = htmlentities($record[$key],ENT_QUOTES,$conf["html_content_encoding"]); break; case 'CURRENCY': @@ -303,7 +299,7 @@ break; default: - $record[$key] = htmlentities(stripslashes($record[$key])); + $record[$key] = htmlentities(stripslashes($record[$key]),ENT_QUOTES,$conf["html_content_encoding"]); } } } @@ -362,11 +358,12 @@ } function escapeArrayValues($search_values) { + global $conf; $out = array(); if(is_array($search_values)) { foreach($search_values as $key => $val) { - $out[$key] = htmlentities($val,ENT_QUOTES); + $out[$key] = htmlentities($val,ENT_QUOTES,$conf["html_content_encoding"]); } } -- Gitblit v1.9.1