Fixed gh-571 compiler path errors.

This commit is contained in:
2020-06-25 21:22:30 +02:00
parent 90f48bd5fa
commit e86ab88f5c
77 changed files with 369 additions and 125 deletions

View File

@ -520,8 +520,8 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
}
// Only load the GUID if new item
if (0 == $id)
// Only load the GUID if new item (or empty)
if (0 == $id || !($val = $form->getValue('guid')))
{
$form->setValue('guid', null, ComponentbuilderHelper::GUID());
}
@ -1148,8 +1148,15 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
// Set the GUID if empty or not valid
if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "dynamic_get", $data['id']))
if (empty($data['guid']) && $data['id'] > 0)
{
// get the existing one
$data['guid'] = (string) ComponentbuilderHelper::getVar('dynamic_get', $data['id'], 'id', 'guid');
}
// Set the GUID if empty or not valid
while (!ComponentbuilderHelper::validGUID($data['guid'], "dynamic_get", $data['id']))
{
// must always be set
$data['guid'] = (string) ComponentbuilderHelper::GUID();
}