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:
authorStefan Giehl <stefan@piwik.org>2018-10-03 22:52:29 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-10-03 22:52:29 +0300
commit902bd940c87fd9f0d1730dc2b9560b862b8c8e9a (patch)
treeea03fcb6f0a79f8e6f06b2814651d55b91f306ea /plugins/Annotations
parent67eaa2c0381933d5e38180a2159044893447acca (diff)
Improve usage of requested site in plugin Controllers (#13526)
Diffstat (limited to 'plugins/Annotations')
-rw-r--r--plugins/Annotations/Controller.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Annotations/Controller.php b/plugins/Annotations/Controller.php
index 86859bd37f..b93e5c94e9 100644
--- a/plugins/Annotations/Controller.php
+++ b/plugins/Annotations/Controller.php
@@ -43,7 +43,7 @@ class Controller extends \Piwik\Plugin\Controller
*/
public function getAnnotationManager($fetch = false, $date = false, $period = false, $lastN = false)
{
- $idSite = Common::getRequestVar('idSite');
+ $this->checkSitePermission();
if ($date === false) {
$date = Common::getRequestVar('date', false);
@@ -62,7 +62,7 @@ class Controller extends \Piwik\Plugin\Controller
$allAnnotations = Request::processRequest(
'Annotations.getAll', array('date' => $date, 'period' => $period, 'lastN' => $lastN));
- $view->annotations = empty($allAnnotations[$idSite]) ? array() : $allAnnotations[$idSite];
+ $view->annotations = empty($allAnnotations[$this->idSite]) ? array() : $allAnnotations[$this->idSite];
$view->period = $period;
$view->lastN = $lastN;
@@ -81,7 +81,7 @@ class Controller extends \Piwik\Plugin\Controller
$view->startDatePretty = $startDate->getLocalized($dateFormat);
$view->endDatePretty = $endDate->getLocalized($dateFormat);
- $view->canUserAddNotes = AnnotationList::canUserAddNotesFor($idSite);
+ $view->canUserAddNotes = AnnotationList::canUserAddNotesFor($this->idSite);
return $view->render();
}