Fixed gh-571 compiler path errors.
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user