forked from lippoliv/piwik-plugin-disabletracking
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.php
More file actions
31 lines (26 loc) · 736 Bytes
/
Controller.php
File metadata and controls
31 lines (26 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace Piwik\Plugins\DisableTracking;
use Piwik\Common;
use Piwik\Piwik;
use Piwik\Plugin\ControllerAdmin;
/**
* Disable Tracking plugin controller.
*/
class Controller extends ControllerAdmin
{
/**
* Rendering the overview over all pages for managing the disable-state.
*
* @throws \Exception if an error occurred
*
* @return string the rendered template to show
*/
public function index()
{
Piwik::checkUserHasSuperUserAccess();
if (!empty(Common::getRequestVar('saveDisabledSitesState', '', null, $_POST))) {
DisableTracking::save();
}
return $this->renderTemplate('index', ['sites' => DisableTracking::getSitesStates()]);
}
}