diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2007-06-24 10:09:53 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2007-06-24 10:09:53 +0000 |
commit | 7093495f7c209d712ce951cb57781710f19f2653 (patch) | |
tree | bb9360175b19f5820cafe1616cff79afede5dc64 /modules/path | |
parent | 028c8e60504546b1ad2342f168bbf5bf3d25f618 (diff) | |
download | brdo-7093495f7c209d712ce951cb57781710f19f2653.tar.gz brdo-7093495f7c209d712ce951cb57781710f19f2653.tar.bz2 |
#154046: Optimize confirm_form syntax for common usage (and fix some $form_state bugs).
Diffstat (limited to 'modules/path')
-rw-r--r-- | modules/path/path.module | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/path/path.module b/modules/path/path.module index 5a663e77b..d822f7ab7 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -90,13 +90,14 @@ function path_admin_edit($pid = 0) { /** * Menu callback; confirms deleting an URL alias **/ -function path_admin_delete_confirm($pid) { +function path_admin_delete_confirm(&$form_state, $pid) { $path = path_load($pid); if (user_access('administer url aliases')) { $form['pid'] = array('#type' => 'value', '#value' => $pid); + $options = array('cancel' => isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path'); $output = confirm_form($form, t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])), - isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path'); + 'admin/build/path', $options); } return $output; } |