Index: trunk/globals.php =================================================================== diff -u -r284 -r289 --- trunk/globals.php (.../globals.php) (revision 284) +++ trunk/globals.php (.../globals.php) (revision 289) @@ -16,8 +16,8 @@ $KeywordIgnore = array(); global $debuglevel; -$debuglevel=0; -$_GLOBALS["debuglevel"]=0; +$debuglevel = 0; +//$GLOBALS['debuglevel'] = 0; /*New, Hot, Pop field values */ define('NEVER', 0); @@ -655,7 +655,7 @@ if (($r == "dob_day") || ($r == "dob_month") || ($r == "dob_year")) $r = "dob"; - $tag = $_POST["errors"][$r]; + $tag = isset($_POST["errors"]) ? $_POST["errors"][$r] : ''; if(!strlen($tag)) $tag = "lu_ferror_".$f."_".$r; $FormError[$f][$r] = language($tag); @@ -1172,9 +1172,12 @@ if($prev_cat != $last_cat) $GLOBALS[$module_prefix.'_var_list'][$page_variable] = 1; } -function GetVar($name) +function GetVar($name, $post_priority = false) { - return isset($_REQUEST[$name]) ? $_REQUEST[$name] : false; + if(!$post_priority) // follow gpc_order in php.ini + return isset($_REQUEST[$name]) ? $_REQUEST[$name] : false; + else // get variable from post 1stly if not found then from get + return isset($_POST[$name]) && $_POST[$name] ? $_POST[$name] : isset($_GET[$name]) && $_GET[$name] ? $_GET[$name] : false; } function PassVar(&$source) @@ -1349,5 +1352,14 @@ $scripts = GetImportScripts(); return isset($scripts[$id]) ? $scripts[$id] : false; } +function GetNextTemplate($current_template) +{ + // used on front, returns next template to make + // redirect to + $dest = GetVar('dest', true); + if(!$dest) $dest = GetVar('DestTemplate', true); + return $dest ? $dest : $current_template; +} + ?>