Placeholders list common UI: different recursion check for better results

This one still puts simple customfields in, but just skips the linked apps cfs
This commit is contained in:
nathan 2021-10-13 08:39:23 -06:00
parent bcfcc51398
commit 047b86f38b

View File

@ -3079,15 +3079,10 @@ 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())) // Avoid recursing between custom fields of different apps
if(array_key_exists($field['type'], Api\Link::app_list()) && substr_count($prefix, '#') == 0)
{ {
$app = self::get_app_class($field['type']); $app = self::get_app_class($field['type']);
if($app) if($app)