Update of /cvsroot/phpicalendar/phpicalendar/rss
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32581/phpicalendar/rss
Modified Files:
rss.php
Log Message:
fix some problems with php 5 date calcs
Index: rss.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** rss.php 10 Apr 2006 00:52:24 -0000 1.42
--- rss.php 3 May 2006 04:21:14 -0000 1.43
***************
*** 49,53 ****
case 'week':
$fromdate = dateOfWeek($getdate, 'Sunday');
! $todate = $fromdate + 6;
$theview = $lang['l_week']." of ".date('n/d/Y',strtotime($fromdate));
break;
--- 49,53 ----
case 'week':
$fromdate = dateOfWeek($getdate, 'Sunday');
! $todate = date("Ymd", strtotime($fromdate) + 6*24*60*60);
$theview = $lang['l_week']." of ".date('n/d/Y',strtotime($fromdate));
break;
***************
*** 90,94 ****
#default to week
$fromdate = dateOfWeek($getdate, 'Sunday');
! $todate = $fromdate + 6;
$theview = "";
--- 90,94 ----
#default to week
$fromdate = dateOfWeek($getdate, 'Sunday');
! $todate = date("Ymd", strtotime($fromdate) + 6*24*60*60);
$theview = "";
***************
*** 132,147 ****
$rss = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"."\n";
!
! /* Use 1.0 and strip encoding, use rss_language */
! $rss .= '<rdf:RDF
! xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
! xmlns:ev="http://purl.org/rss/1.0/modules/event/"
! xmlns:dc="http://purl.org/dc/elements/1.1/"
! 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";
!
$rss .= '<title>'.$cal_displayname;
if ($theview !=""){$rss .= ' - '.$theview;}
--- 132,138 ----
$rss = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"."\n";
! $rss .= '<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">'."\n";
! $rss .= '<rss version="0.91">'."\n";
! $rss .= '<channel>'."\n";
$rss .= '<title>'.$cal_displayname;
if ($theview !=""){$rss .= ' - '.$theview;}
***************
*** 153,158 ****
$rss .= '<description>'.$cal_displayname.' '.$lang['l_calendar'].' - '.$theview.'</description>'."\n";
! $rss .= '<language>'.$language.'</language>'."\n";
! $rss .= '<copyright>Copyright '.date('Y').', '.htmlspecialchars ("$default_path").'</copyright>'."\n";
//generate the items
--- 144,149 ----
$rss .= '<description>'.$cal_displayname.' '.$lang['l_calendar'].' - '.$theview.'</description>'."\n";
! $rss .= '<language>'.$rss_language.'</language>'."\n";
! $rss .= '<copyright>Copyright '.date(Y).', '.htmlspecialchars ("$default_path").'</copyright>'."\n";
//generate the items
***************
*** 232,236 ****
$rss .= '</item>'."\n";
}
! $thisdate++;
$i++;
} while ($i <= $numdays);
--- 223,227 ----
$rss .= '</item>'."\n";
}
! $thisdate = date("Ymd", strtotime($thisdate)+60*60*24);
$i++;
} while ($i <= $numdays);
|