You are here

function export_node_decode_objects in Node export 6

Same name and namespace in other branches
  1. 5.2 export.pages.inc \export_node_decode_objects()

recursively convert arrays back to objects

1 call to export_node_decode_objects()
export_node_decode in ./export.pages.inc
eval and return decoded string

File

./export.pages.inc, line 308

Code

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