Skip to content

Commit

Permalink
[fix] - Creating article with filtered category
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon committed Sep 24, 2017
1 parent 5e39311 commit daf04fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions administrator/components/com_fields/helpers/fields.php
Expand Up @@ -291,6 +291,12 @@ public static function prepareForm($context, JForm $form, $data)

$component = $parts[0];
$section = $parts[1];

// Sanitize catids one item can be associated to only one category id
if (is_array($data->catid))
{
$data->catid = $data->catid[0];
}

$assignedCatids = isset($data->catid) ? $data->catid : (isset($data->fieldscatid) ? $data->fieldscatid : $form->getValue('catid'));

Expand Down

0 comments on commit daf04fb

Please sign in to comment.