You are here

function drupal_clone in Drupal 6

Same name and namespace in other branches
  1. 4 includes/common.inc \drupal_clone()
  2. 5 includes/common.inc \drupal_clone()

Provide a substitute clone() function for PHP4.

5 calls to drupal_clone()
node_load in modules/node/node.module
Load a node object from the database.
node_preview in modules/node/node.pages.inc
Generate a node preview.
node_unpublish_by_keyword_action in modules/node/node.module
Implementation of a configurable Drupal action. Unpublish a node if it contains a certain string.
theme_node_preview in modules/node/node.pages.inc
Display a node preview for display during node creation and editing.
_system_theme_data in modules/system/system.module
Helper function to scan and collect theme .info data and their engines.

File

includes/common.inc, line 1805
Common functions that many Drupal modules will need to reference.

Code

function drupal_clone($object) {
  return version_compare(phpversion(), '5.0') < 0 ? $object : clone $object;
}