Commit 571013af authored by Dries's avatar Dries

- Patch #142619 by erdemkose: fixed E_ALL warnings.

parent 476b0319
......@@ -2345,7 +2345,7 @@ function node_delete_confirm($node) {
return confirm_form($form,
t('Are you sure you want to delete %title?', array('%title' => $node->title)),
$_GET['destination'] ? $_GET['destination'] : 'node/'. $node->nid,
isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,
t('This action cannot be undone.'),
t('Delete'), t('Cancel'));
}
......@@ -2479,8 +2479,9 @@ function node_page_view($node, $cid = NULL) {
*/
function node_page_edit($node) {
if (isset($_POST['op']) && ($_POST['op'] == t('Delete'))) {
$destination = '';
// Note: we redirect from node/nid/edit to node/nid/delete to make the tabs disappear.
if ($_REQUEST['destination']) {
if (isset($_REQUEST['destination'])) {
$destination = drupal_get_destination();
unset($_REQUEST['destination']);
}
......
......@@ -96,7 +96,7 @@ function path_admin_delete_confirm($pid) {
$form['pid'] = array('#type' => 'value', '#value' => $pid);
$output = confirm_form($form,
t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
$_GET['destination'] ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'),
isset($_GET['destination']) ? $_GET['destination'] : 'admin/build/path', t('This action cannot be undone.'),
t('Delete'), t('Cancel') );
}
return $output;
......
......@@ -1559,7 +1559,7 @@ function user_edit($category = 'account') {
$edit = $op ? $_POST : (array)$account;
if (arg(2) == 'delete') {
if ($edit['confirm']) {
if (!empty($edit['confirm'])) {
user_delete($edit, $account->uid);
drupal_goto('admin/user/user');
}
......@@ -1568,7 +1568,8 @@ function user_edit($category = 'account') {
}
}
else if ($op == t('Delete')) {
if ($_REQUEST['destination']) {
$destination = '';
if (isset($_REQUEST['destination'])) {
$destination = drupal_get_destination();
unset($_REQUEST['destination']);
}
......
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