summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-11-17 17:22:45 +0000
committerDries Buytaert <dries@buytaert.net>2006-11-17 17:22:45 +0000
commitad335b239539c47ac498ca65bf03629bb2c2795a (patch)
tree2b00af3f32ccaf060e7a576d5d3d880abdd9ed76 /modules/system/system.module
parentad1c9e69d8848b446941adededd0d86749e9e82f (diff)
downloadbrdo-ad335b239539c47ac498ca65bf03629bb2c2795a.tar.gz
brdo-ad335b239539c47ac498ca65bf03629bb2c2795a.tar.bz2
- Patch #84250 by yched and Moshe: providing a path with query string breaks the confirmation form.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 9bc448f1e..e296f8098 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -2075,7 +2075,7 @@ function system_theme_settings($key = '') {
* @param $question
* The question to ask the user (e.g. "Are you sure you want to delete the
* block <em>foo</em>?").
- * @param $path
+ * @param $destination
* The page to go to if the user denies the action.
* @param $description
* Additional text to display (defaults to "This action cannot be undone.").
@@ -2089,8 +2089,9 @@ function system_theme_settings($key = '') {
* @return
* The form.
*/
-function confirm_form($form, $question, $path, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm') {
+function confirm_form($form, $question, $destination, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm') {
$description = ($description) ? $description : t('This action cannot be undone.');
+ extract(parse_url($destination));
drupal_set_title($question);
$form['#attributes'] = array('class' => 'confirmation');
$form['description'] = array('#value' => $description);
@@ -2098,7 +2099,7 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
$form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>');
$form['actions']['submit'] = array('#type' => 'submit', '#value' => $yes ? $yes : t('Confirm'));
- $form['actions']['cancel'] = array('#value' => l($no ? $no : t('Cancel'), $path));
+ $form['actions']['cancel'] = array('#value' => l($no ? $no : t('Cancel'), $path, null, $query, $fragment));
$form['#base'] = 'confirm_form';
return $form;
}