Esempio n. 1
0
 /**
  * Deletes a specific report
  *
  * @param int $idReport
  */
 public function deleteReport($idReport)
 {
     $APIScheduledReports = $this->getReports($idSite = false, $periodSearch = false, $idReport);
     $report = reset($APIScheduledReports);
     Piwik::checkUserHasSuperUserAccessOrIsTheUser($report['login']);
     Db::get()->update(Common::prefixTable('report'), array('deleted' => 1), "idreport = '{$idReport}'");
     self::$cache = array();
 }
Esempio n. 2
0
 /**
  * Deletes a specific report
  *
  * @param int $idReport
  */
 public function deleteReport($idReport)
 {
     $APIScheduledReports = $this->getReports($idSite = false, $periodSearch = false, $idReport);
     $report = reset($APIScheduledReports);
     Piwik::checkUserHasSuperUserAccessOrIsTheUser($report['login']);
     $this->getModel()->updateReport($idReport, array('deleted' => 1));
     self::$cache = array();
 }