Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.369
diff -u -r1.369 system.module
--- modules/system/system.module	8 Sep 2006 23:13:00 -0000	1.369
+++ modules/system/system.module	15 Sep 2006 00:25:07 -0000
@@ -1681,7 +1681,7 @@
  * @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.").
@@ -1695,8 +1695,9 @@
  * @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);
@@ -1704,7 +1705,7 @@
 
   $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;
 }
