Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r501 -r525 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 501) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 525) @@ -480,8 +480,6 @@ function ParseTemplateText($text) { - - $GLOBALS[$this->TagPrefix.'_ID'] = $this->UniqueId(); $html = $text; $search = "TagPrefix; $next_tag = strpos($html,"UniqueId().' in Main parseTempalate
'; + //$GLOBALS[$this->TagPrefix.'_ID'] = $this->UniqueId(); LogEntry("Parsing $tname\n"); $LogLevel++; $html = ""; Index: trunk/globals.php =================================================================== diff -u -r523 -r525 --- trunk/globals.php (.../globals.php) (revision 523) +++ trunk/globals.php (.../globals.php) (revision 525) @@ -498,7 +498,10 @@ } else $ret = adodb_date("g:i a",$datestamp); - break; + break; + default: + $ret = adodb_date($part, $datestamp); + break; } return $ret; } Index: trunk/kernel/include/portaluser.php =================================================================== diff -u -r502 -r525 --- trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 502) +++ trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 525) @@ -231,7 +231,7 @@ function GetPersistantVariable($variableName) { - global $objConfig; + global $objConfig, $objSession; if(!$this->VarsLoaded) $this->LoadPersistantVars(); @@ -243,8 +243,17 @@ $val = $this->Vars[$variableName]; } else - $val = $objConfig->Get($variableName); - + { + if( $this->UniqueId() == $objSession->Get('PortalUserId') ) + { + $val = $objConfig->Get($variableName); + } + else + { + $val = ''; + } + } + return $val; } Index: trunk/kernel/parser.php =================================================================== diff -u -r446 -r525 --- trunk/kernel/parser.php (.../parser.php) (revision 446) +++ trunk/kernel/parser.php (.../parser.php) (revision 525) @@ -1552,37 +1552,45 @@ $o .= ""; $o .= "\n\n"; } - else - { - $CatCount = $objCatList->NumItems(); - foreach($objCatList->Items as $cat) - { - if($cat->Get("ParentId")==$CategoryId) - { - if($row==0 && strlen($attribs["_firstitemtemplate"])) - { - $o.= $cat->ParseTemplate($attribs["_firstitemtemplate"]); - $parsed=1; - } - if($row==$CatCount-1 && !$parsed && strlen($attribs["_lastitemtemplate"])>0) - { - $o .= $cat->ParseTemplate($attribs["_lastitemtemplate"]); - $parsed=1; - } - if(!$parsed) - $o .= $cat->ParseTemplate($attribs["_itemtemplate"]); - - $row++; - $i++; - $count++; - if($count>=$cat_count && $cat_count>0) - break; - } - } - } - unset($var_list_update["t"]); - SaveTagCache("kernel","m_list_cats",$attribs,m_BuildEnv(),$o); - return $o; + else + { + $CatCount = $objCatList->NumItems(); + foreach($objCatList->Items as $cat) + { + if($cat->Get("ParentId")==$CategoryId) + { + + if($row==0 && strlen($attribs["_firstitemtemplate"])) + { + //echo 'Saving ID in m_sub_cats[ first ] '.$cat->UniqueId().'
'; + //$GLOBALS['cat_ID'] = $cat->UniqueId(); + $o.= $cat->ParseTemplate($attribs["_firstitemtemplate"]); + $parsed=1; + } + if($row==$CatCount-1 && !$parsed && strlen($attribs["_lastitemtemplate"])>0) + { + //echo 'Saving ID in m_sub_cats[ last ] '.$cat->UniqueId().'
'; + //$GLOBALS['cat_ID'] = $cat->UniqueId(); + $o .= $cat->ParseTemplate($attribs["_lastitemtemplate"]); + $parsed=1; + } + if(!$parsed) + { + //echo 'Saving ID in m_sub_cats[ each ] '.$cat->UniqueId().'
'; + //$GLOBALS['cat_ID'] = $cat->UniqueId(); + $o .= $cat->ParseTemplate($attribs["_itemtemplate"]); + } + $row++; + $i++; + $count++; + if($count>=$cat_count && $cat_count>0) + break; + } + } + } + unset($var_list_update["t"]); + SaveTagCache("kernel","m_list_cats",$attribs,m_BuildEnv(),$o); + return $o; } function LoadCatSearchResults($attribs) Index: trunk/kernel/include/category.php =================================================================== diff -u -r495 -r525 --- trunk/kernel/include/category.php (.../category.php) (revision 495) +++ trunk/kernel/include/category.php (.../category.php) (revision 525) @@ -1026,6 +1026,7 @@ case 'modified': $ret = ''; $date = $this->Get('Modified'); + if(!$date) $date = $this->Get('CreatedOn'); if( $element->GetAttributeByName('_tz') ) { $date = GetLocalTime($date,$objSession->Get("tz"));