[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] calendar inc/class.boholiday.inc.php inc/class....
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] calendar inc/class.boholiday.inc.php inc/class.... |
Date: |
Tue, 12 Dec 2006 17:51:14 +0000 |
CVSROOT: /sources/phpgroupware
Module name: calendar
Changes by: Sigurd Nes <sigurdne> 06/12/12 17:51:14
Modified files:
inc : class.boholiday.inc.php class.soholiday.inc.php
class.uiholiday.inc.php
templates/base : locales.tpl
Log message:
Holiday - management
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.boholiday.inc.php?cvsroot=phpgroupware&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.soholiday.inc.php?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.uiholiday.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/calendar/templates/base/locales.tpl?cvsroot=phpgroupware&r1=1.1&r2=1.2
Patches:
Index: inc/class.boholiday.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.boholiday.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- inc/class.boholiday.inc.php 6 Sep 2006 00:52:29 -0000 1.15
+++ inc/class.boholiday.inc.php 12 Dec 2006 17:51:14 -0000 1.16
@@ -10,7 +10,7 @@
* option) any later version. *
\**************************************************************************/
- /* $Id: class.boholiday.inc.php,v 1.15 2006/09/06 00:52:29 skwashd Exp
$ */
+ /* $Id: class.boholiday.inc.php,v 1.16 2006/12/12 17:51:14 sigurdne Exp
$ */
class boholiday
{
@@ -43,6 +43,7 @@
var $locales = Array();
var $holidays;
var $cached_holidays;
+ var $locale;
function boholiday()
{
@@ -155,7 +156,7 @@
$sort = ($sort?$sort:$this->sort);
$order = ($order?$order:$this->order);
$query = ($query?$query:$this->query);
- $year = ($$year?$$year:$this->year);
+ $year = (isset($year)?$year:$this->year);
return
$this->so->read_holidays($locale,$query,$order,$year);
}
@@ -327,7 +328,7 @@
$this->ui = CreateObject('calendar.uiholiday');
- if (is_array($errors))
+ if (isset($errors) && is_array($errors))
{
$holiday['month'] =
$holiday['month_num'];
$holiday['day'] = $holiday['mday'];
@@ -389,7 +390,7 @@
$c = $i;
if($i == 0 || $holidays[$i]['locale'] !=
$holidays[$i - 1]['locale'])
{
- if(is_object($holidaycalc))
+ if(isset($holidaycalc) &&
is_object($holidaycalc))
{
unset($holidaycalc);
}
@@ -439,7 +440,7 @@
}
else
{
- $str =
$GLOBALS['phpgw']->common->dateformatorder($holiday['occurence']>1900?$holiday['occurence']:'',$month,$holiday[day]);
+ $str =
$GLOBALS['phpgw']->common->dateformatorder($holiday['occurence']>1900?$holiday['occurence']:'',$month,$holiday['day']);
}
if ($holiday['observance_rule'])
{
Index: inc/class.soholiday.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.soholiday.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- inc/class.soholiday.inc.php 15 May 2005 06:57:37 -0000 1.6
+++ inc/class.soholiday.inc.php 12 Dec 2006 17:51:14 -0000 1.7
@@ -10,7 +10,7 @@
* option) any later version. *
\**************************************************************************/
- /* $Id: class.soholiday.inc.php,v 1.6 2005/05/15 06:57:37 skwashd Exp $
*/
+ /* $Id: class.soholiday.inc.php,v 1.7 2006/12/12 17:51:14 sigurdne Exp
$ */
class soholiday
{
@@ -31,7 +31,7 @@
{
echo "Updating
LOCALE='".$holiday['locale']."' NAME='".$holiday['name']."'
extra=(".$holiday['mday'].'/'.$holiday['month_num'].'/'.$holiday['occurence'].'/'.$holiday['dow'].'/'.$holiday['observance_rule'].")<br
/>\n";
}
- $sql = "UPDATE phpgw_cal_holidays SET
name='".$holiday['name']."', mday=".$holiday['mday'].',
month_num='.$holiday['month_num'].', occurence='.$holiday['occurence'].',
dow='.$holiday['dow'].',
observance_rule='.intval($holiday['observance_rule']).' WHERE
hol_id='.$holiday['hol_id'];
+ $sql = "UPDATE phpgw_cal_holidays SET
name='".$holiday['name']."', mday=".$holiday['mday'].',
month_num='.$holiday['month_num'].', occurence='.$holiday['occurence'].',
dow='.$holiday['dow'].',
observance_rule='.(isset($holiday['observance_rule'])?1:0).' WHERE
hol_id='.$holiday['hol_id'];
}
else
{
@@ -40,7 +40,7 @@
echo "Inserting
LOCALE='".$holiday['locale']."' NAME='".$holiday['name']."'
extra=(".$holiday['mday'].'/'.$holiday['month_num'].'/'.$holiday['occurence'].'/'.$holiday['dow'].'/'.$holiday['observance_rule'].")<br
/>\n";
}
$sql = 'INSERT INTO
phpgw_cal_holidays(locale,name,mday,month_num,occurence,dow,observance_rule) '
- .
"VALUES('".strtoupper($holiday['locale'])."','".$holiday['name']."',".$holiday['mday'].','.$holiday['month_num'].','.$holiday['occurence'].','.$holiday['dow'].','.intval($holiday['observance_rule']).")";
+ .
"VALUES('".strtoupper($holiday['locale'])."','".$holiday['name']."',".$holiday['mday'].','.$holiday['month_num'].','.$holiday['occurence'].','.$holiday['dow'].','.(isset($holiday['observance_rule'])?1:0).")";
}
$this->db->query($sql,__LINE__,__FILE__);
}
@@ -158,6 +158,7 @@
$querymethod .= ' ORDER BY '.$order;
}
$this->db->query("SELECT DISTINCT locale FROM
phpgw_cal_holidays".$querymethod,__LINE__,__FILE__);
+ $locale = false;
while($this->db->next_record())
{
$locale[] = $this->db->f('locale');
Index: inc/class.uiholiday.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.uiholiday.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- inc/class.uiholiday.inc.php 11 Dec 2006 10:07:35 -0000 1.12
+++ inc/class.uiholiday.inc.php 12 Dec 2006 17:51:14 -0000 1.13
@@ -12,7 +12,7 @@
* option) any later version. *
\**************************************************************************/
- /* $Id: class.uiholiday.inc.php,v 1.12 2006/12/11 10:07:35 sigurdne Exp
$ */
+ /* $Id: class.uiholiday.inc.php,v 1.13 2006/12/12 17:51:14 sigurdne Exp
$ */
class uiholiday
{
@@ -67,7 +67,8 @@
'left_next_matchs' =>
$GLOBALS['phpgw']->nextmatchs->left('/index.php',$this->bo->start,$this->bo->total,array('menuaction'=>'calendar.uiholiday.admin')),
'right_next_matchs' =>
$GLOBALS['phpgw']->nextmatchs->right('/index.php',$this->bo->start,$this->bo->total,array('menuaction'=>'calendar.uiholiday.admin')),
'center' => '<td
align="center">'.lang('Countries').'</td>',
- 'sort_name' =>
$GLOBALS['phpgw']->nextmatchs->show_sort_order($this->bo->sort,'locale',$this->bo->order,'/calendar/'.basename($SCRIPT_FILENAME),lang('Country')),
+ // 'sort_name' =>
$GLOBALS['phpgw']->nextmatchs->show_sort_order($this->bo->sort,'locale',$this->bo->order,'/calendar/'.basename($SCRIPT_FILENAME),lang('Country')),
+ 'sort_name' =>
$GLOBALS['phpgw']->nextmatchs->show_sort_order($this->bo->sort,'locale',$this->bo->order,false,lang('Country')),
'header_edit' => lang('Edit'),
'header_delete' => lang('Delete'),
'header_extra' => lang('Submit to Repository'),
@@ -142,7 +143,7 @@
unset($GLOBALS['phpgw_info']['flags']['noheader']);
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(True);
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
$p->set_file(Array('locale'=>'locales.tpl'));
$p->set_block('locale','list','list');
@@ -158,7 +159,6 @@
$holidays = $this->bo->get_holiday_list();
$var = Array(
- 'th_bg' =>
$GLOBALS['phpgw_info']['theme']['th_bg'],
'left_next_matchs' =>
$GLOBALS['phpgw']->nextmatchs->left('/index.php',$this->bo->start,$this->bo->total,array('menuaction'=>'calendar.uiholiday.edit_locale','locale'=>$this->bo->locales[0],'year'=>$this->bo->year)),
'right_next_matchs' =>
$GLOBALS['phpgw']->nextmatchs->right('/index.php',$this->bo->start,$this->bo->total,array('menuaction'=>'calendar.uiholiday.edit_locale','locale'=>$this->bo->locales[0],'year'=>$this->bo->year)),
'center'
=> '<td align="right">'.lang('Holidays').' ('.$this->bo->locales[0].')</td><td
align="left">'.$year_form.'</td>',
Index: templates/base/locales.tpl
===================================================================
RCS file: /sources/phpgroupware/calendar/templates/base/locales.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/locales.tpl 28 Jul 2006 03:30:43 -0000 1.1
+++ templates/base/locales.tpl 12 Dec 2006 17:51:14 -0000 1.2
@@ -9,7 +9,7 @@
</table>
<table border="0" width="70%" align="center">
- <tr bgcolor="{th_bg}">
+ <tr class="th">
<td> {sort_name}</td>
{header_rule}
<td>{header_edit}</td>
@@ -38,7 +38,7 @@
</table>
<!-- END list -->
<!-- BEGIN row -->
- <tr bgcolor="{tr_color}">
+ <tr class="{tr_color}">
<td> {group_name}</td>
{rule}
<td width="5%">{edit_link}</td>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] calendar inc/class.boholiday.inc.php inc/class....,
Sigurd Nes <=