From: <ji...@us...> - 2006-03-24 01:29:28
|
Update of /cvsroot/phpicalendar/phpicalendar/rss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv798/rss Modified Files: rss.php Log Message: security patch for template file from cookie. Other minor bug fixes Index: rss.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** rss.php 21 Mar 2006 09:52:30 -0000 1.39 --- rss.php 24 Mar 2006 01:29:23 -0000 1.40 *************** *** 13,19 **** * feeds can be specified for a range of dates * *********************************************************************************/ define('BASE', '../'); ! include(BASE.'functions/init.inc.php'); if ($enable_rss != 'yes') { die ("RSS feeds are not enabled on this site."); --- 13,21 ---- * feeds can be specified for a range of dates * + * Language encoding added by dyfrin 2006/03/08 19:09:28 *********************************************************************************/ define('BASE', '../'); ! require(BASE.'functions/init.inc.php'); ! if ($enable_rss != 'yes') { die ("RSS feeds are not enabled on this site."); *************** *** 116,119 **** --- 118,127 ---- } + /* Change languages to ISO 639-1 to validate RSS without changing long version in config.inc.php */ + $user_language = array ("english", "polish", "german", "french", "dutch", "italian", "japanese", "norwegian", "spanish", "swedish", "portuguese", "catalan", "traditional_chinese", "esperanto", "korean"); + $iso_language = array ("en", "pl", "de", "fr", "nl", "da", "it", "ja", "no", "es", "sv", "pt", "ca", "zh-tw", "eo", "ko"); + $rss_language = str_replace($user_language, $iso_language, $language); + /* End language modification */ + //If client needs new feed - make the header $rss = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"."\n"; *************** *** 166,170 **** $event_text = str_replace('&','&',$event_text); $event_text = str_replace('&amp;','&',$event_text); ! $event_text = urlencode($event_text); #uncomment for shorter event text with ... # $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); --- 174,178 ---- $event_text = str_replace('&','&',$event_text); $event_text = str_replace('&amp;','&',$event_text); ! # $event_text = urlencode($event_text); #uncomment for shorter event text with ... # $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); *************** *** 195,201 **** $rss .= '<link>'.$rss_link.'</link>'."\n"; $rss .= '<description>'.$rss_description.'</description>'."\n"; $location = str_replace('&','&',$val['location']); $location = str_replace('&amp;','&',$location); ! $rss .= '<location>'.$location.'</location>'; $rss .= '</item>'."\n"; $events_count++; --- 203,211 ---- $rss .= '<link>'.$rss_link.'</link>'."\n"; $rss .= '<description>'.$rss_description.'</description>'."\n"; + if (isset($val['location']) && $val['location'] !=''){ $location = str_replace('&','&',$val['location']); $location = str_replace('&amp;','&',$location); ! $rss .= '<location>'.$location."/location>\n"; ! } $rss .= '</item>'."\n"; $events_count++; |