src/libraries/adapters/DatabaseSimpleDb.php
/**
    * Delete a photos versions excluding base and original
    *
    * @param string $id ID of the photo to delete versions of
    * @return boolean
    */
Delete a photos versions excluding base and original
@param string $id ID of the photo to delete versions of
@return boolean
Delete a photos versions excluding base and original @param string $id ID of the photo to delete versions of @return boolean
public function deletePhotoVersions($photo)
  {
    if(!isset($photo['id']))
      return false;
    $photo = $this->getPhoto($photo['id']);
    $attrs = array();
    foreach($photo as $key => $val)
    {
      if(preg_match('/^path/', $key) === 1 && !in_array($key, array('pathOriginal', 'pathBase')))
      {
        $attrs[] = array('Name' => $key);
      }
    }
    $res = $this->db->delete_attributes($this->domainPhoto, $photo['id'], $attrs);
    return $res !== false;
  }
public function deletePhotoVersions ( $ photo ) { if ( ! isset ( $ photo [ 'id' ] ) ) return false ; $ photo = $ this -> getPhoto ( $ photo [ 'id' ] ) ; $ attrs = array ( ) ; foreach ( $ photo as $ key => $ val ) { if ( preg_match ( '/^path/' , $ key ) === 1 && ! in_array ( $ key , array ( 'pathOriginal' , 'pathBase' ) ) ) { $ attrs [ ] = array ( 'Name' => $ key ) ; } } $ res = $ this -> db -> delete_attributes ( $ this -> domainPhoto , $ photo [ 'id' ] , $ attrs ) ; return $ res !== false ; }
Delete a photos versions excluding base and original
 @param string $id ID of the photo to delete versions of
 @return boolean
Delete a photos versions excluding base and original @param string $id ID of the photo to delete versions of @return boolean