summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-09-02 02:11:41 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-09-02 02:11:41 +0000
commit69247d7aad8052482d3feac7041ccca702226b03 (patch)
tree680fd99df1f0810d8bb7442563081c0c3fc54ddd /modules
parent436cd01b5f51d54e980503e993e950ddba7eca55 (diff)
downloadbrdo-69247d7aad8052482d3feac7041ccca702226b03.tar.gz
brdo-69247d7aad8052482d3feac7041ccca702226b03.tar.bz2
- #30128: Call by reference left-overs
Diffstat (limited to 'modules')
-rw-r--r--modules/blogapi.module6
-rw-r--r--modules/blogapi/blogapi.module6
-rw-r--r--modules/node.module9
-rw-r--r--modules/node/node.module9
-rw-r--r--modules/upload.module2
-rw-r--r--modules/upload/upload.module2
6 files changed, 14 insertions, 20 deletions
diff --git a/modules/blogapi.module b/modules/blogapi.module
index 3160539db..81844de87 100644
--- a/modules/blogapi.module
+++ b/modules/blogapi.module
@@ -218,10 +218,10 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte
return blogapi_error(t('You do not have permission to create the type of post you wanted to create.'));
}
- node_save(&$node);
+ node_save($node);
if ($node->nid) {
watchdog('content', t('%type: added %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
- return $nid;
+ return $node->nid;
}
return blogapi_error(t('Error storing post.'));
@@ -276,7 +276,7 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont
foreach ($terms as $term) {
$node->taxonomy[] = $term->tid;
}
- node_save(&$node);
+ node_save($node);
if ($node->nid) {
watchdog('content', t('%type: updated %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
return true;
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 3160539db..81844de87 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -218,10 +218,10 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte
return blogapi_error(t('You do not have permission to create the type of post you wanted to create.'));
}
- node_save(&$node);
+ node_save($node);
if ($node->nid) {
watchdog('content', t('%type: added %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
- return $nid;
+ return $node->nid;
}
return blogapi_error(t('Error storing post.'));
@@ -276,7 +276,7 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont
foreach ($terms as $term) {
$node->taxonomy[] = $term->tid;
}
- node_save(&$node);
+ node_save($node);
if ($node->nid) {
watchdog('content', t('%type: updated %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
return true;
diff --git a/modules/node.module b/modules/node.module
index e35dc5d56..331267551 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -400,7 +400,7 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) {
/**
* Save a node object into the database.
*/
-function node_save($node) {
+function node_save(&$node) {
global $user;
$node->is_new = false;
@@ -501,9 +501,6 @@ function node_save($node) {
// Clear the cache so an anonymous poster can see the node being added or updated.
cache_clear_all();
-
- // Return the node ID:
- return $node;
}
/**
@@ -1573,7 +1570,7 @@ function node_submit(&$node) {
// Check whether the current user has the proper access rights to
// perform this operation:
if (node_access('update', $node)) {
- node_save(&$node);
+ node_save($node);
watchdog('content', t('%type: updated %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid));
$msg = t('The %post was updated.', array ('%post' => node_get_name($node)));
}
@@ -1582,7 +1579,7 @@ function node_submit(&$node) {
// Check whether the current user has the proper access rights to
// perform this operation:
if (node_access('create', $node)) {
- node_save(&$node);
+ node_save($node);
watchdog('content', t('%type: added %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
$msg = t('Your %post was created.', array ('%post' => node_get_name($node)));
}
diff --git a/modules/node/node.module b/modules/node/node.module
index e35dc5d56..331267551 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -400,7 +400,7 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) {
/**
* Save a node object into the database.
*/
-function node_save($node) {
+function node_save(&$node) {
global $user;
$node->is_new = false;
@@ -501,9 +501,6 @@ function node_save($node) {
// Clear the cache so an anonymous poster can see the node being added or updated.
cache_clear_all();
-
- // Return the node ID:
- return $node;
}
/**
@@ -1573,7 +1570,7 @@ function node_submit(&$node) {
// Check whether the current user has the proper access rights to
// perform this operation:
if (node_access('update', $node)) {
- node_save(&$node);
+ node_save($node);
watchdog('content', t('%type: updated %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid));
$msg = t('The %post was updated.', array ('%post' => node_get_name($node)));
}
@@ -1582,7 +1579,7 @@ function node_submit(&$node) {
// Check whether the current user has the proper access rights to
// perform this operation:
if (node_access('create', $node)) {
- node_save(&$node);
+ node_save($node);
watchdog('content', t('%type: added %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
$msg = t('Your %post was created.', array ('%post' => node_get_name($node)));
}
diff --git a/modules/upload.module b/modules/upload.module
index 335fd8dfc..d9f34d738 100644
--- a/modules/upload.module
+++ b/modules/upload.module
@@ -464,7 +464,7 @@ function _upload_image($file) {
function upload_js() {
// We only do the upload.module part of the node validation process.
$node = array2object($_POST['edit']);
- upload_nodeapi(&$node, 'validate', NULL);
+ upload_nodeapi($node, 'validate', NULL);
$output = theme('status_messages') . _upload_form($node);
// We send the updated file attachments form.
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 335fd8dfc..d9f34d738 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -464,7 +464,7 @@ function _upload_image($file) {
function upload_js() {
// We only do the upload.module part of the node validation process.
$node = array2object($_POST['edit']);
- upload_nodeapi(&$node, 'validate', NULL);
+ upload_nodeapi($node, 'validate', NULL);
$output = theme('status_messages') . _upload_form($node);
// We send the updated file attachments form.