Skip to content

Commit

Permalink
extrafield tab
Browse files Browse the repository at this point in the history
fix extra field tab with joomla 3.7x-4
  • Loading branch information
Dang Quoc Dat committed Jan 5, 2018
1 parent 4753deb commit e1b36df
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/plg_system_t3/includes/core/bot.php
Expand Up @@ -392,10 +392,11 @@ public static function extraFields(&$form, $data, $tplpath){
$app = JFactory::getApplication();
$input = $app->input;
$fdata = empty($data) ? $input->post->get('jform', array(), 'array') : (is_object($data) ? $data->getProperties() : $data);
$catid = $input->getInt('catid', $app->getUserState('com_content.articles.filter.category_id'));

if(!$catid && is_array($fdata) && !empty($fdata)){
$catid = $fdata['catid'];

if(!empty($fdata['catid']) && is_array($fdata['catid'])) { // create new
$catid = end($fdata['catid']);
} else { // edit
$catid = ($fdata['catid']);
}

if($catid){
Expand Down

0 comments on commit e1b36df

Please sign in to comment.