aboutsummaryrefslogtreecommitdiffstats
path: root/rss
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-03-24 01:29:23 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-03-24 01:29:23 +0000
commit81d948b960707aacd95a2ee94ee89c6db8eda6c6 (patch)
tree8ac5ca574331f94baf711df80e435708febc8cee /rss
parent03057b77274de45639c7d29bb1fa010cb736a9bc (diff)
downloadphpicalendar-81d948b960707aacd95a2ee94ee89c6db8eda6c6.zip
phpicalendar-81d948b960707aacd95a2ee94ee89c6db8eda6c6.tar.gz
phpicalendar-81d948b960707aacd95a2ee94ee89c6db8eda6c6.tar.bz2
security patch for template file from cookie. Other minor bug fixes
Diffstat (limited to 'rss')
-rw-r--r--rss/rss.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/rss/rss.php b/rss/rss.php
index f72d0ca..f37d5d9 100644
--- a/rss/rss.php
+++ b/rss/rss.php
@@ -12,9 +12,11 @@
* feeds can be specified for a number of days to or from a given date
* feeds can be specified for a range of dates
*
+* Language encoding added by dyfrin 2006/03/08 19:09:28
*********************************************************************************/
define('BASE', '../');
-include(BASE.'functions/init.inc.php');
+require(BASE.'functions/init.inc.php');
+
if ($enable_rss != 'yes') {
die ("RSS feeds are not enabled on this site.");
}
@@ -115,6 +117,12 @@ if ( ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filemodtime) || ($_SERVER['HTTP_IF_
exit;
}
+/* 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";
$rss .= '<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">'."\n";
@@ -165,7 +173,7 @@ $uid_arr = array();
$event_text = strip_tags($event_text, '<b><i><u>');
$event_text = str_replace('&','&amp;',$event_text);
$event_text = str_replace('&amp;amp;','&amp;',$event_text);
- $event_text = urlencode($event_text);
+ # $event_text = urlencode($event_text);
#uncomment for shorter event text with ...
# $event_text = word_wrap($event_text, 21, $tomorrows_events_lines);
$description = stripslashes(urldecode($val["description"]));
@@ -194,9 +202,11 @@ $uid_arr = array();
*/
$rss .= '<link>'.$rss_link.'</link>'."\n";
$rss .= '<description>'.$rss_description.'</description>'."\n";
+ if (isset($val['location']) && $val['location'] !=''){
$location = str_replace('&','&amp;',$val['location']);
$location = str_replace('&amp;amp;','&amp;',$location);
- $rss .= '<location>'.$location.'</location>';
+ $rss .= '<location>'.$location."/location>\n";
+ }
$rss .= '</item>'."\n";
$events_count++;
}

© 2014-2020 Faster IT GmbH | imprint | privacy policy