From 6288ec421a933d977be1361070627e7b3cf39267 Mon Sep 17 00:00:00 2001 From: Evan Coury Date: Sun, 8 Jan 2012 16:46:33 -0700 Subject: [PATCH] Use getBaseUrl() instead of detectBaseUrl() Pointed out by @Swaagie, detectBaseUrl() doesn't cache to a class property per request, whereas getBaseUrl() is a wrapper for detectBaseUrl() which does cache per instance of the request. --- module/Application/Module.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/Application/Module.php b/module/Application/Module.php index 2f20670..2e5dc4e 100644 --- a/module/Application/Module.php +++ b/module/Application/Module.php @@ -76,13 +76,13 @@ class Module implements AutoloaderProvider ->setAutoEscape(false) ->append('ZF2 Skeleton Application'); - $basePath = $app->getRequest()->detectBaseUrl(); + $basePath = $app->getRequest()->getBaseUrl(); - $view->plugin('headLink')->appendStylesheet($basePath . 'css/bootstrap.min.css'); + $view->plugin('headLink')->appendStylesheet($basePath . '/css/bootstrap.min.css'); - $html5js = ''; + $html5js = ''; $view->plugin('placeHolder')->__invoke('html5js')->set($html5js); - $favicon = ''; + $favicon = ''; $view->plugin('placeHolder')->__invoke('favicon')->set($favicon); $this->view = $view; -- 1.7.10.4