Index: branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php =================================================================== diff -u -r5731 -r5735 --- branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5731) +++ branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5735) @@ -1076,6 +1076,9 @@ unset($params['__NO_REWRITE__']); } + // append pass through variables to each link to be build + $params = array_merge_recursive2($this->getPassThroughVariables(), $params); + if ($this->RewriteURLs($ssl) && !$no_rewrite) { $session =& $this->recallObject('Session'); @@ -1092,6 +1095,35 @@ return $ret; } + /** + * Returns variables with values that should be passed throught with this link + variable list + * + * @return unknown + */ + function getPassThroughVariables() + { + static $cached_pass_through = null; + + // because pass through is not changed during script run, then we can cache it + if (is_null($cached_pass_through)) { + + $cached_pass_through = Array(); + $pass_through = $this->Application->GetVar('pass_through'); + + if ($pass_through) { + // names of variables to pass to each link + $cached_pass_through['pass_through'] = $pass_through; + $pass_through = explode(',', $pass_through); + foreach ($pass_through as $pass_through_var) { + $cached_pass_through[$pass_through_var] = $this->Application->GetVar($pass_through_var); + } + } + + } + + return $cached_pass_through; + } + /** * Returns sorted array of passed prefixes (to build url from)