mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-28 08:14:56 +01:00
Add extra placeholder 'categories' for expanded categories with path
This commit is contained in:
parent
077122e03f
commit
0c97c3bd10
@ -144,6 +144,12 @@ class addressbook_merge extends bo_merge
|
|||||||
}
|
}
|
||||||
if (!($n&1)) echo '<tr>';
|
if (!($n&1)) echo '<tr>';
|
||||||
echo '<td>$$'.$name.'$$</td><td>'.$label.'</td>';
|
echo '<td>$$'.$name.'$$</td><td>'.$label.'</td>';
|
||||||
|
if($name == 'cat_id')
|
||||||
|
{
|
||||||
|
if ($n&1) echo "</tr>\n";
|
||||||
|
echo '<td>$$categories$$</td><td>'.lang('Category path').'</td>';
|
||||||
|
$n++;
|
||||||
|
}
|
||||||
if ($n&1) echo "</tr>\n";
|
if ($n&1) echo "</tr>\n";
|
||||||
$n++;
|
$n++;
|
||||||
}
|
}
|
||||||
|
@ -226,6 +226,16 @@ abstract class bo_merge
|
|||||||
}
|
}
|
||||||
$replacements['$$'.($prefix ? $prefix.'/':'').$name.'$$'] = $value;
|
$replacements['$$'.($prefix ? $prefix.'/':'').$name.'$$'] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add in extra cat field
|
||||||
|
$cats = array();
|
||||||
|
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);
|
||||||
|
|
||||||
return $replacements;
|
return $replacements;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,7 +435,7 @@ abstract class bo_merge
|
|||||||
{
|
{
|
||||||
$content = preg_replace('/\$\$[a-z0-9_\/]+\$\$/i','',$content);
|
$content = preg_replace('/\$\$[a-z0-9_\/]+\$\$/i','',$content);
|
||||||
}
|
}
|
||||||
if ($contentrepeat) $contentrep[$id] = $content;
|
if ($contentrepeat) $contentrep[is_array($id) ? implode(':',$id) : $id] = $content;
|
||||||
}
|
}
|
||||||
if ($Labelrepeat)
|
if ($Labelrepeat)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user