src/libraries/models/Photo.php
/**
    * Delete a photo from the remote database and remote filesystem.
    * This deletes the original photo and all versions.
    *
    * @param string $id ID of the photo
    * @return boolean
    */
Delete a photo from the remote database and remote filesystem.
This deletes the original photo and all versions.

@param string $id ID of the photo
@return boolean
Delete a photo from the remote database and remote filesystem . This deletes the original photo and all versions . @param string $id ID of the photo @return boolean
public function delete($id)
  {
    $photo = $this->db->getPhoto($id);
    if(!$photo)
      return false;
    $fileStatus = $this->fs->deletePhoto($photo);
    $dataStatus = $this->db->deletePhoto($photo);
    return $fileStatus && $dataStatus;
  }
public function delete ( $ id ) { $ photo = $ this -> db -> getPhoto ( $ id ) ; if ( ! $ photo ) return false ; $ fileStatus = $ this -> fs -> deletePhoto ( $ photo ) ; $ dataStatus = $ this -> db -> deletePhoto ( $ photo ) ; return $ fileStatus && $ dataStatus ; }
Delete a photo from the remote database and remote filesystem.
Delete a photo from the remote database and remote filesystem .
// TODO, validation // TODO, do not delete record from db - mark as deleted