From 7093495f7c209d712ce951cb57781710f19f2653 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sun, 24 Jun 2007 10:09:53 +0000 Subject: #154046: Optimize confirm_form syntax for common usage (and fix some $form_state bugs). --- modules/path/path.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/path/path.module') 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; } -- cgit v1.2.3