private static function _create_default_folder_xml_data($xml, $folder) { $assets = sys_array_shift(get_object_vars($xml)); if (is_object($assets)) { $assets = array($assets); } if (!is_array($assets) or count($assets) == 0) { return; } @set_time_limit(60); $sgsml = new sgsml($folder, "new"); $sgsml->notification = false; foreach ($assets as $asset) { $data = get_object_vars($asset); if (isset($data["@attributes"])) { unset($data["@attributes"]); } $result = $sgsml->insert($data); if (DEBUG and !is_int($result)) { print_r($result); } if (DEBUG) { echo " @" . memory_get_usage(true); } sys::$cache = array(); sys::$db_queries = array(); } }