Commit 31b24d6c authored by jcnventura's avatar jcnventura

Update check for non-validation when pressing the mail cancel button

parent 4928335f
...@@ -43,7 +43,7 @@ function print_mail_form($form_state) { ...@@ -43,7 +43,7 @@ function print_mail_form($form_state) {
$cid = isset($_GET['comment']) ? (int)$_GET['comment'] : NULL; $cid = isset($_GET['comment']) ? (int)$_GET['comment'] : NULL;
$title = _print_get_title($path); $title = _print_get_title($path);
if (count($form_state['post']) == 0) { if (count($form_state['input']) == 0) {
$nodepath = drupal_get_normal_path($path); $nodepath = drupal_get_normal_path($path);
db_merge('print_mail_page_counter') db_merge('print_mail_page_counter')
->key(array('path' => $nodepath)) ->key(array('path' => $nodepath))
...@@ -169,7 +169,7 @@ function theme_print_mail_form($form) { ...@@ -169,7 +169,7 @@ function theme_print_mail_form($form) {
* @ingroup forms * @ingroup forms
*/ */
function print_mail_form_validate($form, &$form_state) { function print_mail_form_validate($form, &$form_state) {
if (array_key_exists('cancel', $form['#post'])) { if (array_key_exists('cancel', $form_state['input'])) {
return; return;
} }
$from_addr = trim($form_state['values']['fld_from_addr']); $from_addr = trim($form_state['values']['fld_from_addr']);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment