Index: trunk/kernel/include/parseditem.php
===================================================================
diff -u -r983 -r988
--- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 983)
+++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 988)
@@ -217,7 +217,7 @@
if(strlen($url))
{
$ret .= "
";
- $ret .= $element->attributes["_separator"];
+ $ret .= $element->GetAttributeByName('_separator');
}
}
break;
@@ -1524,7 +1524,7 @@
{
if($this->MaxListCount)
{
- $limit = "LIMIT 0, $MaxListCount";
+ $limit = 'LIMIT 0, '.$this->MaxListCount;
}
}
return $limit;
@@ -2550,13 +2550,13 @@
{
global $objSession, $objCatList;
- $catid = (int)$attribs["_catid"];
- $scope = (int)$attribs["_scope"];
+ $catid = (int)getArrayValue($attribs,'_catid');
+ $scope = (int)getArrayValue($attribs,'_scope');
$show_since_last = (int)$attribs["_show_since_last"];
//$JoinCats = (int)$attribs["_catinfo"] || $scope;
//echo "Last: $scope
";
$TableName = $this->SourceTable;
- if($attribs["_today"])
+ if(getArrayValue($attribs,'_today'))
{
$cutoff = mktime(0,0,0,date("m"),date("d"),date("Y"));
}
@@ -2600,7 +2600,7 @@
$CategoryTable = GetTablePrefix()."Category";
$sql = "SELECT $TableName.*,$CategoryTable.CategoryId,$CategoryTable.CachedNavBar FROM $TableName ";
$p = $this->BasePermission.".VIEW";
- $sql .= $this->GetJoinedSQL($p,$CatUd,$where);
+ $sql .= $this->GetJoinedSQL($p,$catid,$where);
$OrderBy = $this->QueryOrderByClause(TRUE,TRUE,TRUE);
$sql .= " ".$OrderBy;
@@ -2616,18 +2616,18 @@
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."
\n";
- if($attribs["_shortlist"])
+ if( getArrayValue($attribs,'_shortlist') )
{
$this->PerPageVar = $this->PerPageShortVar;
}
else
$this->PerPageVar = $this->PerPageVarLong;
- $CachedCount = $objCountCache->GetValue($this->CacheListType("new"),$this->ItemType,$this->CacheListExtraId("new"),(int)$attribs["_today"],3600);
+ $CachedCount = $objCountCache->GetValue($this->CacheListType("new"),$this->ItemType,$this->CacheListExtraId("new"),(int)getArrayValue($attribs,'_today'),3600);
if(!is_numeric($CachedCount))
{
$this->QueryItemCount= QueryCount($sql);
- $objCountCache->SetValue($this->CacheListType("new"),$this->ItemType,$this->CacheListExtraId("new"),(int)$attribs["_today"],$this->QueryItemCount);
+ $objCountCache->SetValue($this->CacheListType("new"),$this->ItemType,$this->CacheListExtraId("new"),(int)getArrayValue($attribs,'_today'),$this->QueryItemCount);
}
else
$this->QueryItemCount=$CachedCount;