Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-08-26 22:33:58 +0300
committerdiosmosis <benaka@piwik.pro>2015-08-26 22:33:58 +0300
commit141508562c611aa1bfb1759239af3b554bc08280 (patch)
tree069411ccd03372f672a1c8c5781a8af30716667f /plugins/Goals
parentfdf3561b61fd98a0aa70b3d44d97a00b59ff22ed (diff)
Refs #8274, fix UI test.
Diffstat (limited to 'plugins/Goals')
-rw-r--r--plugins/Goals/Controller.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index 780693974d..15f7b40aab 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -160,6 +160,7 @@ class Controller extends \Piwik\Plugin\Controller
$view = new View('@Goals/manageGoals');
$this->setGeneralVariablesView($view);
$this->setEditGoalsViewVariables($view);
+ $this->setUserCanEditGoals($view);
return $view->render();
}
@@ -229,7 +230,7 @@ class Controller extends \Piwik\Plugin\Controller
{
$view = new View('@Goals/addNewGoal');
$this->setGeneralVariablesView($view);
- $view->userCanEditGoals = Piwik::isUserHasAdminAccess($this->idSite);
+ $this->setUserCanEditGoals($view);
$view->onlyShowAddNewGoal = true;
return $view->render();
}
@@ -239,7 +240,7 @@ class Controller extends \Piwik\Plugin\Controller
$view = new View('@Goals/editGoals');
$this->setGeneralVariablesView($view);
$this->setEditGoalsViewVariables($view);
- $view->userCanEditGoals = Piwik::isUserHasAdminAccess($this->idSite);
+ $this->setUserCanEditGoals($view);
return $view->render();
}
@@ -490,4 +491,9 @@ class Controller extends \Piwik\Plugin\Controller
$view->goalsJSON = json_encode($goals);
$view->ecommerceEnabled = $this->site->isEcommerceEnabled();
}
+
+ private function setUserCanEditGoals(View $view)
+ {
+ $view->userCanEditGoals = Piwik::isUserHasAdminAccess($this->idSite);
+ }
}