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

@ -358,8 +358,8 @@ class ComponentbuilderModelLibrary 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());
}
@ -1048,8 +1048,15 @@ class ComponentbuilderModelLibrary extends JModelAdmin
// Set the GUID if empty or not valid
if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "library", $data['id']))
if (empty($data['guid']) && $data['id'] > 0)
{
// get the existing one
$data['guid'] = (string) ComponentbuilderHelper::getVar('library', $data['id'], 'id', 'guid');
}
// Set the GUID if empty or not valid
while (!ComponentbuilderHelper::validGUID($data['guid'], "library", $data['id']))
{
// must always be set
$data['guid'] = (string) ComponentbuilderHelper::GUID();
}