/**
  * Load entry by version and path
  *
  * @param      integer 	$vid		pub version id
  * @param      string 	$identifier	content path or object id/name
  * @return     boolean
  */
 public function deleteAttachment($vid = NULL, $identifier = NULL, $type = 'file')
 {
     if (!$vid) {
         $vid = $this->publication_version_id;
     }
     if (!$vid) {
         return false;
     }
     if (!$identifier) {
         return false;
     }
     $attach = new \Components\Publications\Models\Attachments($this->_db);
     $prop = $attach->connector($type);
     $prop = $prop ? $prop : 'path';
     $query = "DELETE FROM {$this->_tbl} WHERE publication_version_id=" . $this->_db->quote($vid);
     $query .= " AND " . $prop . "=" . $this->_db->quote($identifier);
     $this->_db->setQuery($query);
     if (!$this->_db->query()) {
         $this->setError($this->_db->getErrorMsg());
         return false;
     }
     return true;
 }