[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.boholiday.inc.php,1.10,1.10.2
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.boholiday.inc.php,1.10,1.10.2.1 class.soholiday.inc.php,1.2,1.2.2.1 |
Date: |
Sun, 23 Jun 2002 16:40:59 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv26636
Modified Files:
Tag: Version-0_9_14-branch
class.boholiday.inc.php class.soholiday.inc.php
Log Message:
GNU Bug #438. This should standardize all to use the dattime class for
consistency.
Index: class.boholiday.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.boholiday.inc.php,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C2 -r1.10 -r1.10.2.1
*** class.boholiday.inc.php 24 Dec 2001 03:07:24 -0000 1.10
--- class.boholiday.inc.php 23 Jun 2002 20:40:57 -0000 1.10.2.1
***************
*** 174,179 ****
function prepare_read_holidays($year=0,$owner=0)
{
! $datetime = CreateObject('phpgwapi.datetime');
! $this->year = (isset($year) && $year >
0?$year:$GLOBALS['phpgw']->common->show_date(time() -
$datetime->tz_offset,'Y'));
$this->owner =
($owner?$owner:$GLOBALS['phpgw_info']['user']['account_id']);
--- 174,178 ----
function prepare_read_holidays($year=0,$owner=0)
{
! $this->year = (isset($year) && $year >
0?$year:$GLOBALS['phpgw']->common->show_date(time() -
$GLOBALS['phpgw']->datetime->tz_offset,'Y'));
$this->owner =
($owner?$owner:$GLOBALS['phpgw_info']['user']['account_id']);
***************
*** 370,374 ****
$temp_locale =
$GLOBALS['phpgw_info']['user']['preferences']['common']['country'];
- $datetime = CreateObject('phpgwapi.datetime');
for($i=0;$i<count($holidays);$i++)
{
--- 369,372 ----
***************
*** 383,387 ****
$holidaycalc =
CreateObject('calendar.holidaycalc');
}
! $holidays[$i]['date'] =
$holidaycalc->calculate_date($holidays[$i], $holidays, $this->year, $datetime,
$c);
if($c != $i)
{
--- 381,385 ----
$holidaycalc =
CreateObject('calendar.holidaycalc');
}
! $holidays[$i]['date'] =
$holidaycalc->calculate_date($holidays[$i], $holidays, $this->year, $c);
if($c != $i)
{
***************
*** 390,394 ****
}
unset($holidaycalc);
- unset($datetime);
$this->holidays =
$this->sort_holidays_by_date($holidays);
$this->cached_holidays =
$this->set_holidays_to_date($this->holidays);
--- 388,391 ----
Index: class.soholiday.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.soholiday.inc.php,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** class.soholiday.inc.php 28 Jul 2001 13:17:29 -0000 1.2
--- class.soholiday.inc.php 23 Jun 2002 20:40:57 -0000 1.2.2.1
***************
*** 20,26 ****
function soholiday()
{
! global $phpgw;
!
! $this->db = $phpgw->db;
}
--- 20,24 ----
function soholiday()
{
! $this->db = $GLOBALS['phpgw']->db;
}
***************
*** 50,55 ****
function store_to_array(&$holidays)
{
- global $phpgw;
-
while($this->db->next_record())
{
--- 48,51 ----
***************
*** 57,61 ****
'index' =>
$this->db->f('hol_id'),
'locale' =>
$this->db->f('locale'),
! 'name' =>
$phpgw->strip_html($this->db->f('name')),
'day' =>
intval($this->db->f('mday')),
'month' =>
intval($this->db->f('month_num')),
--- 53,57 ----
'index' =>
$this->db->f('hol_id'),
'locale' =>
$this->db->f('locale'),
! 'name' =>
$GLOBALS['phpgw']->strip_html($this->db->f('name')),
'day' =>
intval($this->db->f('mday')),
'month' =>
intval($this->db->f('month_num')),
***************
*** 66,70 ****
if($this->debug)
{
! echo "Holiday ID:
".$this->db->f("hol_id")."<br>\n";
}
}
--- 62,66 ----
if($this->debug)
{
! echo 'Holiday ID:
'.$this->db->f('hol_id').'<br>'."\n";
}
}
***************
*** 73,78 ****
function read_holidays($locales='',$query='',$order='')
{
- global $phpgw;
-
$holidays = Array();
--- 69,72 ----
***************
*** 86,90 ****
if($this->debug)
{
! echo "Read Holidays : ".$sql."<br>\n";
}
--- 80,84 ----
if($this->debug)
{
! echo 'Read Holidays : '.$sql.'<br>'."\n";
}
***************
*** 99,103 ****
if($this->debug)
{
! echo "Reading Holiday ID : ".$id."<br>\n";
}
$this->db->query('SELECT * FROM phpgw_cal_holidays
WHERE hol_id='.$id,__LINE__,__FILE__);
--- 93,97 ----
if($this->debug)
{
! echo 'Reading Holiday ID : '.$id.'<br>'."\n";
}
$this->db->query('SELECT * FROM phpgw_cal_holidays
WHERE hol_id='.$id,__LINE__,__FILE__);
***************
*** 183,187 ****
if($this->debug)
{
! echo "HOLIDAY_TOTAL : ".$sql."<br>\n";
}
--- 177,181 ----
if($this->debug)
{
! echo 'HOLIDAY_TOTAL : '.$sql.'<br>'."\n";
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.boholiday.inc.php,1.10,1.10.2.1 class.soholiday.inc.php,1.2,1.2.2.1,
Mark A Peters <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: calendar/inc hook_home.inc.php,1.31.2.2,1.31.2.3
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.boicalendar.inc.php,1.16.2.2,1.16.2.3 class.uiicalendar.inc.php,1.3.2.1,1.3.2.2
- Previous by thread:
[Phpgroupware-cvs] CVS: calendar/inc hook_home.inc.php,1.31.2.2,1.31.2.3
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.boicalendar.inc.php,1.16.2.2,1.16.2.3 class.uiicalendar.inc.php,1.3.2.1,1.3.2.2
- Index(es):