Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r11538 -r11546 --- branches/RC/core/kernel/application.php (.../application.php) (revision 11538) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 11546) @@ -2635,6 +2635,36 @@ } /** + * Checks, that given prefix is in temp mode + * + * @param string $prefix + * @return bool + */ + function IsTempMode($prefix, $special = '') + { + $top_prefix = $this->Application->GetTopmostPrefix($prefix); + + $var_names = Array ( + $top_prefix, + rtrim($top_prefix . '_' . $special, '_'), // from post + rtrim($top_prefix . '.' . $special, '.'), // assembled locally + ); + + $var_names = array_unique($var_names); + + $temp_mode = false; + foreach ($var_names as $var_name) { + $value = $this->Application->GetVar($var_name . '_mode'); + if ($value && (substr($value, 0, 1) == 't')) { + $temp_mode = true; + break; + } + } + + return $temp_mode; + } + + /** * Return live table name based on temp table name * * @param string $temp_table