diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-18 00:14:07 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-18 00:14:07 +0000 |
commit | fd0c0a608a5de2b26c29d3c44a7929e5a3b2c042 (patch) | |
tree | 387f2628cae3580b7f09682de6e908d002c5fbb0 /kohana/helpers/feed.php | |
parent | 5a6aef9c23930b1de609c9914297e0f97bc49a11 (diff) |
Updated kohana and modules/unit_test to upstream r4356
Diffstat (limited to 'kohana/helpers/feed.php')
-rw-r--r-- | kohana/helpers/feed.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kohana/helpers/feed.php b/kohana/helpers/feed.php index c1e0b81f..a84ec512 100644 --- a/kohana/helpers/feed.php +++ b/kohana/helpers/feed.php @@ -65,13 +65,15 @@ class feed_Core { * * @param array feed information * @param array items to add to the feed + * @param string define which format to use + * @param string define which encoding to use * @return string */ - public static function create($info, $items, $format = 'rss2') + public static function create($info, $items, $format = 'rss2', $encoding = 'UTF-8') { $info += array('title' => 'Generated Feed', 'link' => '', 'generator' => 'KohanaPHP'); - $feed = '<?xml version="1.0"?><rss version="2.0"><channel></channel></rss>'; + $feed = '<?xml version="1.0" encoding="'.$encoding.'"?><rss version="2.0"><channel></channel></rss>'; $feed = simplexml_load_string($feed); foreach ($info as $name => $value) |