diff options
author | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-01-30 04:51:09 +0300 |
---|---|---|
committer | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-01-30 04:51:09 +0300 |
commit | 96eea79c6628c8b36ac8528a892a7ba699bbb194 (patch) | |
tree | dc7907df7d26339598fda423fdc65ae867c3594d /plugins/UserSettings | |
parent | 190431e3a98cc5512c79891c3dd3519e4810a779 (diff) |
fixes #1122
Diffstat (limited to 'plugins/UserSettings')
-rw-r--r-- | plugins/UserSettings/API.php | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/plugins/UserSettings/API.php b/plugins/UserSettings/API.php index 8e3b65c734..e87de7efe6 100644 --- a/plugins/UserSettings/API.php +++ b/plugins/UserSettings/API.php @@ -35,7 +35,7 @@ class Piwik_UserSettings_API return self::$instance; } - protected function getDataTable($name, $idSite, $period, $date) + static protected function getDataTable($name, $idSite, $period, $date) { Piwik::checkUserHasViewAccess( $idSite ); $archive = Piwik_Archive::build($idSite, $period, $date ); @@ -44,56 +44,57 @@ class Piwik_UserSettings_API $dataTable->queueFilter('ReplaceColumnNames'); return $dataTable; } - public function getResolution( $idSite, $period, $date ) + + static public function getResolution( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_resolution', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_resolution', $idSite, $period, $date); return $dataTable; } - public function getConfiguration( $idSite, $period, $date ) + static public function getConfiguration( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_configuration', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_configuration', $idSite, $period, $date); $dataTable->queueFilter('ColumnCallbackReplace', array('label', 'Piwik_getConfigurationLabel')); return $dataTable; } - public function getOS( $idSite, $period, $date ) + static public function getOS( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_os', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_os', $idSite, $period, $date); $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'logo', 'Piwik_getOSLogo')); $dataTable->queueFilter('ColumnCallbackAddMetadata', array( 'label', 'shortLabel', 'Piwik_getOSShortLabel') ); $dataTable->queueFilter('ColumnCallbackReplace', array( 'label', 'Piwik_getOSLabel') ); return $dataTable; } - public function getBrowser( $idSite, $period, $date ) + static public function getBrowser( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_browser', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_browser', $idSite, $period, $date); $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'logo', 'Piwik_getBrowsersLogo')); $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'shortLabel', 'Piwik_getBrowserShortLabel')); $dataTable->queueFilter('ColumnCallbackReplace', array('label', 'Piwik_getBrowserLabel')); return $dataTable; } - public function getBrowserType( $idSite, $period, $date ) + static public function getBrowserType( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_browserType', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_browserType', $idSite, $period, $date); $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'shortLabel', 'ucfirst')); $dataTable->queueFilter('ColumnCallbackReplace', array('label', 'Piwik_getBrowserTypeLabel')); return $dataTable; } - public function getWideScreen( $idSite, $period, $date ) + static public function getWideScreen( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_wideScreen', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_wideScreen', $idSite, $period, $date); $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'logo', 'Piwik_getScreensLogo')); $dataTable->queueFilter('ColumnCallbackReplace', array('label', 'ucfirst')); return $dataTable; } - public function getPlugin( $idSite, $period, $date ) + static public function getPlugin( $idSite, $period, $date ) { - $dataTable = $this->getDataTable('UserSettings_plugin', $idSite, $period, $date); + $dataTable = self::getDataTable('UserSettings_plugin', $idSite, $period, $date); $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'logo', 'Piwik_getPluginsLogo')); $dataTable->queueFilter('ColumnCallbackReplace', array('label', 'ucfirst')); return $dataTable; |