diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/blogapi.module | 4 | ||||
-rw-r--r-- | modules/blogapi/blogapi.module | 4 | ||||
-rw-r--r-- | modules/comment.module | 4 | ||||
-rw-r--r-- | modules/comment/comment.module | 4 | ||||
-rw-r--r-- | modules/forum.module | 4 | ||||
-rw-r--r-- | modules/forum/forum.module | 4 | ||||
-rw-r--r-- | modules/node.module | 12 | ||||
-rw-r--r-- | modules/node/node.module | 12 | ||||
-rw-r--r-- | modules/taxonomy.module | 4 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 | ||||
-rw-r--r-- | modules/upload.module | 2 | ||||
-rw-r--r-- | modules/upload/upload.module | 2 | ||||
-rw-r--r-- | modules/user.module | 4 | ||||
-rw-r--r-- | modules/user/user.module | 4 |
14 files changed, 34 insertions, 34 deletions
diff --git a/modules/blogapi.module b/modules/blogapi.module index 8b284b241..2e5fef9bc 100644 --- a/modules/blogapi.module +++ b/modules/blogapi.module @@ -629,7 +629,7 @@ __RSD__; function _blogapi_mt_extra(&$node, $struct) { if (is_array($node)) { $was_array = true; - $node = array2object($node); + $node = (object)$node; } // mt_allow_comments @@ -681,7 +681,7 @@ function _blogapi_mt_extra(&$node, $struct) { } if ($was_array) { - $node = object2array($node); + $node = (array)$node; } } diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 8b284b241..2e5fef9bc 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -629,7 +629,7 @@ __RSD__; function _blogapi_mt_extra(&$node, $struct) { if (is_array($node)) { $was_array = true; - $node = array2object($node); + $node = (object)$node; } // mt_allow_comments @@ -681,7 +681,7 @@ function _blogapi_mt_extra(&$node, $struct) { } if ($was_array) { - $node = object2array($node); + $node = (array)$node; } } diff --git a/modules/comment.module b/modules/comment.module index 6bd67757c..3820d27d8 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -444,7 +444,7 @@ function comment_edit($cid) { $comment = drupal_unpack($comment); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; if (comment_access('edit', $comment)) { - return comment_form(object2array($comment)); + return comment_form((array)$comment); } else { drupal_access_denied(); @@ -1349,7 +1349,7 @@ function comment_form_add_preview($form, $edit) { $output = ''; - $comment = array2object(comment_validate($edit)); + $comment = (object)comment_validate($edit); // Attach the user and time information. if ($edit['author']) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 6bd67757c..3820d27d8 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -444,7 +444,7 @@ function comment_edit($cid) { $comment = drupal_unpack($comment); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; if (comment_access('edit', $comment)) { - return comment_form(object2array($comment)); + return comment_form((array)$comment); } else { drupal_access_denied(); @@ -1349,7 +1349,7 @@ function comment_form_add_preview($form, $edit) { $output = ''; - $comment = array2object(comment_validate($edit)); + $comment = (object)comment_validate($edit); // Attach the user and time information. if ($edit['author']) { diff --git a/modules/forum.module b/modules/forum.module index a298e4234..8e22f6b3b 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -105,10 +105,10 @@ function forum_admin() { break; case 'edit': if (arg(3) == 'forum') { - $output = forum_form_forum(object2array(taxonomy_get_term(arg(4)))); + $output = forum_form_forum((array)taxonomy_get_term(arg(4))); } else if (arg(3) == 'container') { - $output = forum_form_container(object2array(taxonomy_get_term(arg(4)))); + $output = forum_form_container((array)taxonomy_get_term(arg(4))); } break; case t('Delete'): diff --git a/modules/forum/forum.module b/modules/forum/forum.module index a298e4234..8e22f6b3b 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -105,10 +105,10 @@ function forum_admin() { break; case 'edit': if (arg(3) == 'forum') { - $output = forum_form_forum(object2array(taxonomy_get_term(arg(4)))); + $output = forum_form_forum((array)taxonomy_get_term(arg(4))); } else if (arg(3) == 'container') { - $output = forum_form_container(object2array(taxonomy_get_term(arg(4)))); + $output = forum_form_container((array)taxonomy_get_term(arg(4))); } break; case t('Delete'): diff --git a/modules/node.module b/modules/node.module index 46789e403..6b033e372 100644 --- a/modules/node.module +++ b/modules/node.module @@ -513,7 +513,7 @@ function node_save(&$node) { * An HTML representation of the themed node. */ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) { - $node = array2object($node); + $node = (object)$node; // Remove the delimiter (if any) that separates the teaser from the body. // TODO: this strips legitimate uses of '<!--break-->' also. @@ -1493,7 +1493,7 @@ function node_submit($node) { global $user; // Convert the node to an object, if necessary. - $node = array2object($node); + $node = (object)$node; // Auto-generate the teaser, but only if it hasn't been set (e.g. by a // module-provided 'teaser' form item). @@ -1539,7 +1539,7 @@ function node_submit($node) { */ function node_validate($node) { // Convert the node to an object, if necessary. - $node = array2object($node); + $node = (object)$node; // Make sure the body has the minimum number of words. // todo use a better word counting algorithm that will work in other languages @@ -1609,7 +1609,7 @@ function node_object_prepare(&$node) { function node_form($node) { $op = isset($_POST['op']) ? $_POST['op'] : ''; - $node = array2object($node); + $node = (object)$node; node_object_prepare($node); // Set the id of the top-level form tag @@ -1693,7 +1693,7 @@ function node_form($node) { } function node_form_add_preview($form, $edit) { - $edit = array2object($edit); + $edit = (object)$edit; node_validate($edit); $form['node_preview'] = array('#value' => node_preview($edit), '#weight' => -100); return $form; @@ -2167,7 +2167,7 @@ function node_form_alter($form_id, &$form) { */ function node_access($op, $node = NULL, $uid = NULL) { // Convert the node to an object if necessary: - $node = array2object($node); + $node = (object)$node; // If the node is in a restricted format, disallow editing. if ($op == 'update' && !filter_access($node->format)) { diff --git a/modules/node/node.module b/modules/node/node.module index 46789e403..6b033e372 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -513,7 +513,7 @@ function node_save(&$node) { * An HTML representation of the themed node. */ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) { - $node = array2object($node); + $node = (object)$node; // Remove the delimiter (if any) that separates the teaser from the body. // TODO: this strips legitimate uses of '<!--break-->' also. @@ -1493,7 +1493,7 @@ function node_submit($node) { global $user; // Convert the node to an object, if necessary. - $node = array2object($node); + $node = (object)$node; // Auto-generate the teaser, but only if it hasn't been set (e.g. by a // module-provided 'teaser' form item). @@ -1539,7 +1539,7 @@ function node_submit($node) { */ function node_validate($node) { // Convert the node to an object, if necessary. - $node = array2object($node); + $node = (object)$node; // Make sure the body has the minimum number of words. // todo use a better word counting algorithm that will work in other languages @@ -1609,7 +1609,7 @@ function node_object_prepare(&$node) { function node_form($node) { $op = isset($_POST['op']) ? $_POST['op'] : ''; - $node = array2object($node); + $node = (object)$node; node_object_prepare($node); // Set the id of the top-level form tag @@ -1693,7 +1693,7 @@ function node_form($node) { } function node_form_add_preview($form, $edit) { - $edit = array2object($edit); + $edit = (object)$edit; node_validate($edit); $form['node_preview'] = array('#value' => node_preview($edit), '#weight' => -100); return $form; @@ -2167,7 +2167,7 @@ function node_form_alter($form_id, &$form) { */ function node_access($op, $node = NULL, $uid = NULL) { // Convert the node to an object if necessary: - $node = array2object($node); + $node = (object)$node; // If the node is in a restricted format, disallow editing. if ($op == 'update' && !filter_access($node->format)) { diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 5abbbe89d..e0a6cc642 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -1126,10 +1126,10 @@ function taxonomy_admin() { break; case 'edit': if (arg(3) == 'vocabulary') { - $output = taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4)))); + $output = taxonomy_form_vocabulary((array)taxonomy_get_vocabulary(arg(4))); } else if (arg(3) == 'term') { - $output = taxonomy_form_term(object2array(taxonomy_get_term(arg(4)))); + $output = taxonomy_form_term((array)taxonomy_get_term(arg(4))); } break; case t('Delete'): diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 5abbbe89d..e0a6cc642 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1126,10 +1126,10 @@ function taxonomy_admin() { break; case 'edit': if (arg(3) == 'vocabulary') { - $output = taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4)))); + $output = taxonomy_form_vocabulary((array)taxonomy_get_vocabulary(arg(4))); } else if (arg(3) == 'term') { - $output = taxonomy_form_term(object2array(taxonomy_get_term(arg(4)))); + $output = taxonomy_form_term((array)taxonomy_get_term(arg(4))); } break; case t('Delete'): diff --git a/modules/upload.module b/modules/upload.module index d5c7a49bd..957454f99 100644 --- a/modules/upload.module +++ b/modules/upload.module @@ -536,7 +536,7 @@ function _upload_image($file) { */ function upload_js() { // We only do the upload.module part of the node validation process. - $node = array2object($_POST['edit']); + $node = (object)$_POST['edit']; upload_nodeapi($node, 'validate', NULL); $form = _upload_form($node); $form = _form_builder('upload_js', $form); diff --git a/modules/upload/upload.module b/modules/upload/upload.module index d5c7a49bd..957454f99 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -536,7 +536,7 @@ function _upload_image($file) { */ function upload_js() { // We only do the upload.module part of the node validation process. - $node = array2object($_POST['edit']); + $node = (object)$_POST['edit']; upload_nodeapi($node, 'validate', NULL); $form = _upload_form($node); $form = _form_builder('upload_js', $form); diff --git a/modules/user.module b/modules/user.module index 7e0e24688..6d90de404 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1177,7 +1177,7 @@ function user_edit_form($uid, $edit) { // Picture/avatar: if (variable_get('user_pictures', 0)) { $form['picture'] = array('#type' => 'fieldset', '#title' => t('Picture'), '#weight' => 1); - if ($edit['picture'] && ($picture = theme('user_picture', array2object($edit)))) { + if ($edit['picture'] && ($picture = theme('user_picture', (object)$edit))) { $form['picture']['current_picture'] = array('#type' => 'markup', '#value' => $picture); $form['picture']['picture_delete'] = array('#type' => 'checkbox', '#title' => t('Delete picture'), '#description' => t('Check this box to delete your current picture.')); } @@ -1257,7 +1257,7 @@ function user_edit($category = 'account') { global $user; $account = user_load(array('uid' => arg(1))); - $edit = $_POST['op'] ? $_POST['edit'] : object2array($account); + $edit = $_POST['op'] ? $_POST['edit'] : (array)$account; if (arg(2) == 'delete') { if ($edit['confirm']) { diff --git a/modules/user/user.module b/modules/user/user.module index 7e0e24688..6d90de404 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1177,7 +1177,7 @@ function user_edit_form($uid, $edit) { // Picture/avatar: if (variable_get('user_pictures', 0)) { $form['picture'] = array('#type' => 'fieldset', '#title' => t('Picture'), '#weight' => 1); - if ($edit['picture'] && ($picture = theme('user_picture', array2object($edit)))) { + if ($edit['picture'] && ($picture = theme('user_picture', (object)$edit))) { $form['picture']['current_picture'] = array('#type' => 'markup', '#value' => $picture); $form['picture']['picture_delete'] = array('#type' => 'checkbox', '#title' => t('Delete picture'), '#description' => t('Check this box to delete your current picture.')); } @@ -1257,7 +1257,7 @@ function user_edit($category = 'account') { global $user; $account = user_load(array('uid' => arg(1))); - $edit = $_POST['op'] ? $_POST['edit'] : object2array($account); + $edit = $_POST['op'] ? $_POST['edit'] : (array)$account; if (arg(2) == 'delete') { if ($edit['confirm']) { |