# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Remotely Modified (Based On HEAD)
+++ Locally Modified (Based On LOCAL)
@@ -140,6 +140,14 @@
     '#value' => t('Cancel'),
   );
 
+  $form['btn_cancel'] = array(
+    '#type' => 'button',
+    '#name' => 'cancel',
+    '#value' => t('Cancel'),
+    '#executes_submit_callback' => TRUE,
+    '#submit' => array('print_mail_form_cancel'),
+  );
+
   if ($user->uid != 0) {
     $user_name = check_plain(strip_tags(theme('username', $user)));
     $form['fld_from_addr']['#default_value'] = $user->mail;
@@ -248,7 +256,6 @@
  * @ingroup forms
  */
 function print_mail_form_submit($form, &$form_state) {
-  if (!array_key_exists('cancel', $form_state['values'])) {
     if (!empty($form_state['values']['fld_from_name'])) {
       $from = '"'. $form_state['values']['fld_from_name'] .'" <'. $form_state['values']['fld_from_addr'] .'>';
     }
@@ -320,7 +327,6 @@
         db_query("UPDATE {print_mail_page_counter} SET sentcount = sentcount + %d, sent_timestamp = %d WHERE path = '%s'", count($addresses), time(), $nodepath);
       }
     }
-  }
 
   $form_state['redirect'] = preg_replace('!^book/export/html/!', 'node/', $form_state['values']['path']);
 }
