From af0bb50a5464df629925998e20d73e864c3978cf Mon Sep 17 00:00:00 2001 From: mattpiwik Date: Sun, 28 Oct 2012 05:44:48 +0000 Subject: Fixes #3485 git-svn-id: http://dev.piwik.org/svn/trunk@7320 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- plugins/UserCountry/Controller.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php index c055f4b0fb..8d477d7f01 100644 --- a/plugins/UserCountry/Controller.php +++ b/plugins/UserCountry/Controller.php @@ -35,23 +35,25 @@ class Piwik_UserCountry_Controller extends Piwik_Controller { Piwik::checkUserIsSuperUser(); $view = Piwik_View::factory('adminIndex'); - - $view->locationProviders = Piwik_UserCountry_LocationProvider::getAllProviderInfo( + + $allProviderInfo = Piwik_UserCountry_LocationProvider::getAllProviderInfo( $newline = '
', $includeExtra = true); + $view->locationProviders = $allProviderInfo; $view->currentProviderId = Piwik_UserCountry_LocationProvider::getCurrentProviderId(); $view->thisIP = Piwik_IP::getIpFromHeader(); // check if there is a working provider (that isn't the default one) - $view->isThereWorkingProvider = false; - foreach ($view->locationProviders as $id => $provider) + $isThereWorkingProvider = false; + foreach ($allProviderInfo as $id => $provider) { if ($id != Piwik_UserCountry_LocationProvider_Default::ID && $provider['status'] == Piwik_UserCountry_LocationProvider::INSTALLED) { - $view->isThereWorkingProvider = true; + $isThereWorkingProvider = true; break; } } + $view->isThereWorkingProvider = $isThereWorkingProvider; $this->setBasicVariablesView($view); Piwik_Controller_Admin::setBasicVariablesAdminView($view); $view->menu = Piwik_GetAdminMenu(); -- cgit v1.2.3