mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 04:53:18 +01:00
Allow custom fields in IF placeholders
This commit is contained in:
parent
4b96ba9016
commit
06cbe1f0b0
@ -1328,19 +1328,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)
|
||||
@ -1351,7 +1351,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