Merge pull request #329 from Koumbit/matomo_integration_fixes

Matomo integration fixes
This commit is contained in:
Km 2019-07-12 22:54:17 +02:00 committed by GitHub
commit 5e9fadd315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -118,7 +118,7 @@ class m_piwik {
if ($api_data->result === 'success') {
$user = $this->get_user($user_login);
$user_creation_date = $user->date_registered;
$ret_value = $db->query("INSERT INTO piwik_users (uid, passwd, login, created_date) VALUES ( ?, ?, ?, ?);", array($cuid, md5('$user_pass'), $user_login, $user_creation_date));
$ret_value = $db->query("INSERT INTO piwik_users (uid, passwd, login, created_date) VALUES ( ?, ?, ?, ?);", array($cuid, md5($user_pass), $user_login, $user_creation_date));
return $ret_value;
} else {
$msg->raise("ERROR", "piwik", $api_data->message);
@ -326,7 +326,8 @@ class m_piwik {
$msg->debug("piwik","site_list");
$this->get_alternc_sites();
$api_data = $this->call_privileged_page('API', 'SitesManager.getAllSites');
$api_data = $this->call_privileged_page('API', 'SitesManager.getAllSites',
array('filter_limit' => -1));
$data = array();
if($api_data) {
@ -364,7 +365,8 @@ class m_piwik {
function get_site_list()
{
return $this->call_privileged_page('API', 'SitesManager.getAllSites');
return $this->call_privileged_page('API', 'SitesManager.getAllSites',
array('filter_limit' => -1));
}
// Ajoute un site à Piwik
// can't figure out how to pass multiple url through the API