mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-29 10:09:10 +01:00
Placeholders - avoid infinite recursion if apps have custom fields of other apps
This commit is contained in:
parent
9e2bb05ded
commit
7dba4b9284
@ -3079,6 +3079,12 @@ abstract class Merge
|
|||||||
*/
|
*/
|
||||||
protected function add_customfield_placeholders(&$placeholders, $prefix = '')
|
protected function add_customfield_placeholders(&$placeholders, $prefix = '')
|
||||||
{
|
{
|
||||||
|
// Avoid recursing between custom fields of different apps
|
||||||
|
if(substr_count($prefix, '#') > 1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach(Customfields::get($this->get_app()) as $name => $field)
|
foreach(Customfields::get($this->get_app()) as $name => $field)
|
||||||
{
|
{
|
||||||
if(array_key_exists($field['type'], Api\Link::app_list()))
|
if(array_key_exists($field['type'], Api\Link::app_list()))
|
||||||
@ -3108,7 +3114,6 @@ abstract class Merge
|
|||||||
public function get_placeholder_list($prefix = '')
|
public function get_placeholder_list($prefix = '')
|
||||||
{
|
{
|
||||||
$placeholders = [
|
$placeholders = [
|
||||||
'placeholders' => []
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->add_customfield_placeholders($placeholders, $prefix);
|
$this->add_customfield_placeholders($placeholders, $prefix);
|
||||||
@ -3212,7 +3217,6 @@ abstract class Merge
|
|||||||
*/
|
*/
|
||||||
public function show_replacements()
|
public function show_replacements()
|
||||||
{
|
{
|
||||||
|
|
||||||
$template_name = 'api.show_replacements';
|
$template_name = 'api.show_replacements';
|
||||||
$content = $sel_options = $readonlys = $preserve = array();
|
$content = $sel_options = $readonlys = $preserve = array();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user