Fixed category filter issue. Fixed permissions accross JCB. Updated some notes on the field types.

This commit is contained in:
2019-06-05 12:26:15 +02:00
parent dda33d66cb
commit 76449b01ec
16 changed files with 30 additions and 30 deletions

View File

@ -10929,29 +10929,29 @@ class Interpretation extends Fields
return '';
}
public function setCategoryFilter($viewName_list)
public function setCategoryFilter($viewName_single, $viewName_list)
{
if (isset($this->categoryBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->categoryBuilder[$viewName_list]))
{
// check if category has another name
if (isset($this->catOtherName[$viewName_list]) && ComponentbuilderHelper::checkArray($this->catOtherName[$viewName_list]))
{
$otherViews = $this->catOtherName[$viewName_list]['views'];
$targetView = "." . $this->catOtherName[$viewName_list]['view'];
}
else
{
$otherViews = $viewName_list;
$targetView = "." . $viewName_single;
}
// set component name
$component = ComponentbuilderHelper::safeString($this->componentData->name_code);
$COMONENT = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U');
$COPMONENT = ComponentbuilderHelper::safeString($this->componentData->name_code, 'U');
// set filter
$filter = array();
$filter[] = PHP_EOL . PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Category Filter.";
$filter[] = $this->_t(2) . "JHtmlSidebar::addFilter(";
$filter[] = $this->_t(3) . "JText:" . ":_('JOPTION_SELECT_CATEGORY'),";
$filter[] = $this->_t(3) . "'filter_category_id',";
$filter[] = $this->_t(3) . "JHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text', \$this->state->get('filter.category_id'))";
$filter[] = $this->_t(3) . "JHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . $targetView . "'), 'value', 'text', \$this->state->get('filter.category_id'))";
$filter[] = $this->_t(2) . ");";
@ -10959,9 +10959,9 @@ class Interpretation extends Fields
$filter[] = $this->_t(2) . "{";
$filter[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Category Batch selection.";
$filter[] = $this->_t(3) . "JHtmlBatch_::addListSelection(";
$filter[] = $this->_t(4) . "JText:" . ":_('COM_" . $COMONENT . "_KEEP_ORIGINAL_CATEGORY'),";
$filter[] = $this->_t(4) . "JText:" . ":_('COM_" . $COPMONENT . "_KEEP_ORIGINAL_CATEGORY'),";
$filter[] = $this->_t(4) . "'batch[category]',";
$filter[] = $this->_t(4) . "JHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . "." . $otherViews . "'), 'value', 'text')";
$filter[] = $this->_t(4) . "JHtml::_('select.options', JHtml::_('category.options', 'com_" . $component . $targetView . "'), 'value', 'text')";
$filter[] = $this->_t(3) . ");";
$filter[] = $this->_t(2) . "}";