Adding shortcut icon generating to HtmlHelper::meta()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4324 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-24 01:56:12 +00:00
parent bd67cfc0db
commit cb2952d60b

View file

@ -185,7 +185,12 @@ class HtmlHelper extends AppHelper {
* @return string
*/
function meta($title = null, $url = null, $attributes = array(), $inline = true) {
$types = array('html' => 'text/html', 'rss' => 'application/rss+xml', 'atom' => 'application/atom+xml');
$types = array(
'html' => 'text/html',
'rss' => 'application/rss+xml',
'atom' => 'application/atom+xml',
'icon' => 'image/x-icon'
);
if (!isset($attributes['type']) && is_array($url) && isset($url['ext'])) {
if (in_array($url['ext'], array_keys($types))) {
@ -193,7 +198,7 @@ class HtmlHelper extends AppHelper {
} else {
$attributes['type'] = 'rss';
}
} else {
} elseif (!isset($attributes['type'])) {
$attributes['type'] = 'rss';
}