Index: branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php =================================================================== diff -u -r5908 -r5911 --- branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5908) +++ branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5911) @@ -522,10 +522,10 @@ $sql = 'SELECT Filename FROM '.TABLE_PREFIX.'CategoryItems WHERE ItemResourceId = '.$resource_id.' AND CategoryId = '.$category_id; $filename = $this->Conn->GetOne($sql); - if (!$filename) { + /*if (!$filename) { $sql = 'SELECT Filename FROM '.TABLE_PREFIX.'CategoryItems WHERE ItemResourceId = '.$resource_id.' AND PrimaryCat = 1'; $filename = $this->Conn->GetOne($sql); - } + }*/ /*$sql = 'SELECT Filename FROM '.$table.' @@ -1416,24 +1416,24 @@ function Redirect($t='', $params=null, $prefix='', $index_file=null) { - if ($t == '' || $t === true) $t = $this->GetVar('t'); - - // pass prefixes and special from previous url $js_redirect = getArrayValue($params, 'js_redirect'); - if( isset($params['js_redirect']) ) unset($params['js_redirect']); - - if (!isset($params['pass'])) $params['pass'] = 'all'; - if ($this->GetVar('ajax') == 'yes' && $t == $this->GetVar('t')) { - // redirects to the same template as current - $params['ajax'] = 'yes'; + if (preg_match("/external:(.*)/", $t, $rets)) { + $location = $rets[1]; } + else { + if ($t == '' || $t === true) $t = $this->GetVar('t'); - $params['__URLENCODE__'] = 1; - $location = $this->HREF($t, $prefix, $params, $index_file); + // pass prefixes and special from previous url + if( isset($params['js_redirect']) ) unset($params['js_redirect']); + if (!isset($params['pass'])) $params['pass'] = 'all'; + $params['__URLENCODE__'] = 1; + $location = $this->HREF($t, $prefix, $params, $index_file); + //echo " location : $location
"; + } + $a_location = $location; $location = "Location: $location"; - //echo " location : $location
"; if ($this->isDebugMode() && constOn('DBG_REDIRECT')) {