mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
fixing fail in Html::meta(); and adding ClassRegistry::flush(); to fix no_database test group.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6207 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
eebdb12eaa
commit
a2624df5f2
2 changed files with 5 additions and 3 deletions
|
@ -226,14 +226,15 @@ class HtmlHelper extends AppHelper {
|
||||||
|
|
||||||
$attributes = array_merge($type, $attributes);
|
$attributes = array_merge($type, $attributes);
|
||||||
|
|
||||||
if (isset($attributes['link'])) {
|
$out = null;
|
||||||
|
if (isset($attributes['link'])) {
|
||||||
if (isset($attributes['rel']) && $attributes['rel'] === 'icon') {
|
if (isset($attributes['rel']) && $attributes['rel'] === 'icon') {
|
||||||
|
$out = sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
|
||||||
$attributes['rel'] = 'shortcut icon';
|
$attributes['rel'] = 'shortcut icon';
|
||||||
$out .= sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
|
|
||||||
} else {
|
} else {
|
||||||
$attributes['link'] = $this->url($attributes['link'], true);
|
$attributes['link'] = $this->url($attributes['link'], true);
|
||||||
}
|
}
|
||||||
$out = sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
|
$out .= sprintf($this->tags['metalink'], $attributes['link'], $this->_parseAttributes($attributes, array('link')));
|
||||||
} else {
|
} else {
|
||||||
$out = sprintf($this->tags['meta'], $this->_parseAttributes($attributes, array('type')));
|
$out = sprintf($this->tags['meta'], $this->_parseAttributes($attributes, array('type')));
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ class HelperTestPostsTag extends Model {
|
||||||
class HelperTest extends UnitTestCase {
|
class HelperTest extends UnitTestCase {
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
|
ClassRegistry::flush();
|
||||||
Router::reload();
|
Router::reload();
|
||||||
$null = null;
|
$null = null;
|
||||||
$this->View = new View($null);
|
$this->View = new View($null);
|
||||||
|
|
Loading…
Add table
Reference in a new issue