Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r1346 -r1433 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1346) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1433) @@ -2162,14 +2162,16 @@ */ function GetListTypes() { - return Array( '_'=>0,'category'=>1,'myitems'=>2,'hot'=>3,'pop'=>4, - 'pick'=>5,'favorites'=>6,'new'=>8); + return Array('_' => 0, 'category' => 1, 'myitems' => 2, 'hot' => 3, 'pop' => 4, 'pick' => 5, 'favorites' => 6, 'new' => 8); } function CacheListType($ListType) { - if($ListType) $ListType='_'; - $mapping=$this->GetListTypes(); + if(empty($ListType)) + $ListType='_'; + + $mapping = $this->GetListTypes(); + return $mapping[$ListType]; } @@ -2178,6 +2180,7 @@ global $objCountCache, $objSession; $ret = ""; + $sql = ""; $ListType = getArrayValue($attribs,'_listtype'); if(!strlen($ListType)) $ListType="_"; @@ -2216,7 +2219,7 @@ break; } //echo "SQL: $sql
"; - if(isset($sql)&&$sql) + if(!empty($sql) && $ListType != "_") { if(is_numeric($ListTypeId) && $ListTypeId) {