示例#1
0
 /**
  * Deletes all comments for the current target
  *
  * @return void
  */
 public function deleteAllForTarget()
 {
     if ($this->model != null) {
         $targetId = $this->model->getTargetId();
         if (!empty($targetId)) {
             try {
                 $this->db->delete("plugin_ratingscomments_ratings", "targetId='" . $targetId . "'");
             } catch (Exception $e) {
                 logger::log(get_class($this) . ": Could not delete ratings for target id [" . $targetId . "]");
                 throw $e;
             }
         }
     }
 }