From: <ji...@us...> - 2008-12-12 06:23:04
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9036/functions Modified Files: calendar_functions.php init.inc.php template.php Log Message: misc changes for new config model Index: calendar_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/calendar_functions.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** calendar_functions.php 11 Dec 2008 21:54:52 -0000 1.27 --- calendar_functions.php 12 Dec 2008 06:22:58 -0000 1.28 *************** *** 289,295 **** if (!$pick) { if ($cal == $phpiCal_config->ALL_CALENDARS_COMBINED) { ! $return .= "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\" selected=\"selected\">$all_cal_comb_lang</option>"; } else { ! $return .= "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; } } --- 289,295 ---- if (!$pick) { if ($cal == $phpiCal_config->ALL_CALENDARS_COMBINED) { ! $return .= "<option value=\"$current_view.php?cal=$phpiCal_config->ALL_CALENDARS_COMBINED&getdate=$getdate\" selected=\"selected\">$all_cal_comb_lang</option>"; } else { ! $return .= "<option value=\"$current_view.php?cal=$phpiCal_config->ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; } } Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** init.inc.php 11 Dec 2008 21:54:52 -0000 1.113 --- init.inc.php 12 Dec 2008 06:22:59 -0000 1.114 *************** *** 150,160 **** if (isset($cpath) && $cpath !='') $add_cpath = "$cpath/"; ! if (($download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) { $subscribe_path = 'webcal://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$filename; $download_filename = $filename; ! } elseif ($download_uri != '') { ! $newurl = eregi_replace("^(http://)", "", $download_uri); $subscribe_path = 'webcal://'.$newurl.'/'.$add_cpath.basename($filename); ! $download_filename = $download_uri.'/'.$add_cpath.basename($filename); } else { $subscribe_path = $add_cpath; --- 150,160 ---- if (isset($cpath) && $cpath !='') $add_cpath = "$cpath/"; ! if (($phpiCal_config->download_uri == '') && (preg_match('/(^\/|\.\.\/)/', $filename) == 0)) { $subscribe_path = 'webcal://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/'.$filename; $download_filename = $filename; ! } elseif ($phpiCal_config->download_uri != '') { ! $newurl = eregi_replace("^(http://)", "", $phpiCal_config->download_uri); $subscribe_path = 'webcal://'.$newurl.'/'.$add_cpath.basename($filename); ! $download_filename = $phpiCal_config->download_uri.'/'.$add_cpath.basename($filename); } else { $subscribe_path = $add_cpath; Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** template.php 11 Dec 2008 21:54:52 -0000 1.95 --- template.php 12 Dec 2008 06:22:59 -0000 1.96 *************** *** 247,251 **** function draw_week($template_p) { ! global $phpiCal_config, $start_week_time, $getdate, $cal, $master_array, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $timeFormat_small, $week_length; // Figure out colspans --- 247,251 ---- function draw_week($template_p) { ! global $phpiCal_config, $start_week_time, $getdate, $cal, $master_array, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $timeFormat_small; // Figure out colspans *************** *** 253,257 **** $thisdate = $start_week_time; $swt = $start_week_time; ! for ($i=0;$i<7;$i++) { $thisday = date("Ymd", $thisdate); $nbrGridCols[$thisday] = 1; --- 253,257 ---- $thisdate = $start_week_time; $swt = $start_week_time; ! for ($i=0;$i < 7;$i++) { $thisday = date("Ymd", $thisdate); $nbrGridCols[$thisday] = 1; *************** *** 268,272 **** } ! for ($i=0; $i<$week_length; $i++) { $thisdate = date ('Ymd', $start_week_time); $weekarray[$i] = $thisdate; --- 268,272 ---- } ! for ($i=0; $i < $phpiCal_config->week_length; $i++) { $thisdate = date ('Ymd', $start_week_time); $weekarray[$i] = $thisdate; *************** *** 305,313 **** $start_wt = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_day)); $start_day = strtotime($phpiCal_config->week_start_day); ! for ($i=0; $i<$week_length; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); if ($current_view == 'day') { ! $weekday = $phpiCal_config->daysofweek_lang[$day_num]; } else { $weekday = localizeDate($dateFormat_week_list, strtotime($daylink)); --- 305,313 ---- $start_wt = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_day)); $start_day = strtotime($phpiCal_config->week_start_day); ! for ($i=0; $i<$phpiCal_config->week_length; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); if ($current_view == 'day') { ! $weekday = $daysofweek_lang[$day_num]; } else { $weekday = localizeDate($dateFormat_week_list, strtotime($daylink)); *************** *** 346,350 **** $this_year = $day_array2[1]; $thisdate = $swt; ! for ($i=0;$i<7;$i++) { $thisday = date("Ymd", $thisdate); $event_length[$thisday] = array (); --- 346,350 ---- $this_year = $day_array2[1]; $thisdate = $swt; ! for ($i=0; $i < 7; $i++) { $thisday = date("Ymd", $thisdate); $event_length[$thisday] = array (); *************** *** 365,369 **** $size_tmp = 60 - (int)substr($cal_time,2,2); $weekdisplay .= '<tr>'; ! $weekdisplay .= '<td colspan="4" rowspan="' . ($size_tmp / $phpiCal_config->gridLength) . '" align="center" valign="top" width="60" class="timeborder">'.$key.'</td>'; $weekdisplay .= '<td bgcolor="#a1a5a9" width="1" height="' . $phpiCal_config->gridLength . '"></td>'; } else { --- 365,369 ---- $size_tmp = 60 - (int)substr($cal_time,2,2); $weekdisplay .= '<tr>'; ! $weekdisplay .= '<td colspan="4" rowspan="' . ($size_tmp / $phpiCal_config->gridLength) . '" align="center" valign="top" width="60" class="timeborder">'.$key.'</td>'; $weekdisplay .= '<td bgcolor="#a1a5a9" width="1" height="' . $phpiCal_config->gridLength . '"></td>'; } else { *************** *** 376,380 **** // loop this part 7 times, one for each day ! for ($week_loop=0; $week_loop<$week_length; $week_loop++) { $thisday = date("Ymd", $thisdate); $dayborder = 0; --- 376,380 ---- // loop this part 7 times, one for each day ! for ($week_loop=0; $week_loop<$phpiCal_config->week_length; $week_loop++) { $thisday = date("Ymd", $thisdate); $dayborder = 0; *************** *** 769,773 **** function get_vtodo() { ! global $phpiCal_config, $getdate, $master_array, $next_day, $timeFormat, $tomorrows_events_lines, $show_completed, $show_todos; preg_match("!<\!-- switch show_completed on -->(.*)<\!-- switch show_completed off -->!is", $this->page, $match1); --- 769,773 ---- function get_vtodo() { ! global $phpiCal_config, $getdate, $master_array, $next_day, $timeFormat, $tomorrows_events_lines; preg_match("!<\!-- switch show_completed on -->(.*)<\!-- switch show_completed off -->!is", $this->page, $match1); *************** *** 822,826 **** $temp = ''; if ($status == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) { ! if ($show_completed == 'yes') { $temp = $completed; } --- 822,826 ---- $temp = ''; if ($status == 'COMPLETED' || (isset($val['completed_date']) && isset($val['completed_time']))) { ! if ($phpiCal_config->show_completed == 'yes') { $temp = $completed; } *************** *** 843,847 **** // If there are no TODO items, completely hide the TODO list. ! if (($nugget2 == '') || ($show_todos != 'yes')) { $this->page = preg_replace('!<\!-- switch vtodo on -->(.*)<\!-- switch vtodo off -->!is', '', $this->page); } --- 843,847 ---- // If there are no TODO items, completely hide the TODO list. ! if (($nugget2 == '') || ($phpiCal_config->show_todos != 'yes')) { $this->page = preg_replace('!<\!-- switch vtodo on -->(.*)<\!-- switch vtodo off -->!is', '', $this->page); } |