Changeset 445 for trunk/Common
- Timestamp:
- Oct 15, 2012, 6:41:56 PM (13 years ago)
- Location:
- trunk/Common
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Error.php
r443 r445 3 3 class ErrorHandler extends Module 4 4 { 5 var $Encoding; 6 7 function __construct() 8 { 9 $this->Encoding = 'utf-8'; 10 } 11 5 12 function Init() 6 13 { … … 31 38 if(($UserErrors & $Number)) 32 39 { 33 $Error = '# '.$Date. ' : '.$Message.' on line '.$LineNumber.' in '.$FileName."\n";40 $Error = '# '.$Date."\n"; 34 41 $Backtrace = debug_backtrace(); 35 $Backtrace[0]['function'] = '';42 $Backtrace[0]['function'] = $Message; 36 43 $Backtrace[0]['args'] = ''; 37 $Backtrace[0]['file'] = '';38 $Backtrace[0]['line'] = '';44 $Backtrace[0]['file'] = $FileName; 45 $Backtrace[0]['line'] = $LineNumber; 39 46 //$First = array_shift($Backtrace); 40 //print_r($ First);47 //print_r($Backtrace); 41 48 42 49 //array_unshift($Backtrace, $First); … … 70 77 echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>'."\n". 71 78 '<meta http-equiv="Content-Language" content="cs">'."\n". 72 '<meta http-equiv="Content-Type" content="text/html; charset= iso-8859-2"></head><body>'."\n".79 '<meta http-equiv="Content-Type" content="text/html; charset='.$this->Encoding.'"></head><body>'."\n". 73 80 'Došlo k vnitřní chybě!<br/> O chybě byl uvědoměn správce webu a chybu brzy odstraní.<br/><br/>'); 74 81 echo('<pre>'.$Error.'</pre><br/>'); // V případě ladění chybu i zobraz -
trunk/Common/Forms.php
r442 r445 168 168 $Values = array(); 169 169 foreach($this->Definition['Items'] as $Index => $Item) 170 if(!array_key_exists($Item['Type'], $FormTypes) or 171 (array_key_exists($Item['Type'], $FormTypes) and ($FormTypes[$Item['Type']]['Type'] != 'ManyToOne'))) 170 172 { 171 173 //if(array_key_exists($Context.$Index, $_POST)) -
trunk/Common/Types/Date.php
r442 r445 11 11 global $MonthNames; 12 12 13 if( strtolower($Item['Value']) == 'now') $Item['Value'] = time();13 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 14 14 $Parts = getdate($Item['Value']); 15 15 … … 22 22 global $MonthNames; 23 23 24 if( strtolower($Item['Value']) == 'now') $Item['Value'] = time();24 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 25 25 $Parts = getdate($Item['Value']); 26 26 -
trunk/Common/Types/DateTime.php
r442 r445 11 11 global $MonthNames; 12 12 13 if( strtolower($Item['Value']) == 'now') $Item['Value'] = time();13 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 14 14 $Parts = getdate($Item['Value']); 15 15 $Output = $Parts['mday'].'.'.$Parts['mon'].'.'.$Parts['year'].' '. … … 22 22 global $MonthNames; 23 23 24 if( strtolower($Item['Value']) == 'now') $Item['Value'] = time();24 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 25 25 $Parts = getdate($Item['Value']); 26 26 -
trunk/Common/Types/Enumeration.php
r435 r445 18 18 $Type = $this->System->Type->GetTypeDefinition($Item['Type']); 19 19 $Output = '<select name="'.$Item['Name'].'">'; 20 foreach($Type['Parameters'] as $Index => $StateName)20 foreach($Type['Parameters']['States'] as $Index => $StateName) 21 21 { 22 22 if($Item['Value'] == $Index) $Selected = ' selected="1"'; else $Selected = ''; -
trunk/Common/Types/Time.php
r442 r445 9 9 function OnView($Item) 10 10 { 11 if( strtolower($Item['Value']) == 'now') $Item['Value'] = time();11 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 12 12 $TimeParts = getdate($Item['Value']); 13 13 … … 18 18 function OnEdit($Item) 19 19 { 20 if( strtolower($Item['Value']) == 'now') $Item['Value'] = time();20 if((strtolower($Item['Value']) == 'now') or (strtolower($Item['Value']) == '')) $Item['Value'] = time(); 21 21 $TimeParts = getdate($Item['Value']); 22 22
Note:
See TracChangeset
for help on using the changeset viewer.