[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18615] Update to use datetime statically.
From: |
Johan Gunnarsson |
Subject: |
[Phpgroupware-cvs] [18615] Update to use datetime statically. |
Date: |
Thu, 19 Jun 2008 18:08:46 +0000 |
Revision: 18615
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18615
Author: johang
Date: 2008-06-19 18:08:46 +0000 (Thu, 19 Jun 2008)
Log Message:
-----------
Update to use datetime statically.
Modified Paths:
--------------
trunk/todo/inc/class.uitodo.inc.php
Modified: trunk/todo/inc/class.uitodo.inc.php
===================================================================
--- trunk/todo/inc/class.uitodo.inc.php 2008-06-16 22:17:45 UTC (rev 18614)
+++ trunk/todo/inc/class.uitodo.inc.php 2008-06-19 18:08:46 UTC (rev 18615)
@@ -14,6 +14,7 @@
* Import required classes
*/
phpgw::import_class('phpgwapi.sbox');
+ phpgw::import_class('phpgwapi.datetime');
/**
* Todo user interface
@@ -211,6 +212,7 @@
case 1: $pri = lang('Low'); break;
case 2: $pri = '<b>' . lang('normal') .
'</b>'; break;
case 3: $pri = '<font
color="#CC0000"><b>' . lang('high') . '</b></font>'; break;
+ default: $pri = NULL;
}
if ($todo_list[$i]['edate_epoch'] == 0)
@@ -220,7 +222,7 @@
else
{
$datedue =
$todo_list[$i]['edate_epoch'];
- $datedue = $datedue -
$this->botodo->datetime->tz_offset;
+ $datedue = $datedue -
phpgwapi_datetime::user_timezone();
$month =
$GLOBALS['phpgw']->common->show_date(time(),'n');
$day =
$GLOBALS['phpgw']->common->show_date(time(),'d');
@@ -531,10 +533,10 @@
'edithandle' => '',
'addhandle' => '',
//FIXME move this to sbox2 a control
- 'start_select_date' =>
$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
-
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])),
- 'end_select_date' =>
$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
-
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])),
+ 'start_select_date' =>
$GLOBALS['phpgw']->common->dateformatorder(phpgwapi_sbox::getYears('values[syear]',$values['syear']),
+
phpgwapi_sbox::getMonthText('values[smonth]',$values['smonth']),phpgwapi_sbox::getDays('values[sday]',$values['sday'])),
+ 'end_select_date' =>
$GLOBALS['phpgw']->common->dateformatorder(phpgwapi_sbox::getYears('values[eyear]',$values['eyear']),
+
phpgwapi_sbox::getMonthText('values[emonth]',$values['emonth']),phpgwapi_sbox::getDays('values[eday]',$values['eday'])),
'selfortoday' => '<input
type="checkbox" name="values[seltoday]" value="True">',
'daysfromstartdate' => '<input type="text"
name="values[daysfromstart]" size="3" maxlength="3">',
'access_list' => '<input
type="checkbox" name="values[access]" value="True"' .
(!isset($values['access']) || $values['access'] == 'private' ? ' checked' : '')
. '>'
@@ -558,12 +560,12 @@
$this->t->set_var('value_descr',$GLOBALS['phpgw']->strip_html($values['descr']));
$this->t->set_var('value_category',$this->cats->id2name($values['cat']));
- $sdate = $values['sdate'] -
$this->botodo->datetime->tz_offset;
+ $sdate = $values['sdate'] -
phpgwapi_datetime::user_timezone();
$this->t->set_var('value_start_date',$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']));
if ($values['edate'] && $values['edate'] != 0)
{
- $edate = $values['edate'] -
$this->botodo->datetime->tz_offset;
+ $edate = $values['edate'] -
phpgwapi_datetime::user_timezone();
$this->t->set_var('value_end_date',$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']));
}
@@ -599,6 +601,8 @@
case 3:
$pri = '<font color="CC0000"><b>' .
lang('high') . '</b></font>';
break;
+ default:
+ $pri = NULL;
}
$this->t->set_var('value_urgency',$pri);
@@ -716,8 +720,8 @@
}
// FIXME move to sbox as a control
-
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
-
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])));
+
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder(phpgwapi_sbox::getYears('values[syear]',$values['syear']),
+
phpgwapi_sbox::getMonthText('values[smonth]',$values['smonth']),phpgwapi_sbox::getDays('values[sday]',$values['sday'])));
if ($values['edate'] == 0)
{
@@ -733,8 +737,8 @@
}
// FIXME move to sbox as a control
-
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
-
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])));
+
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder(phpgwapi_sbox::getYears('values[eyear]',$values['eyear']),
+
phpgwapi_sbox::getMonthText('values[emonth]',$values['emonth']),phpgwapi_sbox::getDays('values[eday]',$values['eday'])));
$this->t->set_var('selfortoday',' ');
$this->t->set_var('lang_selfortoday',' ');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18615] Update to use datetime statically.,
Johan Gunnarsson <=