mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Allow custom fields in IF placeholders
This commit is contained in:
parent
a269120683
commit
f57ccb9a41
@ -1364,19 +1364,19 @@ abstract class bo_merge
|
||||
if (strpos($content,'$$IF') !== false)
|
||||
{ //Example use to use: $$IF n_prefix~Herr~Sehr geehrter~Sehr geehrte$$
|
||||
$this->replacements =& $replacements;
|
||||
$content = preg_replace_callback('/\$\$IF ([0-9a-z_\/-]+)~(.*)~(.*)~(.*)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
$content = preg_replace_callback('/\$\$IF ([#0-9a-z_\/-]+)~(.*)~(.*)~(.*)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
unset($this->replacements);
|
||||
}
|
||||
if (strpos($content,'$$NELF') !== false)
|
||||
{ //Example: $$NEPBR org_unit$$ sets a LF and value of org_unit, only if there is a value
|
||||
$this->replacements =& $replacements;
|
||||
$content = preg_replace_callback('/\$\$NELF ([0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
$content = preg_replace_callback('/\$\$NELF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
unset($this->replacements);
|
||||
}
|
||||
if (strpos($content,'$$NENVLF') !== false)
|
||||
{ //Example: $$NEPBRNV org_unit$$ sets only a LF if there is a value for org_units, but did not add any value
|
||||
$this->replacements =& $replacements;
|
||||
$content = preg_replace_callback('/\$\$NENVLF ([0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
$content = preg_replace_callback('/\$\$NENVLF ([#0-9a-z_\/-]+)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
unset($this->replacements);
|
||||
}
|
||||
if (strpos($content,'$$LETTERPREFIX$$') !== false)
|
||||
@ -1387,7 +1387,7 @@ abstract class bo_merge
|
||||
if (strpos($content,'$$LETTERPREFIXCUSTOM') !== false)
|
||||
{ //Example use to use for a custom Letter Prefix: $$LETTERPREFIX n_prefix title n_family$$
|
||||
$this->replacements =& $replacements;
|
||||
$content = preg_replace_callback('/\$\$LETTERPREFIXCUSTOM ([0-9a-z_-]+)(.*)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
$content = preg_replace_callback('/\$\$LETTERPREFIXCUSTOM ([#0-9a-z_-]+)(.*)\$\$/imU',Array($this,'replace_callback'),$content);
|
||||
unset($this->replacements);
|
||||
}
|
||||
return $content;
|
||||
|
Loading…
Reference in New Issue
Block a user