diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-02-17 19:29:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-02-17 19:29:07 +0000 |
commit | 01a4c0d827dac4867cf500e47007f15c02910e3d (patch) | |
tree | af6ef42864b64bbf08b28c1e98d147f171817d34 /modules/node/node.module | |
parent | 210311903ebedd1c3d764cbd7983e41813d24319 (diff) | |
download | brdo-01a4c0d827dac4867cf500e47007f15c02910e3d.tar.gz brdo-01a4c0d827dac4867cf500e47007f15c02910e3d.tar.bz2 |
- Patch #222385 by pwolanin: removed drupal_clone() hack in favor of the real PHP5 clone().
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 77c2c875e..54160f8a3 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -707,7 +707,7 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) { if ($cachable) { // Is the node statically cached? if (isset($nodes[$param])) { - return is_object($nodes[$param]) ? drupal_clone($nodes[$param]) : $nodes[$param]; + return is_object($nodes[$param]) ? clone $nodes[$param] : $nodes[$param]; } } $cond = 'n.nid = %d'; @@ -764,7 +764,7 @@ function node_load($param = array(), $revision = NULL, $reset = NULL) { } } if ($cachable) { - $nodes[$node->nid] = is_object($node) ? drupal_clone($node) : $node; + $nodes[$node->nid] = is_object($node) ? clone $node : $node; } } @@ -2724,7 +2724,7 @@ function node_unpublish_by_keyword_action_submit($form, $form_state) { */ function node_unpublish_by_keyword_action($node, $context) { foreach ($context['keywords'] as $keyword) { - if (strstr(node_view(drupal_clone($node)), $keyword) || strstr($node->title, $keyword)) { + if (strstr(node_view(clone $node), $keyword) || strstr($node->title, $keyword)) { $node->status = 0; watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_get_types('name', $node), '%title' => $node->title)); break; |