Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29506/functions
Modified Files:
calendar_functions.php
Log Message:
Fix for "All Calendars Combined" in dropdown menu with only one calendar available
Index: calendar_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/calendar_functions.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** calendar_functions.php 5 Jun 2009 14:20:40 -0000 1.37
--- calendar_functions.php 22 Jun 2009 22:09:27 -0000 1.38
***************
*** 188,192 ****
// Print each calendar option.
$return = '';
! $all_cals = true;
foreach ($cals as $cal_tmp) {
// Format the calendar path for display.
--- 188,195 ----
// Print each calendar option.
$return = '';
!
! $all_cals = false;
! if (count($cals) > 1) $all_cals = true;
!
foreach ($cals as $cal_tmp) {
// Format the calendar path for display.
***************
*** 257,263 ****
if($pick) {
if (in_array($cal_encoded_tmp, explode(",", $cal)) || count($cals) == count(explode(",", $cal))) {
! $return .= "<option value=\"$cal_encoded_tmp\" selected=\"selected\">$cal_displayname_tmp</option>\n";
} else {
! $return .= "<option value=\"$cal_encoded_tmp\">$cal_displayname_tmp</option>\n";
}
} else {
--- 260,266 ----
if($pick) {
if (in_array($cal_encoded_tmp, explode(",", $cal)) || count($cals) == count(explode(",", $cal))) {
! $return .= "<option value=\"$cal_encoded_tmp\" selected=\"selected\">$cal_displayname_tmp</option>\n";
} else {
! $return .= "<option value=\"$cal_encoded_tmp\">$cal_displayname_tmp</option>\n";
}
} else {
|