Fixed gh-571 compiler path errors.
This commit is contained in:
@ -544,8 +544,8 @@ class ComponentbuilderModelFieldtype 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());
|
||||
}
|
||||
@ -1197,8 +1197,15 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "fieldtype", $data['id']))
|
||||
if (empty($data['guid']) && $data['id'] > 0)
|
||||
{
|
||||
// get the existing one
|
||||
$data['guid'] = (string) ComponentbuilderHelper::getVar('fieldtype', $data['id'], 'id', 'guid');
|
||||
}
|
||||
// Set the GUID if empty or not valid
|
||||
while (!ComponentbuilderHelper::validGUID($data['guid'], "fieldtype", $data['id']))
|
||||
{
|
||||
// must always be set
|
||||
$data['guid'] = (string) ComponentbuilderHelper::GUID();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user