R33823 - /trunk/etemplate/inc/class.bo_merge.inc.php

Author: nathangray
New Revision: 33823

URL: http://www.egroupware.org/viewvc/egroupware?rev=33823&view=rev
Log:
Correct category formatting

Modified:
trunk/etemplate/inc/class.bo_merge.inc.php

Modified: trunk/etemplate/inc/class.bo_merge.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/etemplate/inc/class.bo_merge.inc.php?rev=33823&r1=33822&r2=33823&view=diff

— trunk/etemplate/inc/class.bo_merge.inc.php (original)
+++ trunk/etemplate/inc/class.bo_merge.inc.php Wed Feb 16 18:56:00 2011
@@ -232,10 +232,16 @@
foreach(is_array($contact[‘cat_id’]) ? $contact[‘cat_id’] : explode(’,’,$contact[‘cat_id’]) as $cat_id)
{
if(!$cat_id) continue;

  •   	$cats[] = $GLOBALS['egw']->categories->id2name($cat_id,'path');
    
  •   }
    
  •   $replacements['$$'.($prefix ? $prefix.'/':'').'categories$$'] = implode("\n",$cats);
    
  •   	$cats[$GLOBALS['egw']->categories->id2name($cat_id,'main')] = array();
    
  •   	if($GLOBALS['egw']->categories->id2name($cat_id,'main') != $cat_id)
    
  •   	{
    
  •   		$cats[$GLOBALS['egw']->categories->id2name($cat_id,'main')][] = $GLOBALS['egw']->categories->id2name($cat_id,'name');
    
  •   	}
    
  •   }
    
  •   foreach($cats as $main => $cat) {
    
  •   	$replacements['$$'.($prefix ? $prefix.'/':'').'categories$$'] .= $GLOBALS['egw']->categories->id2name($main,'name')
    
  •   		. (count($cat) > 0 ? ': ' : '') . implode(', ', $cats[$main]) . "\n";
    
  •   }
      return $replacements;
    
    }

The ultimate all-in-one performance toolkit: Intel® Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs