You are here

function sbp_paths_delete_confirm in Search by Page 7

Same name and namespace in other branches
  1. 6 sbp_paths.module \sbp_paths_delete_confirm()

Returns a form confirming deletion a path to be indexed.

See also

sbp_paths_delete_confirm_submit()

1 string reference to 'sbp_paths_delete_confirm'
sbp_paths_menu in ./sbp_paths.module
Implements hook_menu().

File

./sbp_paths.module, line 498
Module file for Search by Page Paths, a sub-module for Search by Page.

Code

function sbp_paths_delete_confirm($form, &$form_state, $environment, $pid) {
  $item = db_query('SELECT p.page_path FROM {sbpp_path} p WHERE p.pid = :pid', array(
    ':pid' => $pid,
  ))
    ->fetchObject();
  $environment = intval($environment);
  $form['pid'] = array(
    '#type' => 'value',
    '#value' => $pid,
  );
  $form['environment'] = array(
    '#type' => 'value',
    '#value' => $environment,
  );
  return confirm_form($form, t('Are you sure you want to stop indexing %path in this environment?', array(
    '%path' => $item->page_path,
  )), 'admin/config/search/search_by_page/edit/' . $environment . '/paths');
}