static function connectDatabase() { if (!is_null(self::$db)) { return; } $configDb = Piwik_LogStats_Config::getInstance()->database; // we decode the password. Password is html encoded because it's enclosed between " double quotes $configDb['password'] = htmlspecialchars_decode($configDb['password']); self::$db = new Piwik_LogStats_Db($configDb['host'], $configDb['username'], $configDb['password'], $configDb['dbname']); self::$db->connect(); }
/** * This is called at the end of the Generator script. * Calls the Profiler output if the profiler is enabled. * * @return void */ public function end() { Piwik_LogStats::disconnectDb(); if ($this->profiling) { Piwik::printSqlProfilingReportLogStats(); } }