ad_library {

}

namespace eval ::photos {}

ad_proc -public ::photos::delete {
    -item_id:required
} { 
      This proc deletes a photo 
} {
    set photo_id "" 
    foreach photo_id $item_id {
    db_foreach delete_files_and_thumbs { select filepath_thumb,filepath from slideshowgallery where id = :photo_id } {
    file delete $filepath_thumb
    file delete $filepath
    }
    db_dml photo_delete {
    delete from slideshowgallery where id = :photo_id
  }
 }

}


