mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-26 16:39:29 +00:00
FilterWidget now checks if the columnsAliases parameter contains a valid number of elements
This commit is contained in:
@@ -130,18 +130,27 @@ class FilterWidget extends Widget
|
||||
//
|
||||
$this->listFields = $this->FiltersModel->getExecutedQueryListFields();
|
||||
|
||||
|
||||
//
|
||||
$filterSessionArray = $this->session->userdata(self::SESSION_NAME);
|
||||
if (isset($filterSessionArray[self::SELECTED_FIELDS]))
|
||||
{
|
||||
$selectedFields = $filterSessionArray[self::SELECTED_FIELDS];
|
||||
}
|
||||
|
||||
//
|
||||
if (count($selectedFields) == 0)
|
||||
{
|
||||
$filterSessionArray[self::SELECTED_FIELDS] = $this->listFields;
|
||||
$this->session->set_userdata(self::SESSION_NAME, $filterSessionArray);
|
||||
}
|
||||
|
||||
//
|
||||
if ($this->columnsAliases != null && count($this->listFields) != count($this->columnsAliases))
|
||||
{
|
||||
show_error('Parameter columnsAliases does not have a number of items equal to those returned by the query');
|
||||
}
|
||||
|
||||
//
|
||||
$this->metaData = $this->FiltersModel->getExecutedQueryMetaData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user