Index: trunk/themes/default/incs/inportal_main.css
===================================================================
diff -u -N -r842 -r904
--- trunk/themes/default/incs/inportal_main.css (.../inportal_main.css) (revision 842)
+++ trunk/themes/default/incs/inportal_main.css (.../inportal_main.css) (revision 904)
@@ -636,6 +636,11 @@
.field-content-input, .field-content-input-top {
padding: 1px 0px 1px 5px;
}
+
+.field-content-no-border {
+ padding: 4px 0px 4px 5px;
+}
+
.field-content-top {
border-top: none;
}
Index: trunk/kernel/include/parseditem.php
===================================================================
diff -u -N -r881 -r904
--- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 881)
+++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 904)
@@ -2070,12 +2070,12 @@
{
global $objCountCache;
- $cc = $objCountCache->GetValue($this->CacheListType("_"),$this->ItemType,$this->CacheListExtraId("_"),(int)$attribs["_today"], 3600);
+ $cc = $objCountCache->GetValue($this->CacheListType("_"),$this->ItemType,$this->CacheListExtraId("_"),(int)getArrayValue($attribs,'_today'), 3600);
if(!is_numeric($cc))
{
$sql = $this->SqlGlobalCount($attribs);
$ret = QueryCount($sql);
- $objCountCache->SetValue($this->CacheListType("_"),$this->ItemType,$this->CacheListExtraId("_"),(int)$attribs["_today"],$ret);
+ $objCountCache->SetValue($this->CacheListType("_"),$this->ItemType,$this->CacheListExtraId("_"),(int)getArrayValue($attribs,'_today'),$ret);
}
else
$ret = $cc;
@@ -2158,7 +2158,7 @@
global $objCountCache, $objSession;
$ret = "";
- $ListType = $attribs["_listtype"];
+ $ListType = getArrayValue($attribs,'_listtype');
if(!strlen($ListType))
$ListType="_";
@@ -2169,43 +2169,43 @@
{
case "_":
$ret = $this->DoGlobalCount($attribs);
- break;
+ break;
case "category":
$ret = $this->CategoryCount($attribs);
- break;
+ break;
case "myitems":
$sql = $this->SqlMyItems($attribs);
- break;
+ break;
case "hot":
$sql = $this->SqlHotItems($attribs);
- break;
+ break;
case "pop":
$sql = $this->SqlPopItems($attribs);
- break;
+ break;
case "pick":
$sql = $this->SqlPickItems($attribs);
- break;
+ break;
case "favorites":
$sql = $this->SqlFavorites($attribs);
- break;
+ break;
case "search":
$sql = $this->SqlSearchItems($attribs);
- break;
+ break;
case "new":
$sql = $this->SqlNewItems($attribs);
- break;
+ break;
}
//echo "SQL: $sql
";
- if(strlen($sql))
+ if(isset($sql)&&$sql)
{
if(is_numeric($ListTypeId))
{
- $cc = $objCountCache->GetValue($ListTypeId,$this->ItemType,$ExtraId,(int)$attribs["_today"], 3600);
+ $cc = $objCountCache->GetValue($ListTypeId,$this->ItemType,$ExtraId,(int)getArrayValue($attribs,'_today'), 3600);
if(!is_numeric($cc) || $attribs['_nocache'] == 1)
{
$ret = QueryCount($sql);
- $objCountCache->SetValue($ListTypeId,$this->ItemType,$ExtraId,(int)$attribs["_today"],$ret);
+ $objCountCache->SetValue($ListTypeId,$this->ItemType,$ExtraId,(int)getArrayValue($attribs,'_today'),$ret);
}
else
$ret = $cc;
@@ -2432,8 +2432,8 @@
{
global $objSession, $objCatList;
- $catid = (int)$attribs["_catid"];
- $scope = (int)$attribs["_scope"];
+ $catid = (int)getArrayValue($attribs,'_catid');
+ $scope = (int)getArrayValue($attribs,'_scope');
//$JoinCats = (int)$attribs["_catinfo"] || $scope;
$TableName = $this->SourceTable;
@@ -2450,15 +2450,15 @@
$where = $TableName.".EditorsPick=1 AND ".$TableName.".Status=1 ";
$catid=NULL;
}
- if($attribs["_today"])
+ if(getArrayValue($attribs,'_today'))
{
$today = mktime(0,0,0,date("m"),date("d"),date("Y"));
$where .= " AND ($TableName.CreatedOn>=$today)";
}
$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;
@@ -2480,11 +2480,11 @@
else
$this->PerPageVar = $this->PerPageVarLong;
- $CachedCount = $objCountCache->GetValue($this->CacheListType("pick"),$this->ItemType,$this->CacheListExtraId("pick"),(int)$attribs["_today"],3600);
+ $CachedCount = $objCountCache->GetValue($this->CacheListType("pick"),$this->ItemType,$this->CacheListExtraId("pick"),(int)getArrayValue($attribs,'_today'),3600);
if(!is_numeric($CachedCount))
{
$this->QueryItemCount= QueryCount($sql);
- $objCountCache->SetValue($this->CacheListType("pick"),$this->ItemType,$this->CacheListExtraId("pick"),(int)$attribs["_today"],$this->QueryItemCount);
+ $objCountCache->SetValue($this->CacheListType("pick"),$this->ItemType,$this->CacheListExtraId("pick"),(int)getArrayValue($attribs,'_today'),$this->QueryItemCount);
}
else
$this->QueryItemCount=$CachedCount;
@@ -2498,15 +2498,15 @@
$TableName = $this->SourceTable;
$where = " ".$TableName.".Status>-1 AND ".$TableName.".CreatedById=".$objSession->Get("PortalUserId");
- if($attribs["_today"])
+ if(getArrayValue($attribs,'_today'))
{
$today = mktime(0,0,0,date("m"),date("d"),date("Y"));
$where .= " AND ($TableName.CreatedOn>=$today)";
}
$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,null,$where); // maybe null should be replaced by some CategoryId
$OrderBy = $this->QueryOrderByClause(TRUE,TRUE,TRUE);
$sql .= " ".$OrderBy;
Index: trunk/kernel/parser.php
===================================================================
diff -u -N -r898 -r904
--- trunk/kernel/parser.php (.../parser.php) (revision 898)
+++ trunk/kernel/parser.php (.../parser.php) (revision 904)
@@ -366,13 +366,13 @@
$form = $attribs["_form"];
$field = strtolower($attribs["_field"]);
// $field = $attribs["_field"];
-
- if(isset($_POST[$field]) && $attribs['_forgetvalue'] != 1)
+ $value='';
+ if(isset($_POST[$field]) && getArrayValue($attribs,'_forgetvalue') != 1)
{
$value = inp_htmlize($_POST[$field],1);
}
else {
- if ($attribs['_forgetvalue'] != 1) {
+ if (getArrayValue($attribs,'_forgetvalue') != 1 && getArrayValue($FormValues[$form],$field) ) {
$value = inp_htmlize($FormValues[$form][$field]);
}
}
@@ -386,7 +386,7 @@
$ret = "";
if($attribs["_required"])
$ret .= "";
- if($attribs["_custom"])
+ if(getArrayValue($attribs,'_custom'))
$ret .= "";
}
return $ret;
@@ -561,7 +561,7 @@
{
$ret .= "";
}
- if($attribs["_custom"])
+ if(getArrayValue($attribs,'_custom'))
{
$ret .= "";
}
@@ -583,10 +583,10 @@
$html_attribs = ExtraAttributes($attribs);
$field = $attribs["_field"];
$form = $attribs["_form"];
- $TypesAllowed = $attribs["_imagetypes"];
- $isthumb = (int)$attribs["_thumbnail"];
- $imgname = $attribs["_imagename"];
- $maxsize = $attribs["_maxsize"];
+ $TypesAllowed = getArrayValue($attribs,'_imagetypes');
+ $isthumb = (int)getArrayValue($attribs,'_thumbnail');
+ $imgname = getArrayValue($attribs,'_imagename');
+ $maxsize = getArrayValue($attribs,'_maxsize');
$ret = "";
$ret .= "";
@@ -653,7 +653,7 @@
//echo $f."
";
//echo $t."
";
// echo "
"; print_r($FormError); echo ""; - if(is_array($FormError[$f])) + if( getArrayValue($FormError,$f) && is_array($FormError[$f])) { foreach($FormError[$f] as $e) { @@ -771,7 +771,7 @@ { global $var_list, $var_list_update, $m_var_list_update, $objSession, $objConfig, $objCatList; - $target_template = $attribs["_template"]; + $target_template = getArrayValue($attribs,'_template'); if(strlen($target_template)) { $var_list_update["t"] = $target_template; @@ -792,12 +792,12 @@ else { $ret = GetIndexURL(2)."?env=" . BuildEnv()."&Action=m_login"; - if($attribs["_successtemplate"]) + if(getArrayValue($attribs,'_successtemplate')) { $ret .= "&dest=".$attribs["_successtemplate"]; } else - if(strlen($var_list["dest"])) + if(getArrayValue($var_list,'dest')) $ret .= "&dest=".$var_list["dest"]; } break; @@ -1181,7 +1181,7 @@ $CurrentTheme = $objThemes->GetItem($m_var_list["theme"]); $theme_url = "http://". ThisDomain().$objConfig->Get("Site_Path")."themes/".$CurrentTheme->Get("Name")."/"; - if($attribs["_page"]) + if(getArrayValue($attribs,'_page')) { if ($attribs["_page"] != 'current') { @@ -1218,7 +1218,7 @@ global $objConfig, $objCatList; $ret = $objConfig->Get("Site_Name"); - if($attribs["_fullpath"] || $attribs["_currentcategory"]) + if(getArrayValue($attribs,'_fullpath') || getArrayValue($attribs,'_currentcategory')) { $CurrentCat = $objCatList->CurrentCategoryID(); if((int)$CurrentCat>0) @@ -1336,7 +1336,7 @@ $sql = "SELECT * FROM ".GetTablePrefix()."Language WHERE Enabled=1"; $objLanguages->Clear(); $objLanguages->Query_Item($sql); - + $o=''; if($objLanguages->NumItems()>0) { foreach($objLanguages->Items as $l) @@ -1382,7 +1382,7 @@ if(!strlen($attribs["_field"])) return ""; - $lang = $attribs["_lang"]; + $lang = getArrayValue($attribs,'_lang'); if(!strlen($lang)) { $LangId = $objSession->Get("Language"); @@ -1474,11 +1474,11 @@ $cols = $attribs["_columns"]; if($cols<1) $cols =1; - $CategoryId = $attribs["_catid"]; + $CategoryId = getArrayValue($attribs,'_catid'); if(!is_numeric($CategoryId)) $CategoryId = $objCatList->CurrentCategoryID(); - $cat_count = (int)$attribs["_maxlistcount"]; + $cat_count = (int)getArrayValue($attribs,'_maxlistcount'); /* validation */ if(strlen($attribs["_itemtemplate"])==0) { @@ -2043,7 +2043,7 @@ { global $objCatList, $objSession; - $permission = $attribs["_perm"]; + $permission = getArrayValue($attribs,'_perm'); $o = ""; $tpath = GetModuleArray("template"); if(strlen($permission)) @@ -2090,10 +2090,10 @@ $o = " "; - $text = $attribs["_text"]; + $text = getArrayValue($attribs,'_text'); if(!strlen($text)) { - $text = $attribs["_plaintext"]; + $text = getArrayValue($attribs,'_plaintext'); if(!strlen($text)) { if(strlen($attribs["_image"])) @@ -2222,14 +2222,14 @@ { global $var_list, $var_list_update, $m_var_list_update, $objCatList; - $template = $attribs["_template"]; + $template = getArrayValue($attribs,'_template'); - $query = trim($attribs["_query"]); + $query = trim( getArrayValue($attribs,'_query') ); $query = !ereg("^&", $query)? "&$query" : $query; if(!strlen($template)) $template = $var_list["t"]; - $cat = $attribs["_category"]; + $cat = getArrayValue($attribs,'_category'); $var_list_update["t"] = $template; if(strlen($cat)) @@ -2247,7 +2247,7 @@ $link_type = getArrayValue($attribs,'_relative') ? 0 : 2; $ret = GetIndexURL($link_type)."?env=".BuildEnv().$query; - if(strlen($attribs["_anchor"])) + if(strlen(getArrayValue($attribs,'_anchor'))) $ret .= "#".$attribs["_anchor"]; unset($var_list_update["t"]); if(strlen($cat)) @@ -2272,7 +2272,7 @@ { global $var_list, $var_list_update, $m_var_list_update, $objCatList, $objSession; - $cat = $attribs["_category"]; + $cat = getArrayValue($attribs,'_category'); if(strlen($cat)) { if($cat=="NULL") @@ -2340,7 +2340,7 @@ $ret = GetIndexURL(2)."?env=".BuildEnv(); unset($var_list_update["t"]); - if(strlen($dest)) + if(isset($dest)&&$dest) $ret .= "&dest=$dest"; return $ret; } @@ -2559,7 +2559,7 @@ global $objCatList; $ret = ""; - $catid = (int)$attribs["_catid"]; + $catid = (int)getArrayValue($attribs,'_catid'); $field = $attribs["_field"]; if(!$catid) $catid = $objCatList->CurrentCategoryID(); @@ -2575,7 +2575,7 @@ $ret = $cat->ParseObject($element); } } - if($attribs["_striphtml"]) + if(getArrayValue($attribs,'_striphtml')) $ret = strip_tags($ret); return $ret; } @@ -2592,7 +2592,7 @@ $ado = &GetADODBConnection(); - if($attribs["_local"] && $objCatList->CurrentCategoryID() != 0) + if(getArrayValue($attribs,'_local') && $objCatList->CurrentCategoryID() != 0) { $c =& $objCatList->GetItem($objCatList->CurrentCategoryID()); $catlist = $c->GetSubCatIds(); @@ -2610,7 +2610,7 @@ $mod = $rs->fields["ModDate"]; if($mod) { - $part = strtolower($attribs["_part"]); + $part = strtolower(getArrayValue($attribs,'_part')); if(strlen($part)) { $ret = ExtractDatePart($part,$mod); @@ -2637,10 +2637,11 @@ $IncludeList = explode(",",trim($attribs["_modules"])); $tpath = GetModuleArray("template"); + $ret=''; for($inc=0;$inc