# R33823 - /trunk/etemplate/inc/class.bo\_merge.inc.php

**URL:** <https://help.egroupware.org/t/r33823-trunk-etemplate-inc-class-bo-merge-inc-php/45657>\
**Category:** eGW-svn\
**Created:** [February 16, 2011, 5:56pm UTC](https://help.egroupware.org/t/r33823-trunk-etemplate-inc-class-bo-merge-inc-php/45657 "2011-02-16T17:56:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathangray](https://help.egroupware.org/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nathangray](https://help.egroupware.org/u/nathangray)\
**Post date:** [February 16, 2011, 5:56pm UTC](https://help.egroupware.org/t/r33823-trunk-etemplate-inc-class-bo-merge-inc-php/45657/1 "2011-02-16T17:56:00Z")

</div>

Author: nathangray  
New Revision: 33823

URL: [http://www.egroupware.org/viewvc/egroupware?rev=33823&view=rev](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](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](http://p.sf.net/sfu/intel-dev2devfeb)

* * *

eGroupWare-cvs mailing list  
[eGroupWare-cvs@lists.sourceforge.net](mailto:eGroupWare-cvs@lists.sourceforge.net)  
[https://lists.sourceforge.net/lists/listinfo/egroupware-cvs](https://lists.sourceforge.net/lists/listinfo/egroupware-cvs)
