Index: branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php =================================================================== diff -u -r5970 -r6026 --- branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 5970) +++ branches/unlabeled/unlabeled-1.155.2/core/kernel/application.php (.../application.php) (revision 6026) @@ -512,13 +512,13 @@ } // this allows to save 2 sql queries for each category - $sql = 'SELECT NamedParentPath, CachedCategoryTemplate, CachedItemTemplate + $sql = 'SELECT NamedParentPath, CachedCategoryTemplate FROM '.$table.' WHERE '.$id_field.' = '.$this->Conn->qstr($id); $category_data = $this->Conn->GetRow($sql); $filename = $category_data['NamedParentPath']; $this->setCache('category_templates', $id, $category_data['CachedCategoryTemplate']); - $this->setCache('item_templates', $id, $category_data['CachedItemTemplate']); +// $this->setCache('item_templates', $id, $category_data['CachedItemTemplate']); } else { $resource_id = $this->Conn->GetOne('SELECT ResourceId FROM '.$table.' WHERE '.$id_field.' = '.$this->Conn->qstr($id)); @@ -1229,7 +1229,7 @@ unset($params['category_processed']); } - if (!$m_only || !$cat_processed) { + if (!$m_only || !$cat_processed || !defined('EXP_DIR_URLS')) { $ret = trim($ret, '/').'.html'; } else { @@ -1435,6 +1435,10 @@ 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'; + } $params['__URLENCODE__'] = 1; $location = $this->HREF($t, $prefix, $params, $index_file); //echo " location : $location
";