Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS after the last commit. #3

Merged
merged 1 commit into from
Aug 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions administrator/components/com_fields/helpers/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static function prepareForm($context, JForm $form, $data)

$assignedCatids = isset($data->catid) ? $data->catid : (isset($data->fieldscatid) ? $data->fieldscatid : null);

if (! $assignedCatids && $form->getField('catid'))
if (!$assignedCatids && $form->getField('catid'))
{
// Choose the first category available
$xml = new DOMDocument;
Expand Down Expand Up @@ -319,7 +319,7 @@ public static function prepareForm($context, JForm $form, $data)
// Getting the fields
$fields = self::getFields($parts[0] . '.' . $parts[1], $data);

if (! $fields)
if (!$fields)
{
return true;
}
Expand Down Expand Up @@ -450,6 +450,7 @@ public static function prepareForm($context, JForm $form, $data)
}
}
}

// Loading the XML fields string into the form
$form->load($xml->saveXML());

Expand Down Expand Up @@ -489,13 +490,13 @@ public static function prepareForm($context, JForm $form, $data)
*
* @param stdClass $field The field
*
* @return boolean
* @return boolean
*
* @since __DEPLOY_VERSION__
*/
public static function canEditFieldValue($field)
{
$user = JFactory::getUser();

return $user->authorise('core.edit.value', $field->context . '.field.' . (int) $field->id);
return JFactory::getUser()->authorise('core.edit.value', $field->context . '.field.' . (int) $field->id);
}

/**
Expand Down