You are here

function photos_edit_confirm_delete in Album Photos 7.3

Confirm delete photo.

1 string reference to 'photos_edit_confirm_delete'
photos_edit_delete in inc/photos.edit.inc
Delete photo.

File

inc/photos.edit.inc, line 1106
Handles uploading and editing images.

Code

function photos_edit_confirm_delete($form, &$form_state, $fid) {
  $type = isset($_GET['type']) ? check_plain($_GET['type']) : '';
  $form['fid'] = array(
    '#type' => 'value',
    '#value' => $fid,
  );
  $form['type'] = array(
    '#type' => 'value',
    '#value' => $type,
  );
  if ($type != 'sub_album') {
    $description = t('This photo will be deleted from this gallery and all sub galleries along with all comments, title and description.');
    $remove = t('Delete');
  }
  else {
    $description = t('This photo will be moved out of this sub gallery only.');
    $remove = t('Move out');
  }
  $path = array(
    'path' => 'photos/image/' . $fid,
  );
  return confirm_form($form, t('Confirm and delete this photo.'), $path, $description, $remove, t('Cancel'));
}