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