/**
  * Deletes this record (no checks)
  *
  * @param  int      $oid   Key id of row to delete (otherwise it's the one of $this)
  * @return boolean         TRUE if OK, FALSE if error
  */
 public function delete($oid = null)
 {
     //FIXME: delete also all children subscriptions of this subscription (where parent_subscription and parent_plan match this one)
     $result = parent::delete($oid);
     if ($result) {
         $this->_historyLogChanges(null, 'delete');
     }
     return $result;
 }
 /**
  *	Delete method for fields deleting also fieldvalues, but not the data column in the comprofiler table.
  *	For that, deleteDataDescr() method must be called instead.
  *
  *	@param id of row to delete
  *	@return true if successful otherwise returns and error message
  */
 function delete($oid = null)
 {
     $k = $this->_tbl_key;
     if ($oid) {
         $this->{$k} = (int) $oid;
     }
     $result = true;
     //Find all fieldValues related to the field
     $this->_db->setQuery("SELECT `fieldvalueid` FROM #__comprofiler_field_values WHERE `fieldid`=" . (int) $this->{$k});
     $fieldvalues = $this->_db->loadObjectList();
     $rowFieldValues = new moscomprofilerFieldValues($this->_db);
     if (count($fieldvalues) > 0) {
         //delete each field value related to a field
         foreach ($fieldvalues as $fieldvalue) {
             $result = $rowFieldValues->delete($fieldvalue->fieldvalueid) && $result;
         }
     }
     //Now delete the field itself without deleting the user data, preserving it for reinstall
     //$this->deleteColumn( $this->table, $this->name );	// this would delete the user data
     $result = parent::delete($this->{$k}) && $result;
     return $result;
 }
	public function delete( $id = null ) {
		global $_CB_framework, $_PLUGINS;

		$plugin	=	cbgjClass::getPlugin();
		$user	=&	CBuser::getUserDataInstance( $_CB_framework->myId() );

		$_PLUGINS->trigger( 'gjint_onBeforeDeleteAuto', array( &$this, $user, $plugin ) );

		if ( ! parent::delete( $id ) ) {
			return false;
		}

		$_PLUGINS->trigger( 'gjint_onAfterDeleteAuto', array( $this, $user, $plugin ) );

		$this->updateOrder();

		return true;
	}
	/**
	 * deletes notification only
	 *
	 * @param null|int $id
	 * @return bool
	 */
	public function delete( $id = null ) {
		global $_CB_framework, $_PLUGINS;

		$plugin	=	cbgjClass::getPlugin();
		$user	=&	CBuser::getUserDataInstance( $_CB_framework->myId() );

		$_PLUGINS->trigger( 'gj_onBeforeDeleteNotification', array( &$this, $this->getGroup(), $this->getCategory(), $user, $plugin ) );

		if ( ! parent::delete( $id ) ) {
			return false;
		}

		$_PLUGINS->trigger( 'gj_onAfterDeleteNotification', array( $this, $this->getGroup(), $this->getCategory(), $user, $plugin ) );

		return true;
	}