Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r4735 -r4758 --- trunk/core/kernel/globals.php (.../globals.php) (revision 4735) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 4758) @@ -18,7 +18,8 @@ if (!is_array($paArray1) or !is_array($paArray2)) { return $paArray2; } foreach ($paArray2 AS $sKey2 => $sValue2) { - $paArray1[$sKey2] = array_merge_recursive2( getArrayValue($paArray1,$sKey2), $sValue2); + $paArray1[$sKey2] = isset($paArray1[$sKey2]) ? array_merge_recursive2($paArray1[$sKey2], $sValue2) : $sValue2; +// $paArray1[$sKey2] = array_merge_recursive2( getArrayValue($paArray1,$sKey2), $sValue2); } return $paArray1; } @@ -50,7 +51,7 @@ $application =& kApplication::Instance(); $is_debug = $application->isDebugMode(); } - + if ($is_debug) { if ($label) $application->Debugger->appendHTML(''.$label.''); $application->Debugger->dumpVars($data); @@ -183,26 +184,29 @@ { function k4_include_once($file) { - if ( constOn('DEBUG_MODE') && isset($debugger) && constOn('DBG_PROFILE_INCLUDES') ) + global $debugger; + if ( defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger) && constOn('DBG_PROFILE_INCLUDES') ) { if ( in_array($file, get_required_files()) ) return; global $debugger; - $debugger->IncludeLevel++; - $before_time = getmicrotime(); +/* $debugger->IncludeLevel++; $before_mem = memory_get_usage(); +*/ + $debugger->ProfileStart('inc_'.crc32($file), $file); include_once($file); - $used_time = getmicrotime() - $before_time; - $used_mem = memory_get_usage() - $before_mem; + $debugger->ProfileFinish('inc_'.crc32($file)); + $debugger->profilerAddTotal('includes', 'inc_'.crc32($file)); +/* $used_mem = memory_get_usage() - $before_mem; $debugger->IncludeLevel--; $debugger->IncludesData['file'][] = str_replace(FULL_PATH, '', $file); $debugger->IncludesData['mem'][] = $used_mem; $debugger->IncludesData['time'][] = $used_time; $debugger->IncludesData['level'][] = $debugger->IncludeLevel; +*/ - } else { @@ -252,8 +256,6 @@ $comb='4'; // the amount of combinations you made above (and did not comment out) - - for ($p=0;$p<$pass_length;) { mt_srand((double)microtime()*1000000); @@ -333,7 +335,7 @@ curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } - + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_REFERER, PROTOCOL.SERVER_NAME); @@ -465,7 +467,7 @@ $line = $enclosure.implode($enclosure.$delimiter.$enclosure, $data).$enclosure.$recordSeparator; fwrite($filePointer, $line); } - + /** * Allows to replace #section# within any string with current section * @@ -485,4 +487,23 @@ return $string; } + /** + * Return live table name based on temp table name + * + * @param string $temp_table + * @return string + */ + function GetLiveName($temp_table) + { + $application =& kApplication::Instance(); + if( preg_match('/'.TABLE_PREFIX.'ses_'.$application->GetSID().'_edit_(.*)/',$temp_table,$rets) ) + { + return $rets[1]; + } + else + { + return $temp_table; + } + } + ?> \ No newline at end of file