summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.module6
-rw-r--r--modules/forum/forum.module4
-rw-r--r--modules/menu/menu.module2
-rw-r--r--modules/node/node.module14
-rw-r--r--modules/poll/poll.module4
-rw-r--r--modules/search/search.module2
-rw-r--r--modules/system/system.module14
-rw-r--r--modules/taxonomy/taxonomy.module4
-rw-r--r--modules/upload/upload.module2
-rw-r--r--modules/user/user.module16
10 files changed, 34 insertions, 34 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 86af8f0b1..80802d8d9 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -939,7 +939,7 @@ function comment_delete($cid) {
// We'll only delete if the user has confirmed the
// deletion using the form in our else clause below.
- if (is_object($comment) && is_numeric($comment->cid) && $_POST['edit']['confirm']) {
+ if (is_object($comment) && is_numeric($comment->cid) && $_POST['confirm']) {
drupal_set_message(t('The comment and all its replies have been deleted.'));
// Delete comment and its replies.
@@ -1003,7 +1003,7 @@ function comment_operations($action = NULL) {
* Menu callback; present an administrative comment listing.
*/
function comment_admin_overview($type = 'new') {
- $edit = $_POST['edit'];
+ $edit = $_POST;
if ($edit['operation'] == 'delete') {
return comment_multiple_delete_confirm();
@@ -1117,7 +1117,7 @@ function theme_comment_admin_overview($form) {
* them.
*/
function comment_multiple_delete_confirm() {
- $edit = $_POST['edit'];
+ $edit = $_POST;
$form['comments'] = array('#prefix' => '<ul>', '#suffix' => '</ul>', '#tree' => TRUE);
// array_filter() returns only elements with actual values
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index ad2cc2c9d..fdc06eb17 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -445,7 +445,7 @@ function forum_delete(&$node) {
*/
function forum_form_container($edit = array()) {
// Handle a delete operation.
- if ($_POST['op'] == t('Delete') || $_POST['edit']['confirm']) {
+ if ($_POST['op'] == t('Delete') || $_POST['confirm']) {
return forum_confirm_delete($edit['tid']);
}
@@ -494,7 +494,7 @@ function forum_form_container($edit = array()) {
*/
function forum_form_forum($edit = array()) {
// Handle a delete operation.
- if ($_POST['op'] == t('Delete') || $_POST['edit']['confirm']) {
+ if ($_POST['op'] == t('Delete') || $_POST['confirm']) {
return forum_confirm_delete($edit['tid']);
}
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index e8c413585..936bdbd62 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -188,7 +188,7 @@ function menu_perm() {
*/
function menu_form_alter($form_id, &$form) {
if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
- $edit = isset($_POST['edit']) ? $_POST['edit'] : '';
+ $edit = isset($_POST) ? $_POST : '';
$edit['nid'] = $form['nid']['#value'];
$item = array();
diff --git a/modules/node/node.module b/modules/node/node.module
index ab1224348..8d5ad794c 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1427,7 +1427,7 @@ function node_admin_nodes_validate($form_id, $edit) {
function node_admin_content() {
$output = drupal_get_form('node_filter_form');
- if ($_POST['edit']['operation'] == 'delete' && $_POST['edit']['nodes']) {
+ if ($_POST['operation'] == 'delete' && $_POST['nodes']) {
return drupal_get_form('node_multiple_delete_confirm');
}
// Call the form first, to allow for the form_values array to be populated.
@@ -1504,7 +1504,7 @@ function theme_node_admin_nodes($form) {
}
function node_multiple_delete_confirm() {
- $edit = $_POST['edit'];
+ $edit = $_POST;
$form['nodes'] = array('#prefix' => '<ul>', '#suffix' => '</ul>', '#tree' => TRUE);
// array_filter returns only elements with TRUE values
@@ -1652,7 +1652,7 @@ function node_revision_list($node) {
}
function node_admin_search() {
- return drupal_get_form('search_form', url('admin/content/search'), $_POST['edit']['keys'], 'node') . search_data($_POST['edit']['keys'], 'node');
+ return drupal_get_form('search_form', url('admin/content/search'), $_POST['keys'], 'node') . search_data($_POST['keys'], 'node');
}
/**
@@ -1814,7 +1814,7 @@ function node_validate($node, $form = array()) {
form_set_error('body', t('The body of your @type is too short. You need at least %words words.', array('%words' => $type->min_word_count, '@type' => $type->name)));
}
- if (isset($node->nid) && (node_last_changed($node->nid) > $_POST['edit']['changed'])) {
+ if (isset($node->nid) && (node_last_changed($node->nid) > $_POST['changed'])) {
form_set_error('changed', t('This content has been modified by another user, changes cannot be saved.'));
}
@@ -1947,8 +1947,8 @@ function node_form($node) {
function node_form_add_preview($form) {
global $form_values;
- $op = isset($_POST['op']) ? $_POST['op'] : '';
- if ($op == t('Preview')) {
+ $op = isset($form_values['op']) ? $form_values['op'] : '';
+ if ($op == $form_values['preview']) {
drupal_validate_form($form['form_id']['#value'], $form);
if (!form_get_errors()) {
// We pass the global $form_values here to preserve changes made during form validation
@@ -2157,7 +2157,7 @@ function node_form_submit($form_id, $edit) {
* Menu callback -- ask for confirmation of node deletion
*/
function node_delete_confirm() {
- $edit = $_POST['edit'];
+ $edit = $_POST;
$edit['nid'] = $edit['nid'] ? $edit['nid'] : arg(1);
$node = node_load($edit['nid']);
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 186562887..ddf36ea02 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -468,7 +468,7 @@ function poll_vote(&$node) {
$nid = arg(1);
if ($node = node_load($nid)) {
- $edit = $_POST['edit'];
+ $edit = $_POST;
$choice = $edit['choice'];
$vote = $_POST['vote'];
@@ -513,7 +513,7 @@ function poll_cancel(&$node) {
$nid = arg(2);
if ($node = node_load(array('nid' => $nid))) {
- $edit = $_POST['edit'];
+ $edit = $_POST;
$choice = $edit['choice'];
$cancel = $_POST['cancel'];
diff --git a/modules/search/search.module b/modules/search/search.module
index 8a4573b77..7e19593b0 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -908,7 +908,7 @@ function search_view() {
// Search form submits with POST but redirects to GET. This way we can keep
// the search query URL clean as a whistle:
// search/type/keyword+keyword
- if (!isset($_POST['edit']['form_id'])) {
+ if (!isset($_POST['form_id'])) {
if ($type == '') {
// Note: search/node can not be a default tab because it would take on the
// path of its parent (search). It would prevent remembering keywords when
diff --git a/modules/system/system.module b/modules/system/system.module
index b9dfe9b13..614e57cc7 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1359,9 +1359,9 @@ function system_theme_settings($key = '') {
$filename = ($key) ? str_replace('/', '_', $key) . '_logo.' . $parts['extension'] : 'logo.' . $parts['extension'];
if ($file = file_save_upload('logo_upload', $filename, 1)) {
- $_POST['edit']['default_logo'] = 0;
- $_POST['edit']['logo_path'] = $file->filepath;
- $_POST['edit']['toggle_logo'] = 1;
+ $_POST['default_logo'] = 0;
+ $_POST['logo_path'] = $file->filepath;
+ $_POST['toggle_logo'] = 1;
}
}
else {
@@ -1375,9 +1375,9 @@ function system_theme_settings($key = '') {
$filename = ($key) ? str_replace('/', '_', $key) . '_favicon.' . $parts['extension'] : 'favicon.' . $parts['extension'];
if ($file = file_save_upload('favicon_upload', $filename, 1)) {
- $_POST['edit']['default_favicon'] = 0;
- $_POST['edit']['favicon_path'] = $file->filepath;
- $_POST['edit']['toggle_favicon'] = 1;
+ $_POST['default_favicon'] = 0;
+ $_POST['favicon_path'] = $file->filepath;
+ $_POST['toggle_favicon'] = 1;
}
}
@@ -1523,7 +1523,7 @@ function system_theme_settings($key = '') {
* offered to go back to the item that is being changed in case the user changes
* his/her mind.
*
- * You can check for the existence of $_POST['edit'][$name] (where $name
+ * You can check for the existence of $_POST[$name] (where $name
* is usually 'confirm') to check if the confirmation was successful or
* use the regular submit model.
*
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index cda680893..32d38435b 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -1277,7 +1277,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
* Page to edit a vocabulary
*/
function taxonomy_admin_vocabulary_edit($vid = NULL) {
- if ($_POST['op'] == t('Delete') || $_POST['edit']['confirm']) {
+ if ($_POST['op'] == t('Delete') || $_POST['confirm']) {
return drupal_get_form('taxonomy_vocabulary_confirm_delete', $vid);
}
if ($vocabulary = (array)taxonomy_get_vocabulary($vid)) {
@@ -1290,7 +1290,7 @@ function taxonomy_admin_vocabulary_edit($vid = NULL) {
* Page to edit a vocabulary term
*/
function taxonomy_admin_term_edit($tid) {
- if ($_POST['op'] == t('Delete') || $_POST['edit']['confirm']) {
+ if ($_POST['op'] == t('Delete') || $_POST['confirm']) {
return drupal_get_form('taxonomy_term_confirm_delete', $tid);
}
if ($term = (array)taxonomy_get_term($tid)) {
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 084c2ed40..9db67c4a3 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -877,7 +877,7 @@ function _upload_image($file) {
*/
function upload_js() {
// We only do the upload.module part of the node validation process.
- $node = (object)$_POST['edit'];
+ $node = (object)$_POST;
// Load existing node files.
$node->files = upload_load($node);
diff --git a/modules/user/user.module b/modules/user/user.module
index eb8825a79..54f279d60 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -1384,7 +1384,7 @@ function user_edit($category = 'account') {
drupal_set_message(t('The account does not exist or has already been deleted.'));
drupal_goto('admin/user/user');
}
- $edit = $_POST['op'] ? $_POST['edit'] : (array)$account;
+ $edit = $_POST['op'] ? $_POST : (array)$account;
if (arg(2) == 'delete') {
if ($edit['confirm']) {
@@ -1607,7 +1607,7 @@ function user_admin_access_check_submit($form_id, $edit) {
* Menu callback: add an access rule
*/
function user_admin_access_add($mask = NULL, $type = NULL) {
- if ($edit = $_POST['edit']) {
+ if ($edit = $_POST) {
if (!$edit['mask']) {
form_set_error('mask', t('You must enter a mask.'));
}
@@ -1653,7 +1653,7 @@ function user_admin_access_delete_confirm_submit($form_id, $edit) {
* Menu callback: edit an access rule
*/
function user_admin_access_edit($aid = 0) {
- if ($edit = $_POST['edit']) {
+ if ($edit = $_POST) {
if (!$edit['mask']) {
form_set_error('mask', t('You must enter a mask.'));
}
@@ -1870,7 +1870,7 @@ function user_admin_perm_submit($form_id, $edit) {
* Menu callback: administer roles.
*/
function user_admin_role() {
- $edit = isset($_POST['edit']) ? $_POST['edit'] : '';
+ $edit = isset($_POST) ? $_POST : '';
$op = isset($_POST['op']) ? $_POST['op'] : '';
$id = arg(4);
@@ -1933,7 +1933,7 @@ function theme_user_admin_new_role($form) {
}
function user_admin_account() {
- if ($_POST['edit']['accounts'] && $_POST['edit']['operation'] == 'delete') {
+ if ($_POST['accounts'] && $_POST['operation'] == 'delete') {
return user_multiple_delete_confirm();
}
@@ -2168,7 +2168,7 @@ function user_multiple_role_edit($accounts, $operation, $rid) {
}
function user_multiple_delete_confirm() {
- $edit = $_POST['edit'];
+ $edit = $_POST;
$form['accounts'] = array('#prefix' => '<ul>', '#suffix' => '</ul>', '#tree' => TRUE);
// array_filter returns only elements with TRUE values
@@ -2230,13 +2230,13 @@ function user_admin_settings() {
}
function user_admin($callback_arg = '') {
- $edit = isset($_POST['edit']) ? $_POST['edit'] : '';
+ $edit = isset($_POST) ? $_POST : '';
$op = isset($_POST['op']) ? $_POST['op'] : $callback_arg;
switch ($op) {
case 'search':
case t('Search'):
- $output = drupal_get_form('search_form', url('admin/user/search'), $_POST['edit']['keys'], 'user') . search_data($_POST['edit']['keys'], 'user');
+ $output = drupal_get_form('search_form', url('admin/user/search'), $_POST['keys'], 'user') . search_data($_POST['keys'], 'user');
break;
case t('Create new account'):
case 'create':