Index: trunk/kernel/parser.php =================================================================== diff -u -N -r959 -r979 --- trunk/kernel/parser.php (.../parser.php) (revision 959) +++ trunk/kernel/parser.php (.../parser.php) (revision 979) @@ -1518,7 +1518,7 @@ $acl_where = "(FIND_IN_SET(0,acl))"; $objCatList->Clear(); $OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE); - $objCatList->LoadCategories("ParentId=$CategoryId AND Status=1",$OrderBy); + $objCatList->LoadCategories("ParentId=$CategoryId AND Status=1",$OrderBy, false); if ($objCatList->NumItems() == 0) { if($attribs["_dataexists"]) @@ -1727,7 +1727,57 @@ } return $o; } + /* + @description: Used in conjuction with l_list_cats. This function generates the page navigation + for the list. If this tag is called before the list tag, this function will load + the links. For that reason, the _ListType attribute is required if the pagnav + tag preceeds the l_list_links tag in the template. Generally, it is good practice to + duplicate all attributes set for l_list_links. + @attrib: _PagesToList:int: Number of pages to list (default is 10) + @attrib: _ShortList:bool: If set, uses the shortlist configuration value for links + @attrib: _label:lang: language tag to include in the output if there are pages to list. If there are no pages listed, this text will not be included (resulting in an empty output) + @attrib: _ListType::Determines the type of list to generate
+ Possible values: + +*/ +function l_cat_pagenav($attribs = array()) +{ + global $objCatList, $objSession; + + $DestTemplate = getArrayValue($attribs,'_template'); + $PagesToList = getArrayValue($attribs,'_pagestolist'); + $image = getArrayValue($attribs,'_PageIcon'); + if(!is_numeric($PagesToList)) + $PagesToList = 10; + + $CatId = getArrayValue($attribs,'_catid'); + if(!is_numeric($CatId)) + $CatId = $objCatList->CurrentCategoryID(); + + if($attribs["_shortlist"] == 1) + $objCatList->PerPageVar = "Perpage_Category_Short"; + + $ListType = getArrayValue($attribs,'_listtype'); + if(!strlen($ListType)) + $ListType="category"; +/* + if($objLinkList->ListType != $ListType) { + LoadLinkList($attribs); + } +*/ + $o = $objCatList->GetPageLinkList($DestTemplate); + if (strlen($image)) { + $o_i = ' '; + } + if(strlen($o) && strlen($attribs["_label"])) + $o = $o_i.language($attribs["_label"]).$o; + return $o; +} + +/* @description: Used in conjuction with m_search_list_cats. This function generates the page navigation for the list. If this tag is called before the list tag, this function will load the category list. Generally, it is good practice to duplicate all attributes set for @@ -1984,7 +2034,8 @@ $name = strtolower($Item->Get("ItemName")); $table = $Item->Get("SourceTable"); - $sql = "SELECT * FROM ".$objSearchConfig->SourceTable." WHERE TableName='$table' AND AdvancedSearch=1 ORDER BY DisplayOrder"; + //$sql = "SELECT * FROM ".$objSearchConfig->SourceTable." WHERE TableName='$table' AND AdvancedSearch=1 ORDER BY DisplayOrder"; + $sql = "SELECT sc.* FROM ".$objSearchConfig->SourceTable." AS sc LEFT JOIN ".GetTablePrefix()."CustomField AS cf ON sc.CustomFieldId = cf.CustomFieldId WHERE TableName='$table' OR (TableName='CustomField' AND cf.Type = $ItemType) AND AdvancedSearch=1 ORDER BY sc.DisplayOrder"; $objSearchConfig->Query_Item($sql); $row=0; if(is_array($objSearchConfig->Items))