You are here

function node_export_drupal_decode_objects in Node export 7.3

Recursively convert arrays back to objects.

This is only for backwards compatibility with the deprecated node_code format.

1 call to node_export_drupal_decode_objects()
node_export_drupal_import in formats/drupal.inc
Import callback.

File

formats/drupal.inc, line 35
The Node export Drupal format handler.

Code

function node_export_drupal_decode_objects($array) {
  foreach ($array as $k => $v) {
    if (is_array($v)) {
      $array[$k] = node_export_drupal_decode_objects($v);
    }
  }
  if (isset($array['#_export_node_encode_object'])) {
    unset($array['#_export_node_encode_object']);
    $array = (object) $array;
  }
  return $array;
}