tbrehm
2011-02-22 d01b23c364f1094e674c555164261699bf11fa2b
- Fixed a link problem with client list.
- Fixed Date parsing function when PHP version < 5.3
- Added missing / in language file loading function.
3 files modified
20 ■■■■ changed files
interface/lib/app.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tform.inc.php 17 ●●●● patch | view | raw | blame | history
interface/web/client/client_edit.php 1 ●●●● patch | view | raw | blame | history
interface/lib/app.inc.php
@@ -163,7 +163,7 @@
            //* Load module wordbook, if it exists
            if(isset($_SESSION['s']['module']['name']) && isset($_SESSION['s']['language'])) {
                $lng_file = '/web/'.$_SESSION['s']['module']['name'].'/lib/lang/'.$_SESSION['s']['language'].'.lng';
                if(!file_exists(ISPC_ROOT_PATH.$lng_file)) $lng_file = '/web/'.$_SESSION['s']['module']['name'].'/lib/lang/en.lng';
                if(!file_exists(ISPC_ROOT_PATH.'/'.$lng_file)) $lng_file = '/web/'.$_SESSION['s']['module']['name'].'/lib/lang/en.lng';
                $this->load_language_file($lng_file);
            }
            $this->_language_inc = 1;
interface/lib/classes/tform.inc.php
@@ -624,11 +624,18 @@
                                break;
                                case 'DATE':
                                        if($record[$key] != '' && $record[$key] != '0000-00-00') {
                                                $date_parts = date_parse_from_format($this->dateformat,$record[$key]);
                                                //list($tag,$monat,$jahr) = explode('.',$record[$key]);
                                                $new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day'];
                                                //$tmp = strptime($record[$key],$this->dateformat);
                                                //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday'];
                                                if(function_exists('date_parse_from_format')) {
                                                    $date_parts = date_parse_from_format($this->dateformat,$record[$key]);
                                                    //list($tag,$monat,$jahr) = explode('.',$record[$key]);
                                                    $new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day'];
                                                    //$tmp = strptime($record[$key],$this->dateformat);
                                                    //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday'];
                                                } else {
                                                    //$tmp = strptime($record[$key],$this->dateformat);
                                                    //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday'];
                                                    $tmp = strtotime($record[$key]);
                                                    $new_record[$key] = date('Y-m-d',$tmp);
                                                }
                                        } else {
                                            $new_record[$key] = '0000-00-00';
                                        }
interface/web/client/client_edit.php
@@ -124,6 +124,7 @@
        }
        $app->tpl->setVar('template_additional_list', $text);
        $app->tpl->setVar('app_module','client');
        parent::onShowEnd();