diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-10 10:00:50 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-10 10:00:50 +0000 |
commit | 571013af8cac7f8c47bb8028495be2e0393d5150 (patch) | |
tree | 2fcebb5e8e6ba9fd50cbd13cdcc059d5c680b296 | |
parent | 476b03195e920e26556f2b3c902bf6b17032fcdd (diff) | |
download | brdo-571013af8cac7f8c47bb8028495be2e0393d5150.tar.gz brdo-571013af8cac7f8c47bb8028495be2e0393d5150.tar.bz2 |
- Patch #142619 by erdemkose: fixed E_ALL warnings.
-rw-r--r-- | modules/node/node.module | 5 | ||||
-rw-r--r-- | modules/path/path.module | 2 | ||||
-rw-r--r-- | modules/user/user.module | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 97e0d6409..fcba35b7d 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -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']); } diff --git a/modules/path/path.module b/modules/path/path.module index 942e32d37..0312c941e 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -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; diff --git a/modules/user/user.module b/modules/user/user.module index 582ac0e5b..d4ddc76e7 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -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']); } |