Added GUID to selected views, and started updating JCB accordingly.
This commit is contained in:
@ -149,14 +149,14 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
{
|
||||
// set load data option
|
||||
$options['load_data'] = $loadData;
|
||||
// // check if xpath was set in options
|
||||
// check if xpath was set in options
|
||||
$xpath = false;
|
||||
if (isset($options['xpath']))
|
||||
{
|
||||
$xpath = $options['xpath'];
|
||||
unset($options['xpath']);
|
||||
}
|
||||
// // check if clear form was set in options
|
||||
// check if clear form was set in options
|
||||
$clear = false;
|
||||
if (isset($options['clear']))
|
||||
{
|
||||
@ -240,6 +240,13 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
$form->setValue($redirectedField, null, $redirectedValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Only load the GUID if new item
|
||||
if (0 == $id)
|
||||
{
|
||||
$form->setValue('guid', null, ComponentbuilderHelper::GUID());
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
@ -840,7 +847,14 @@ class ComponentbuilderModelSnippet extends JModelAdmin
|
||||
$data['contributor_name'] = $contributor['contributor_name'];
|
||||
$data['contributor_email'] = $contributor['contributor_email'];
|
||||
$data['contributor_website'] = $contributor['contributor_website'];
|
||||
}
|
||||
}
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid']))
|
||||
{
|
||||
$data['guid'] = (string) ComponentbuilderHelper::GUID();
|
||||
}
|
||||
|
||||
|
||||
// Set the snippet string to base64 string.
|
||||
if (isset($data['snippet']))
|
||||
|
Reference in New Issue
Block a user