tbrehm
2011-09-06 2b81b8f6a61d1b3cd65e89292d82568f20e798a2
Fixed: FS#1714 - Email autoresponder eliminates <newline>
2 files modified
15 ■■■■ changed files
interface/lib/classes/tform.inc.php 13 ●●●● patch | view | raw | blame | history
interface/lib/classes/tform_actions.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tform.inc.php
@@ -600,7 +600,7 @@
        * @param record = Datensatz als Array
        * @return record
        */
        function encode($record,$tab) {
        function encode($record,$tab,$dbencode = true) {
            global $app;
            
                if(!is_array($this->formDef['tabs'][$tab])) $app->error("Tab is empty or does not exist (TAB: $tab).");
@@ -614,14 +614,14 @@
                                switch ($field['datatype']) {
                                case 'VARCHAR':
                                        if(!@is_array($record[$key])) {
                                                $new_record[$key] = (isset($record[$key]))?$app->db->quote($record[$key]):'';
                                                $new_record[$key] = (isset($record[$key]))?$record[$key]:'';
                                        } else {
                                                $new_record[$key] = implode($field['separator'],$record[$key]);
                                        }
                                break;
                                case 'TEXT':
                                        if(!is_array($record[$key])) {
                                                $new_record[$key] = $app->db->quote($record[$key]);
                                                $new_record[$key] = $record[$key];
                                        } else {
                                                $new_record[$key] = implode($field['separator'],$record[$key]);
                                        }
@@ -658,7 +658,7 @@
                                        //if($key == 'refresh') die($record[$key]);
                                break;
                                case 'DOUBLE':
                                        $new_record[$key] = $app->db->quote($record[$key]);
                                        $new_record[$key] = $record[$key];
                                break;
                                case 'CURRENCY':
                                        $new_record[$key] = str_replace(",",".",$record[$key]);
@@ -686,8 +686,9 @@
                                                $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                        }
                                }
                                //* Add slashes to all records, when we encode data which shall be inserted into mysql.
                                if($dbencode == true) $new_record[$key] = $app->db->quote($new_record[$key]);
                        }
                }
                return $new_record;
interface/lib/classes/tform_actions.inc.php
@@ -537,7 +537,7 @@
                        if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission'));
                } else {
                        // $record = $app->tform->encode($_POST,$this->active_tab);
                        $record = $app->tform->encode($this->dataRecord,$this->active_tab);
                        $record = $app->tform->encode($this->dataRecord,$this->active_tab,false);
                }
                $this->dataRecord = $record;