[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.82,1.83
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.82,1.83 class.uicalendar.inc.php,1.85,1.86 class.uipreferences.inc.php,1.5,1.6 class.bopreferences.inc.php,1.4,1.5 |
Date: |
Thu, 19 Sep 2002 19:45:21 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv32297
Modified Files:
class.bocalendar.inc.php class.uicalendar.inc.php
class.uipreferences.inc.php class.bopreferences.inc.php
Log Message:
GNU Patch #528.
Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -r1.82 -r1.83
*** class.bocalendar.inc.php 17 Sep 2002 10:11:24 -0000 1.82
--- class.bocalendar.inc.php 19 Sep 2002 23:45:19 -0000 1.83
***************
*** 130,146 ****
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('calendar');
@reset($this->grants);
! if($this->debug)
{
! while(list($grantor,$rights) =
each($this->grants))
! {
! echo '<!-- Grantor: '.$grantor.'
Rights: '.$rights.' -->'."\n";
! }
! @reset($this->grants);
}
! if($this->debug)
! {
! echo '<!-- Read Use_Session : ('.$session.')
-->'."\n";
! }
if($session)
--- 130,141 ----
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('calendar');
@reset($this->grants);
! while(list($grantor,$rights) = each($this->grants))
{
! print_debug('Grantor',$grantor);
! print_debug('Rights',$rights);
}
+ @reset($this->grants);
! print_debug('Read use_session',$session);
if($session)
***************
*** 150,161 ****
}
! if($this->debug)
{
! echo '<!-- BO Filter : ('.$this->filter.')
-->'."\n";
! echo '<!-- Owner : '.$this->owner.' -->'."\n";
}
- $owner =
get_var('owner',Array('GLOBAL','HTTP_GET_VARS','HTTP_POST_VARS'));
-
if(isset($owner) && $owner!='' && substr($owner,0,2) ==
'g_')
{
--- 145,163 ----
}
! print_debug('BO Filter',$this->filter);
! print_debug('Owner',$this->owner);
!
! $this->prefs['calendar'] =
$GLOBALS['phpgw_info']['user']['preferences']['calendar'];
!
! $owner = get_var('owner',Array('GLOBAL','GET','POST'));
!
! if ((!isset($owner) || $owner == '')
! && MENUACTION == 'calendar.uicalendar.planner'
! && get_var('from',Array('POST')) !=
'calendar.uicalendar.planner'
! &&
$this->prefs['calendar']['planner_start_with_group'] != '-1')
{
! $owner =
$this->prefs['calendar']['planner_start_with_group'];
}
if(isset($owner) && $owner!='' && substr($owner,0,2) ==
'g_')
{
***************
*** 176,180 ****
$this->prefs['common'] =
$GLOBALS['phpgw_info']['user']['preferences']['common'];
- $this->prefs['calendar'] =
$GLOBALS['phpgw_info']['user']['preferences']['calendar'];
if ($this->prefs['common']['timeformat'] == '12')
--- 178,181 ----
***************
*** 189,195 ****
$this->holiday_color =
(substr($GLOBALS['phpgw_info']['theme']['bg07'],0,1)=='#'?'':'#').$GLOBALS['phpgw_info']['theme']['bg07'];
! $this->printer_friendly =
(intval(get_var('friendly',Array('HTTP_GET_VARS','HTTP_POST_VARS','DEFAULT'),0))
== 1?True:False);
- $this->filter =
get_var('filter',Array('HTTP_POST_VARS','DEFAULT'),'
'.$this->prefs['calendar']['defaultfilter'].' ');
if($GLOBALS['phpgw']->accounts->get_type($this->owner)=='g')
{
--- 190,207 ----
$this->holiday_color =
(substr($GLOBALS['phpgw_info']['theme']['bg07'],0,1)=='#'?'':'#').$GLOBALS['phpgw_info']['theme']['bg07'];
! $this->printer_friendly =
(intval(get_var('friendly',Array('GET','POST','DEFAULT'),0)) == 1?True:False);
!
! $this->filter =
get_var('filter',Array('POST','DEFAULT'),'
'.$this->prefs['calendar']['defaultfilter'].' ');
!
! $this->sortby = get_var('sortby',Array('POST'));
! if(!isset($this->sortby))
! {
! $default_calender =
$this->prefs['calendar']['defaultcalendar'];
! if ($default_calender == 'planner_cat' ||
$default_calender == 'planner_user')
! {
! $this->sortby = ($default_calender ==
'planner_cat' ? 'category' : 'user');
! }
! }
if($GLOBALS['phpgw']->accounts->get_type($this->owner)=='g')
{
***************
*** 197,202 ****
}
! $this->sortby =
get_var('sortby',Array('HTTP_POST_VARS','DEFAULT'),'category');
! $this->cat_id =
get_var('cat_id',Array('HTTP_POST_VARS'));
$this->so = CreateObject('calendar.socalendar',
--- 209,213 ----
}
! $this->cat_id = get_var('cat_id',Array('POST'));
$this->so = CreateObject('calendar.socalendar',
***************
*** 210,218 ****
$localtime =
$GLOBALS['phpgw']->datetime->users_localtime;
! $date =
get_var('date',Array('HTTP_GET_VARS','HTTP_POST_VARS','GLOBAL'));
! $year =
get_var('year',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
! $month =
get_var('month',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
! $day =
get_var('day',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
! $num_months =
get_var('num_months',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
if(isset($date) && $date!='')
--- 221,229 ----
$localtime =
$GLOBALS['phpgw']->datetime->users_localtime;
! $date = get_var('date',Array('GET','POST','GLOBAL'));
! $year = get_var('year',Array('GET','POST'));
! $month = get_var('month',Array('GET','POST'));
! $day = get_var('day',Array('GET','POST'));
! $num_months = get_var('num_months',Array('GET','POST'));
if(isset($date) && $date!='')
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -r1.85 -r1.86
*** class.uicalendar.inc.php 19 Sep 2002 02:14:41 -0000 1.85
--- class.uicalendar.inc.php 19 Sep 2002 23:45:19 -0000 1.86
***************
*** 1380,1383 ****
--- 1380,1394 ----
$hdr[2][\'.\'.$index] =
\'colspan="\'.$intervals_per_day.\'" align="center"\';
+
+ // highlight saturdays
and sundays using bgcolor
+ // FIXME: what about
holidays?
+ //
+ $dow =
$GLOBALS[\'phpgw\']->datetime->day_of_week($y,$m,$d);
+ if ($dow == 0 || $dow
== 6)
+ {
+
$hdr[2][\'.\'.$index] .= \'" bgcolor=\';
+
$hdr[2][\'.\'.$index] .= $dow == 0 ? \'"#ff8866"\' : \'"#ffcccc"\';
+ }
+
$hdr[2][$index] = \'<a
href="\'.$this->planner_html->link(\'/index.php\',
array(
***************
*** 2198,2202 ****
$page_ =
explode('.',$this->bo->prefs['calendar']['defaultcalendar']);
$_page = $page_[0];
! if ($_page=='index' || ($_page != 'day' &&
$_page != 'week' && $_page != 'month' && $_page != 'year' && $_page !=
'planner'))
{
$_page = 'month';
--- 2209,2217 ----
$page_ =
explode('.',$this->bo->prefs['calendar']['defaultcalendar']);
$_page = $page_[0];
! if ($_page=='planner_cat' ||
$_page=='planner_user')
! {
! $_page = 'planner';
! }
! elseif ($_page=='index' || ($_page != 'day' &&
$_page != 'week' && $_page != 'month' && $_page != 'year' && $_page !=
'planner'))
{
$_page = 'month';
***************
*** 2274,2281 ****
--- 2289,2299 ----
}
+ $hidden_vars = ' <input type="hidden" name="from"
value="'.MENUACTION.'">'."\n";
+
$var = Array(
'action_url' => $this->page($method,''),
'form_name' => 'SelectMonth',
'label' => lang('Month'),
+ 'hidden_vars' => $hidden_vars,
'form_label' => 'date',
'form_onchange' =>
'document.SelectMonth.submit()',
***************
*** 2305,2308 ****
--- 2323,2327 ----
'form_name' => 'SelectWeek',
'label' => lang('Week'),
+ 'hidden_vars' => $hidden_vars,
'form_label' => 'date',
'form_onchange' =>
'document.SelectWeek.submit()',
***************
*** 2324,2327 ****
--- 2343,2347 ----
'form_name' => 'SelectYear',
'label' => lang('Year'),
+ 'hidden_vars' => $hidden_vars,
'form_label' => 'year',
'form_onchange' =>
'document.SelectYear.submit()',
***************
*** 2350,2358 ****
}
$var = Array(
'action_url' =>
$this->page($method,''),
'form_name' =>
'SelectNumberOfMonths',
'label' => lang('Number of
Months'),
! 'hidden_vars' => $date_str,
'form_label' => 'num_months',
'form_onchange' =>
'document.SelectNumberOfMonths.submit()',
--- 2370,2380 ----
}
+ $hidden_vars .= $date_str;
+
$var = Array(
'action_url' =>
$this->page($method,''),
'form_name' =>
'SelectNumberOfMonths',
'label' => lang('Number of
Months'),
! 'hidden_vars' => $hidden_vars,
'form_label' => 'num_months',
'form_onchange' =>
'document.SelectNumberOfMonths.submit()',
***************
*** 2407,2411 ****
function no_edit()
{
! if(!$isset($GLOBALS['phpgw_info']['flags']['noheader']))
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
--- 2429,2433 ----
function no_edit()
{
! if(!isset($GLOBALS['phpgw_info']['flags']['noheader']))
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
Index: class.uipreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uipreferences.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uipreferences.inc.php 17 Sep 2002 02:25:40 -0000 1.5
--- class.uipreferences.inc.php 19 Sep 2002 23:45:19 -0000 1.6
***************
*** 104,108 ****
}
$str = '<select name="prefs[defaultcalendar]">'
! . '<option
value="planner"'.$selected['planner'].'>'.lang('Planner').'</option>'
. '<option
value="year"'.$selected['year'].'>'.lang('Yearly').'</option>'
. '<option
value="month"'.$selected['month'].'>'.lang('Monthly').'</option>'
--- 104,109 ----
}
$str = '<select name="prefs[defaultcalendar]">'
! . '<option
value="planner_cat"'.$selected['planner_cat'].'>'.lang('Planner by
category').'</option>'
! . '<option
value="planner_user"'.$selected['planner_user'].'>'.lang('Planner by
user').'</option>'
. '<option
value="year"'.$selected['year'].'>'.lang('Yearly').'</option>'
. '<option
value="month"'.$selected['month'].'>'.lang('Monthly').'</option>'
***************
*** 112,115 ****
--- 113,125 ----
$this->display_item(lang('default calendar view'),$str);
+ $user = $GLOBALS['phpgw_info']['user']['account_id'];
+ $groups =
$GLOBALS['phpgw']->accounts->membership($user);
+ $str = '<option
value="-1"'.(intval($this->bo->prefs['calendar']['planner_start_with__group'])==-1?'
selected':'').'>none</option>'."\n";
+ while (list($key,$group) = each($groups))
+ {
+ $str .= '<option
value="'.$key.'"'.(intval($this->bo->prefs['calendar']['planner_start_with_group'])==$key?'
selected':'').'>'.$GLOBALS['phpgw']->common->grab_owner_name($group['account_id']).'</option>'."\n";
+ }
+ $this->display_item(lang('Preselected group for
entering the planner'),'<select
name="prefs[planner_start_with_group]">'."\n".$str.'</select>'."\n");
+
$selected = array();
$selected[$this->bo->prefs['calendar']['defaultfilter']] = ' selected';
***************
*** 194,196 ****
$this->output_template_array('row','pref_list',$var);
}
! }
\ No newline at end of file
--- 204,206 ----
$this->output_template_array('row','pref_list',$var);
}
! }
Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bopreferences.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.bopreferences.inc.php 17 Sep 2002 02:25:40 -0000 1.4
--- class.bopreferences.inc.php 19 Sep 2002 23:45:19 -0000 1.5
***************
*** 32,37 ****
function preferences()
{
! if (isset($GLOBALS['HTTP_POST_VARS']['submit']))
{
$GLOBALS['phpgw']->preferences->read_repository();
--- 32,38 ----
function preferences()
{
! if (get_var('submit',Array('POST')))
{
+ $prefs = get_var('prefs',Array('POST'));
$GLOBALS['phpgw']->preferences->read_repository();
***************
*** 43,52 ****
'defaultfilter',
'interval',
! 'planner_intervals_per_day'
);
for($i=0;$i<count($pref_list);$i++)
{
!
$GLOBALS['phpgw']->preferences->add('calendar',$pref_list[$i],$GLOBALS['HTTP_POST_VARS']['prefs'][$pref_list[$i]]);
}
--- 44,54 ----
'defaultfilter',
'interval',
! 'planner_intervals_per_day',
! 'planner_start_with_group'
);
for($i=0;$i<count($pref_list);$i++)
{
!
$GLOBALS['phpgw']->preferences->add('calendar',$pref_list[$i],$prefs[$pref_list[$i]]);
}
***************
*** 63,69 ****
for($i=0;$i<count($pref_list);$i++)
{
! if
($GLOBALS['HTTP_POST_VARS']['prefs'][$pref_list[$i]] == True)
{
!
$GLOBALS['phpgw']->preferences->add('calendar',$pref_list[$i],$GLOBALS['HTTP_POST_VARS']['prefs'][$pref_list[$i]]);
}
else
--- 65,71 ----
for($i=0;$i<count($pref_list);$i++)
{
! if ($prefs[$pref_list[$i]] == True)
{
!
$GLOBALS['phpgw']->preferences->add('calendar',$pref_list[$i],$prefs[$pref_list[$i]]);
}
else
***************
*** 80,82 ****
}
}
! ?>
\ No newline at end of file
--- 82,84 ----
}
}
! ?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.82,1.83 class.uicalendar.inc.php,1.85,1.86 class.uipreferences.inc.php,1.5,1.6 class.bopreferences.inc.php,1.4,1.5,
Mark A Peters <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.14,1.71.2.15 class.uicalendar.inc.php,1.66.2.23,1.66.2.24 class.uipreferences.inc.php,1.2.2.3,1.2.2.4 class.bopreferences.inc.php,1.2.2.1,1.2.2.2
- Next by Date:
[Phpgroupware-cvs] CVS: todo/inc class.so.inc.php,1.1.2.6,1.1.2.7
- Previous by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.14,1.71.2.15 class.uicalendar.inc.php,1.66.2.23,1.66.2.24 class.uipreferences.inc.php,1.2.2.3,1.2.2.4 class.bopreferences.inc.php,1.2.2.1,1.2.2.2
- Next by thread:
[Phpgroupware-cvs] CVS: todo/inc class.so.inc.php,1.1.2.6,1.1.2.7
- Index(es):