示例#1
0
 public function delete($pk = null)
 {
     if ($this->id == 1) {
         return false;
     }
     // Delete possible item connections
     $query = 'DELETE FROM #__acctexp_itemxgroup' . ' WHERE `group_id` = \'' . $this->id . '\'' . ' AND `type` = \'item\'';
     $this->_db->setQuery($query);
     if (!$this->_db->query()) {
         echo "<script> alert('" . $this->_db->getErrorMsg() . "'); window.history.go(-1); </script>\n";
         exit;
     }
     // Delete possible group connections
     $query = 'DELETE FROM #__acctexp_itemxgroup' . ' WHERE `group_id` = \'' . $this->id . '\'' . ' AND `type` = \'group\'';
     $this->_db->setQuery($query);
     if (!$this->_db->query()) {
         echo "<script> alert('" . $this->_db->getErrorMsg() . "'); window.history.go(-1); </script>\n";
         exit;
     }
     return parent::delete($pk);
 }
 public function delete($pk = null)
 {
     ItemGroupHandler::removeChildren($this->id);
     return parent::delete($pk);
 }
示例#3
0
 public function delete($pk = null)
 {
     if (!empty($this->coupons)) {
         foreach ($this->coupons as $cid) {
             $this->removeCoupon($cid);
         }
     }
     return parent::delete($pk);
 }
示例#4
0
 public function delete($pk = null)
 {
     setcookie('aec_token', "", (int) gmdate('U') - 3600);
     return parent::delete($pk);
 }