Commit fb9d6d84 authored by Antoine Beaupr��'s avatar Antoine Beaupr��

piwik: properly record the site id after creation

parent 954ffc2a
......@@ -292,9 +292,10 @@ class m_piwik {
// Ajoute un site à Piwik
// can't figure out how to pass multiple url through the API
function site_add($siteName, $urls, $ecommerce = FALSE) {
global $db, $cuid;
$urls = is_array($urls) ? implode(',', $urls) : $urls;
$api_data = $this->call_privileged_page('API', 'SitesManager.addSite', array('siteName' => $siteName, 'urls' => $urls));
$db->query("INSERT INTO piwik_sites set uid='$cuid', piwik_id='{$api_data->value}'");
return TRUE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment