From cb2952d60b45a76f4d25a2dea347f9486f3c75fd Mon Sep 17 00:00:00 2001 From: nate Date: Wed, 24 Jan 2007 01:56:12 +0000 Subject: [PATCH] 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 --- cake/libs/view/helpers/html.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 433a1f773..fec939c8c 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -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'; }