mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updated rss helper, fixes #3226
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5765 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a921492b5a
commit
1ff8feb94c
1 changed files with 5 additions and 5 deletions
|
@ -179,8 +179,12 @@ class RssHelper extends XmlHelper {
|
|||
*/
|
||||
function item($att = array(), $elements = array()) {
|
||||
$content = null;
|
||||
foreach ($elements as $key => $val) {
|
||||
|
||||
if (isset($elements['link']) && !isset($elements['guid'])) {
|
||||
$elements['guid'] = $elements['link'];
|
||||
}
|
||||
|
||||
foreach ($elements as $key => $val) {
|
||||
$attrib = array();
|
||||
switch ($key) {
|
||||
case 'pubDate' :
|
||||
|
@ -225,10 +229,6 @@ class RssHelper extends XmlHelper {
|
|||
$elements[$key] = $this->elem($key, $attrib, $val);
|
||||
}
|
||||
|
||||
if (isset($elements['link']) && !isset($elements['guid'])) {
|
||||
$elements['guid'] = $elements['link'];
|
||||
}
|
||||
|
||||
if (!empty($elements)) {
|
||||
$content = join('', $elements);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue