public function delete($id)
    {
        $result = null;
        $this->hook->attach('module.backup.delete.before', $id, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->deleteZip($id);

        if ($result) {
            $this->db->delete('backup', array('backup_id' => $id));
        }

        $this->hook->attach('module.backup.delete.after', $id, $result, $this);
        return (bool) $result;
    }
public function delete($id)
    {
        $result = null;
        $this->hook->attach('module.backup.delete.before', $id, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->deleteZip($id);

        if ($result) {
            $this->db->delete('backup', array('backup_id' => $id));
        }

        $this->hook->attach('module.backup.delete.after', $id, $result, $this);
        return (bool) $result;
    }
public function delete ( $ id ) { $ result = null ; $ this -> hook -> attach ( 'module.backup.delete.before' , $ id , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ result = $ this -> deleteZip ( $ id ) ; if ( $ result ) { $ this -> db -> delete ( 'backup' , array ( 'backup_id' => $ id ) ) ; } $ this -> hook -> attach ( 'module.backup.delete.after' , $ id , $ result , $ this ) ; return ( bool ) $ result ; }
Deletes a backup from disk and database
@param integer $id
@return boolean
Deletes a backup from disk and database