mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
fix for enclosures in rss helper
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3871 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
8048251fd0
commit
d31434336b
1 changed files with 5 additions and 4 deletions
|
@ -203,16 +203,16 @@ class RssHelper extends XmlHelper {
|
|||
if (!isset($val['type']) && function_exists('mime_content_type')) {
|
||||
$val['type'] = mime_content_type(WWW_ROOT . $val['url']);
|
||||
}
|
||||
}
|
||||
$val['url'] = Router::url($val['url'], true);
|
||||
$attrib = $val;
|
||||
}
|
||||
$val = null;
|
||||
break;
|
||||
}
|
||||
if ($val != null) {
|
||||
$val = h($val);
|
||||
}
|
||||
$elements[$key] = $this->elem($key, array(), $val);
|
||||
$elements[$key] = $this->elem($key, $attrib, $val);
|
||||
}
|
||||
|
||||
if (isset($elements['link']) && !isset($elements['guid'])) {
|
||||
|
@ -222,6 +222,7 @@ class RssHelper extends XmlHelper {
|
|||
if (!empty($elements)) {
|
||||
$content = join('', $elements);
|
||||
}
|
||||
|
||||
return $this->output($this->elem('item', $attrib, $content, !($content === null)));
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue