From: konrad Date: Mon, 12 Jul 2010 19:28:43 +0000 (+0000) Subject: show time formats correctly X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d54b12c3267f1d274fbbb7630aa8d03d5788c6a4;p=web%2Fkonrad%2Fsmoke.git show time formats correctly load C format only for C language fix customer listing git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@561 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/src/misc/misc.cpp b/src/misc/misc.cpp index c9cf32f..a2829f8 100644 --- a/src/misc/misc.cpp +++ b/src/misc/misc.cpp @@ -123,6 +123,7 @@ MLocalFormat::MLocalFormat(const MOServerFormat& s) setNumberFormat(s.decimaldot().value().at(0),s.thousandseparator().value().at(0),s.thousanddigits().value()); setAP(s.amtext(),s.pmtext()); setTimeZone(s.timezone()); + setDateTimeFormat(s.dateformat(),s.timeformat(),s.datetimeformat()); } diff --git a/src/wext/MOOrderInfo.h b/src/wext/MOOrderInfo.h index 6dd17f6..a033669 100644 --- a/src/wext/MOOrderInfo.h +++ b/src/wext/MOOrderInfo.h @@ -30,6 +30,7 @@ class MOOrderInfo:public MOOrderInfoAbstract bool needsRefund()const{return amountpaid()>totalprice();} bool isSent()const{return status()==Sent;} bool isReservation()const{return status()==Reserved;} + bool isCancelled()const{return status()==Cancelled;} }; #endif \ No newline at end of file diff --git a/www/inc/wext/format.php b/www/inc/wext/format.php index 683c1d6..d1a100a 100644 --- a/www/inc/wext/format.php +++ b/www/inc/wext/format.php @@ -19,7 +19,7 @@ class WOServerFormat extends WOServerFormatAbstract parent::__construct(); global $template; $this->loadConfig($template."/format.cfg"); - if($lang!="" && preg_match('/^[a-zA-Z0-9_-]+$/',$lang)) + if($lang!="" && $lang!="C" && preg_match('/^[a-zA-Z0-9_-]+$/',$lang)) $this->loadConfig($template."/".$lang."/format.cfg"); //check timezone $tz=$this->gettimezone(); diff --git a/www/inc/wext/order.php b/www/inc/wext/order.php index 0ec14c5..b3c653a 100644 --- a/www/inc/wext/order.php +++ b/www/inc/wext/order.php @@ -114,7 +114,9 @@ class WOOrderInfo extends WOOrderInfoAbstract $cl[]=$id; } //request data - return WOCustomerInfo::fromTableArraycustomer(WTcustomer::selectFromDB("customerid in ".$db->escapeIntList($cl))); + $q=""; + if(count($cl)>0)$q="customerid in ".$db->escapeIntList($cl); + return WOCustomerInfo::fromTableArraycustomer(WTcustomer::selectFromDB($q)); } }; diff --git a/www/template/format.cfg b/www/template/format.cfg index 61aa718..98dff3f 100644 --- a/www/template/format.cfg +++ b/www/template/format.cfg @@ -34,9 +34,12 @@ ShortMonths "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" # %Z milli-seconds as three digit number (eg. 007) # %p "am" or "pm" according to current time, this is the one set with setAP # %P "AM" or "PM" according to current time, this is toUpper executed on the one set with setAP -# %T ISO timezone as +/-hhmm (eg. -0100 or +0100) - does not work reliably on all systems +# %T ISO timezone as +/-hhmm (eg. -0100 or +0100) +# %t ISO timezone as +/-hh:mm (eg. -01:00 or +01:00) +# %O Olson name of the time zone (eg. "Europe/Berlin") +# %o abbreviated local name of the time zone (eg. "CET", "CEST") # %% a single % sign -time "%h:%I" +time "%h:%I %t" #The format used for expressing a date: # %y two-digit year (eg. 08) @@ -54,7 +57,7 @@ date "%Y-%M-%D" #The format used when full date and time display is requested, # see date and time above for the format codes -datetime "%Y-%M-%D %h:%I" +datetime "%Y-%M-%D %h:%I %t" #the text used for AM and PM in time displays that include them # use the uppercase version here, lowercase is done automatically @@ -93,5 +96,5 @@ moneynegative "-" # a change of this value directs MagicSmoke to show times for different time zones # this value should be set to the zone where the theater is located; # if unset the system detects the local time zone on the server -#timezone "Europe/Berlin" +timezone "Europe/Berlin" #timezone "America/New_York"