diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/View/Helper/HeadLink.php --- a/web/lib/Zend/View/Helper/HeadLink.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/View/Helper/HeadLink.php Thu Mar 21 19:50:53 2013 +0100 @@ -15,8 +15,8 @@ * @category Zend * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @version $Id: HeadLink.php 23249 2010-10-26 12:46:47Z matthew $ + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @version $Id: HeadLink.php 24858 2012-06-01 01:24:17Z adamlundrigan $ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,7 +30,7 @@ * @uses Zend_View_Helper_Placeholder_Container_Standalone * @package Zend_View * @subpackage Helper - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_View_Helper_HeadLink extends Zend_View_Helper_Placeholder_Container_Standalone @@ -40,7 +40,19 @@ * * @var array */ - protected $_itemKeys = array('charset', 'href', 'hreflang', 'id', 'media', 'rel', 'rev', 'type', 'title', 'extras'); + protected $_itemKeys = array( + 'charset', + 'href', + 'hreflang', + 'id', + 'media', + 'rel', + 'rev', + 'type', + 'title', + 'extras', + 'sizes', + ); /** * @var string registry key @@ -379,7 +391,7 @@ } $attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet', 'extras'); - return $this->createData($attributes); + return $this->createData($this->_applyExtras($attributes)); } /** @@ -432,6 +444,24 @@ $title = (string) $title; $attributes = compact('rel', 'href', 'type', 'title', 'extras'); - return $this->createData($attributes); + return $this->createData($this->_applyExtras($attributes)); + } + + /** + * Apply any overrides specified in the 'extras' array + * @param array $attributes + * @return array + */ + protected function _applyExtras($attributes) + { + if (isset($attributes['extras'])) { + foreach ($attributes['extras'] as $eKey=>$eVal) { + if (isset($attributes[$eKey])) { + $attributes[$eKey] = $eVal; + unset($attributes['extras'][$eKey]); + } + } + } + return $attributes; } }