piwik: properly record the site id after creation
This commit is contained in:
parent
954ffc2ab0
commit
fb9d6d8457
|
@ -292,9 +292,10 @@ class m_piwik {
|
||||||
// Ajoute un site à Piwik
|
// Ajoute un site à Piwik
|
||||||
// can't figure out how to pass multiple url through the API
|
// can't figure out how to pass multiple url through the API
|
||||||
function site_add($siteName, $urls, $ecommerce = FALSE) {
|
function site_add($siteName, $urls, $ecommerce = FALSE) {
|
||||||
|
global $db, $cuid;
|
||||||
$urls = is_array($urls) ? implode(',', $urls) : $urls;
|
$urls = is_array($urls) ? implode(',', $urls) : $urls;
|
||||||
$api_data = $this->call_privileged_page('API', 'SitesManager.addSite', array('siteName' => $siteName, 'urls' => $urls));
|
$api_data = $this->call_privileged_page('API', 'SitesManager.addSite', array('siteName' => $siteName, 'urls' => $urls));
|
||||||
printvar($api_data);
|
$db->query("INSERT INTO piwik_sites set uid='$cuid', piwik_id='{$api_data->value}'");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue