From: <ji...@us...> - 2008-12-20 03:22:58
|
Update of /cvsroot/phpicalendar/phpicalendar/rss In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5363/rss Modified Files: index.php rss.php rss1.0.php rss2.0.php rss_common.php Log Message: misc error warnings and notices Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/index.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** index.php 11 Dec 2008 21:54:53 -0000 1.44 --- index.php 20 Dec 2008 03:22:54 -0000 1.45 *************** *** 1,7 **** <?php ! /* Rewritten by J. Hu 4/2/06 ! */ ! define('BASE','../'); require_once(BASE.'functions/ical_parser.php'); --- 1,6 ---- <?php ! /* Rewritten by J. Hu 4/2/06*/ ! $current_view = 'rss'; define('BASE','../'); require_once(BASE.'functions/ical_parser.php'); *************** *** 13,17 **** if (empty($default_path)) { ! if (isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) { $default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/')); } else { --- 12,16 ---- if (empty($default_path)) { ! if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) { $default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/rss/')); } else { *************** *** 41,59 **** /* Changed to show links without urlencode, but links valid urls */ $rss_list .= "<td>".$lang['l_day']."</td>"; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=day>'.$xml_icon.'</a> RSS 0.91</td>'; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss1.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=day>'.$xml_icon.'</a> RSS 1.0</td>'; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss2.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=day>'.$xml_icon.'</a> RSS 2.0</td></tr>'; $rss_list .= "<td>".$lang['l_week']."</td>"; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=week>'.$xml_icon.'</a> RSS 0.91</td>'; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss1.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=week>'.$xml_icon.'</a> RSS 1.0</td>'; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss2.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=week>'.$xml_icon.'</a> RSS 2.0</td></tr>'; $rss_list .= "<td>".$lang['l_month']."</td>"; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=month>'.$xml_icon.'</a> RSS 0.91</td>'; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss1.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=month>'.$xml_icon.'</a> RSS 1.0</td>'; ! $rss_list .= '<td><a href='.$default_path.'/rss/rss2.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=month>'.$xml_icon.'</a> RSS 2.0</td></tr>'; ! $footer_check = $default_path.'/rss/rss.php?cal%3D'.rawurlencode($file.'&cpath='.$cpath.'&rssview='.$default_view); $validrss_check = str_replace('%', '%25', $footer_check); $rss_list .= "<tr><td> </td></tr>\n"; --- 40,58 ---- /* Changed to show links without urlencode, but links valid urls */ $rss_list .= "<td>".$lang['l_day']."</td>"; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=day>'.$xml_icon.'</a> RSS 0.91</td>'; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss1.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=day>'.$xml_icon.'</a> RSS 1.0</td>'; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss2.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=day>'.$xml_icon.'</a> RSS 2.0</td></tr>'; $rss_list .= "<td>".$lang['l_week']."</td>"; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=week>'.$xml_icon.'</a> RSS 0.91</td>'; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss1.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=week>'.$xml_icon.'</a> RSS 1.0</td>'; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss2.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=week>'.$xml_icon.'</a> RSS 2.0</td></tr>'; $rss_list .= "<td>".$lang['l_month']."</td>"; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=month>'.$xml_icon.'</a> RSS 0.91</td>'; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss1.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=month>'.$xml_icon.'</a> RSS 1.0</td>'; ! $rss_list .= '<td><a href='.$phpiCal_config->default_path.'/rss/rss2.0.php?cal='.rawurlencode($file).'&cpath='.$cpath.'&rssview=month>'.$xml_icon.'</a> RSS 2.0</td></tr>'; ! $footer_check = $phpiCal_config->default_path.'/rss/rss.php?cal%3D'.rawurlencode($file.'&cpath='.$cpath.'&rssview='.$phpiCal_config->default_view); $validrss_check = str_replace('%', '%25', $footer_check); $rss_list .= "<tr><td> </td></tr>\n"; *************** *** 66,81 **** ! $page = new Page(BASE.'templates/'.$template.'/rss_index.tpl'); $page->replace_files(array( ! 'header' => BASE.'templates/'.$template.'/header.tpl', ! 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'event_js' => '' )); $page->replace_tags(array( ! 'version' => $phpicalendar_version, ! 'default_path' => $default_path.'/', ! 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, --- 65,80 ---- ! $page = new Page(BASE.'templates/'.$phpiCal_config->template.'/rss_index.tpl'); $page->replace_files(array( ! 'header' => BASE.'templates/'.$phpiCal_config->template.'/header.tpl', ! 'footer' => BASE.'templates/'.$phpiCal_config->template.'/footer.tpl', 'event_js' => '' )); $page->replace_tags(array( ! 'version' => $phpiCal_config->phpicalendar_version, ! 'default_path' => $phpiCal_config->default_path.'/', ! 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, *************** *** 83,90 **** 'display_date' => $display_date, 'current_view' => $current_view, ! 'sidebar_date' => $sidebar_date, 'rss_powered' => $rss_powered, 'rss_list' => $rss_list, ! 'charset' => $charset, 'rss_available' => '', 'rssdisable' => '', --- 82,89 ---- 'display_date' => $display_date, 'current_view' => $current_view, ! 'sidebar_date' => @$sidebar_date, 'rss_powered' => $rss_powered, 'rss_list' => $rss_list, ! 'charset' => $phpiCal_config->charset, 'rss_available' => '', 'rssdisable' => '', *************** *** 93,97 **** /* Replaces footer.tpl {validrss_check} with $validrss_check */ 'validrss_check' => $validrss_check, ! 'show_search' => $show_search, 'l_rss_info' => $lang['l_rss_info'], 'l_rss_subhead' => $lang['l_rss_subhead'], --- 92,96 ---- /* Replaces footer.tpl {validrss_check} with $validrss_check */ 'validrss_check' => $validrss_check, ! 'show_search' => $phpiCal_config->show_search, 'l_rss_info' => $lang['l_rss_info'], 'l_rss_subhead' => $lang['l_rss_subhead'], Index: rss.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** rss.php 11 Dec 2008 21:54:53 -0000 1.50 --- rss.php 20 Dec 2008 03:22:54 -0000 1.51 *************** *** 21,25 **** $rss .= "</title>\n"; ! $rss .= '<link>'.htmlspecialchars("$default_path").'</link>'."\n"; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .= "<link>$rss_link</link>\n"; --- 21,25 ---- $rss .= "</title>\n"; ! $rss .= '<link>'.htmlspecialchars("$phpiCal_config->default_path").'</link>'."\n"; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .= "<link>$rss_link</link>\n"; Index: rss1.0.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss1.0.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rss1.0.php 20 Dec 2008 00:11:56 -0000 1.8 --- rss1.0.php 20 Dec 2008 03:22:54 -0000 1.9 *************** *** 20,24 **** xmlns="http://purl.org/rss/1.0/">'."\n"; ! $rss .= '<channel rdf:about="'.$default_path.'/rss/rss.php/'; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .='">'."\n"; --- 20,24 ---- xmlns="http://purl.org/rss/1.0/">'."\n"; ! $rss .= '<channel rdf:about="'.$phpiCal_config->default_path.'/rss/rss.php/'; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .='">'."\n"; *************** *** 49,54 **** /* End guid modification */ $rss_item .= '<title>'.$rss_title.'</title>'."\n"; ! $rss .= '<ev:startdate>'.date("Y-m-d\TH:i:s", $val["start_unixtime"]).'</ev:startdate>'."\n"; ! $rss .= '<ev:enddate>'.date("Y-m-d\TH:i:s", $val["end_unixtime"]).'</ev:enddate>'."\n"; $rss_item .= '<link>'.$rss_link.'</link>'."\n"; --- 49,54 ---- /* End guid modification */ $rss_item .= '<title>'.$rss_title.'</title>'."\n"; ! $rss .= '<ev:startdate>'.date("Y-m-d\TH:i:s", @$val["start_unixtime"]).'</ev:startdate>'."\n"; ! $rss .= '<ev:enddate>'.date("Y-m-d\TH:i:s", @$val["end_unixtime"]).'</ev:enddate>'."\n"; $rss_item .= '<link>'.$rss_link.'</link>'."\n"; Index: rss2.0.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss2.0.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rss2.0.php 20 Dec 2008 00:11:56 -0000 1.7 --- rss2.0.php 20 Dec 2008 03:22:54 -0000 1.8 *************** *** 38,42 **** $rss .= "</title>\n"; ! $rss .= '<link>'.$default_path.'/rss/rss2.0.php/'; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .='</link>'."\n"; --- 38,42 ---- $rss .= "</title>\n"; ! $rss .= '<link>'.$phpiCal_config->default_path.'/rss/rss2.0.php/'; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .='</link>'."\n"; *************** *** 61,66 **** /* End guid modification */ $rss .= '<title>'.$rss_title.'</title>'."\n"; ! $rss .= '<ev:startdate>'.date("Y-m-d\TH:i:s", $val["start_unixtime"]).'</ev:startdate>'."\n"; ! $rss .= '<ev:enddate>'.date("Y-m-d\TH:i:s", $val["end_unixtime"]).'</ev:enddate>'."\n"; $rss .= '<link>'.$rss_link.'</link>'."\n"; --- 61,66 ---- /* End guid modification */ $rss .= '<title>'.$rss_title.'</title>'."\n"; ! $rss .= '<ev:startdate>'.date("Y-m-d\TH:i:s", @$val["start_unixtime"]).'</ev:startdate>'."\n"; ! $rss .= '<ev:enddate>'.date("Y-m-d\TH:i:s", @$val["end_unixtime"]).'</ev:enddate>'."\n"; $rss .= '<link>'.$rss_link.'</link>'."\n"; Index: rss_common.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss_common.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rss_common.php 20 Dec 2008 00:11:56 -0000 1.2 --- rss_common.php 20 Dec 2008 03:22:54 -0000 1.3 *************** *** 22,26 **** Additional mods by J. Hu */ ! require(BASE.'functions/init.inc.php'); --- 22,26 ---- Additional mods by J. Hu */ ! $current_view = 'rss'; require(BASE.'functions/init.inc.php'); *************** *** 123,127 **** // stuff, if so be nice and send back a 304 and exit. ! if ( ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filemodtime) || ($_SERVER['HTTP_IF_NONE_MATCH'] == $filemodtime)){ header ("HTTP/1.1 304 Not Modified"); exit; --- 123,127 ---- // stuff, if so be nice and send back a 304 and exit. ! if ( (@$_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filemodtime) || (@$_SERVER['HTTP_IF_NONE_MATCH'] == $filemodtime)){ header ("HTTP/1.1 304 Not Modified"); exit; *************** *** 155,159 **** foreach ($event_times as $uid=>$val) { #handle multiday all day events ! if(!$val["event_start"]){ if (isset($uid_arr[$uid])){ $uid_arr[$uid] .= "+$dayofweek" ; --- 155,159 ---- foreach ($event_times as $uid=>$val) { #handle multiday all day events ! if(!isset($val["event_start"])){ if (isset($uid_arr[$uid])){ $uid_arr[$uid] .= "+$dayofweek" ; |