summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/node.module17
-rw-r--r--modules/node/node.module17
-rw-r--r--modules/system.module2
-rw-r--r--modules/system/system.module2
-rw-r--r--modules/user.module4
-rw-r--r--modules/user/user.module4
6 files changed, 24 insertions, 22 deletions
diff --git a/modules/node.module b/modules/node.module
index bb5700483..14d7ac80b 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1115,11 +1115,6 @@ function node_filter_form_submit() {
case t('Reset'):
$_SESSION['node_overview_filter'] = array();
break;
- case t('Update'):
- return;
- }
- if ($op != '') {
- return 'admin/node';
}
}
@@ -1137,7 +1132,6 @@ function node_admin_nodes_submit($form_id, $edit) {
}
}
drupal_set_message(t('The update has been performed.'));
- return 'admin/node';
}
}
@@ -1874,9 +1868,16 @@ function node_form_submit($form_id, $edit) {
drupal_set_message(t('Your %post was created.', array ('%post' => node_get_name($node))));
}
}
- if ($node->nid && node_access('view', $node)) {
- return 'node/'. $node->nid;
+ if ($node->nid) {
+ if (node_access('view', $node)) {
+ return 'node/'. $node->nid;
+ }
+ else {
+ return '';
+ }
}
+ // it is very unlikely we get here
+ return FALSE;
}
/**
diff --git a/modules/node/node.module b/modules/node/node.module
index bb5700483..14d7ac80b 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1115,11 +1115,6 @@ function node_filter_form_submit() {
case t('Reset'):
$_SESSION['node_overview_filter'] = array();
break;
- case t('Update'):
- return;
- }
- if ($op != '') {
- return 'admin/node';
}
}
@@ -1137,7 +1132,6 @@ function node_admin_nodes_submit($form_id, $edit) {
}
}
drupal_set_message(t('The update has been performed.'));
- return 'admin/node';
}
}
@@ -1874,9 +1868,16 @@ function node_form_submit($form_id, $edit) {
drupal_set_message(t('Your %post was created.', array ('%post' => node_get_name($node))));
}
}
- if ($node->nid && node_access('view', $node)) {
- return 'node/'. $node->nid;
+ if ($node->nid) {
+ if (node_access('view', $node)) {
+ return 'node/'. $node->nid;
+ }
+ else {
+ return '';
+ }
}
+ // it is very unlikely we get here
+ return FALSE;
}
/**
diff --git a/modules/system.module b/modules/system.module
index 56e54885d..494c9fa5f 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -55,7 +55,7 @@ function system_perm() {
*/
function system_elements() {
// Top level form
- $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => '');
+ $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => $_GET['q']);
// Inputs
$type['checkbox'] = array('#input' => TRUE, '#return_value' => 1);
diff --git a/modules/system/system.module b/modules/system/system.module
index 56e54885d..494c9fa5f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -55,7 +55,7 @@ function system_perm() {
*/
function system_elements() {
// Top level form
- $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => '');
+ $type['form'] = array('#method' => 'post', '#action' => request_uri(), '#redirect' => $_GET['q']);
// Inputs
$type['checkbox'] = array('#input' => TRUE, '#return_value' => 1);
diff --git a/modules/user.module b/modules/user.module
index d2c3d94de..1601ba02a 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -1034,7 +1034,7 @@ function user_pass_submit($form_id, $form_values) {
$mail_success = user_mail($account->mail, $subject, $body, $headers);
if ($mail_success) {
- watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
+ watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
}
else {
@@ -1220,7 +1220,7 @@ function user_register_submit($form_id, $form_values) {
$body = _user_mail_text('welcome_body', $variables);
user_mail($mail, $subject, $body, "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from");
drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.'));
-
+ return '';
}
else {
// Create new user account, administrator approval required.
diff --git a/modules/user/user.module b/modules/user/user.module
index d2c3d94de..1601ba02a 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1034,7 +1034,7 @@ function user_pass_submit($form_id, $form_values) {
$mail_success = user_mail($account->mail, $subject, $body, $headers);
if ($mail_success) {
- watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
+ watchdog('user', t('Password reset instructions mailed to %name at %email.', array('%name' => '<em>'. $account->name .'</em>', '%email' => '<em>'. $account->mail .'</em>')));
drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
}
else {
@@ -1220,7 +1220,7 @@ function user_register_submit($form_id, $form_values) {
$body = _user_mail_text('welcome_body', $variables);
user_mail($mail, $subject, $body, "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from");
drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.'));
-
+ return '';
}
else {
// Create new user account, administrator approval required.