function htaccess_delete in Htaccess 7.2
1 call to htaccess_delete()
- htaccess_confirm_form_submit in ./
htaccess.admin.inc - Submit handler for confirm form
File
- ./
htaccess.admin.inc, line 398 - Administration pages.
Code
function htaccess_delete($id) {
// Check that the profile is not in use
$htaccess_check = db_select('htaccess', 'h')
->fields('h')
->condition('deployed', 1, '=')
->condition('id', array(
':id' => $id,
), 'IN')
->execute()
->fetchAssoc();
if ($htaccess_check) {
drupal_set_message(t('This htaccess\'s profile is currently in use'), 'error');
}
else {
$htaccess_get = db_delete('htaccess')
->condition('id', array(
':id' => $id,
))
->execute();
drupal_set_message(t('Htacces profile has been removed.'));
}
drupal_goto("admin/config/system/htaccess/deployment");
}