Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
sgehrig committed Dec 7, 2010
2 parents 17bdc38 + a75e952 commit 37995a5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/HeadScript.php
Expand Up @@ -454,7 +454,7 @@ public function toString($indent = null)
: $this->getIndent();

if ($this->view) {
$useCdata = $this->view->doctype()->isXhtml() ? true : false;
$useCdata = $this->view->broker('doctype')->isXhtml() ? true : false;
} else {
$useCdata = $this->useCdata ? true : false;
}
Expand Down
6 changes: 4 additions & 2 deletions library/Zend/View/Helper/Navigation.php
Expand Up @@ -198,15 +198,17 @@ public function findHelper($proxy, $strict = true)
$loader = $this->getPluginLoader();

if ($strict) {
$helper = $loader->load($proxy);
$class = $loader->load($proxy);
} else {
try {
$helper = $loader->load($proxy);
$class = $loader->load($proxy);
} catch (\Zend\Loader\Exception $e) {
return null;
}
}

$helper = new $class();

if (!$helper instanceof AbstractNavigationHelper) {
if ($strict) {
$e = new \Zend\View\Exception(sprintf(
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/Navigation/AbstractHelper.php
Expand Up @@ -679,7 +679,7 @@ public function htmlify(AbstractPage $page)
);

return '<a' . $this->_htmlAttribs($attribs) . '>'
. $this->view->escape($label)
. $this->view->vars()->escape($label)
. '</a>';
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/Navigation/Breadcrumbs.php
Expand Up @@ -205,7 +205,7 @@ public function renderStraight(Container $container = null)
if ($this->getUseTranslator() && $t = $this->getTranslator()) {
$html = $t->translate($html);
}
$html = $this->view->escape($html);
$html = $this->view->vars()->escape($html);
}

// walk back to root
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/View/Helper/Navigation/HelperLoader.php
Expand Up @@ -7,9 +7,9 @@
class HelperLoader extends PluginClassLoader
{
protected $plugins = array(
'breadcrumbs' => 'Zend\View\Helper\Navigation\\Breadcrumbs',
'links' => 'Zend\View\Helper\Navigation\\Links',
'menu' => 'Zend\View\Helper\Navigation\\Menu',
'sitemap' => 'Zend\View\Helper\Navigation\\Sitemap',
'breadcrumbs' => 'Zend\View\Helper\Navigation\Breadcrumbs',
'links' => 'Zend\View\Helper\Navigation\Links',
'menu' => 'Zend\View\Helper\Navigation\Menu',
'sitemap' => 'Zend\View\Helper\Navigation\Sitemap',
);
}
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/Navigation/Menu.php
Expand Up @@ -244,7 +244,7 @@ public function htmlify(AbstractPage $page)
}

return '<' . $element . $this->_htmlAttribs($attribs) . '>'
. $this->view->escape($label)
. $this->view->vars()->escape($label)
. '</' . $element . '>';
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Zend/View/Helper/Navigation/TestAbstract.php
Expand Up @@ -98,8 +98,8 @@ protected function setUp()
$this->_nav2 = new Navigation\Navigation($config->get('nav_test2'));

// setup view
$view = new \Zend\View\View();
$view->setScriptPath($cwd . '/_files/mvc/views');
$view = new \Zend\View\PhpRenderer();
$view->resolver()->addPath($cwd . '/_files/mvc/views');

// setup front
$front = Controller\Front::getInstance();
Expand Down

0 comments on commit 37995a5

Please sign in to comment.