From 419e53a65682249b814e28003d18080925737efb Mon Sep 17 00:00:00 2001 From: Paolo Date: Mon, 2 Jul 2018 17:40:22 +0200 Subject: [PATCH] - Changed filtersupdate to better divide filters for infocenter overview and freigegeben - Changed infocenterData to retrive overview filters - Changed infocenterFreigegebenData to retrive freigegeben filters - Changed InfoCenter controller to load overview and freigegeben filter's names into the left menu --- .../controllers/system/infocenter/InfoCenter.php | 10 +++++----- application/core/FHC_Controller.php | 2 +- application/libraries/FiltersLib.php | 12 ++++++------ application/models/content/Ampel_model.php | 2 +- .../views/system/infocenter/infocenterData.php | 2 +- .../infocenter/infocenterFreigegebenData.php | 2 +- system/filtersupdate.php | 16 ++++++++-------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 25561c795..7a759f615 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -652,7 +652,7 @@ class InfoCenter extends FHC_Controller $listFiltersNotSent = array(); $listCustomFilters = array(); - $filtersSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterSentApplication%'); + $filtersSent = $this->FiltersModel->getFilterList('infocenter', 'overview', '%InfoCenterSentApplication%'); if (hasData($filtersSent)) { for ($filtersCounter = 0; $filtersCounter < count($filtersSent->retval); $filtersCounter++) @@ -663,7 +663,7 @@ class InfoCenter extends FHC_Controller } } - $filtersNotSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterNotSentApplication%'); + $filtersNotSent = $this->FiltersModel->getFilterList('infocenter', 'overview', '%InfoCenterNotSentApplication%'); if (hasData($filtersNotSent)) { for ($filtersCounter = 0; $filtersCounter < count($filtersNotSent->retval); $filtersCounter++) @@ -674,7 +674,7 @@ class InfoCenter extends FHC_Controller } } - $customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->_uid); + $customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'overview', $this->_uid); if (hasData($customFilters)) { for ($filtersCounter = 0; $filtersCounter < count($customFilters->retval); $filtersCounter++) @@ -795,7 +795,7 @@ class InfoCenter extends FHC_Controller $listFilters = array(); $listCustomFilters = array(); - $filters = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterFreigegeben%'); + $filters = $this->FiltersModel->getFilterList('infocenter', 'freigegeben', '%InfoCenterFreigegeben%'); if (hasData($filters)) { for ($filtersCounter = 0; $filtersCounter < count($filters->retval); $filtersCounter++) @@ -806,7 +806,7 @@ class InfoCenter extends FHC_Controller } } - $customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->_uid); + $customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'freigegeben', $this->_uid); if (hasData($customFilters)) { for ($filtersCounter = 0; $filtersCounter < count($customFilters->retval); $filtersCounter++) diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index e3bf558e1..f09df48f3 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -61,7 +61,7 @@ class FHC_Controller extends CI_Controller { $this->_controllerId = $this->input->get(self::FHC_CONTROLLER_ID); - if (!isset($this->_controllerId) || isEmptyString($this->_controllerId)) + if (isEmptyString($this->_controllerId)) { $this->_controllerId = uniqid(); // generate a unique id // Redirect to the same URL, but giving FHC_CONTROLLER_ID as HTTP GET parameter diff --git a/application/libraries/FiltersLib.php b/application/libraries/FiltersLib.php index 1cd7e7691..9e7e769eb 100644 --- a/application/libraries/FiltersLib.php +++ b/application/libraries/FiltersLib.php @@ -297,7 +297,7 @@ class FiltersLib $this->_ci->load->library('PhrasesLib', array(self::FILTER_PHRASES_CATEGORY)); $tmpFilterNamePhrase = $this->_ci->phraseslib->t(self::FILTER_PHRASES_CATEGORY, $filterJson->namePhrase); - if (isset($tmpFilterNamePhrase) && !isEmptyString($tmpFilterNamePhrase)) // if is not null or an empty string + if (!isEmptyString($tmpFilterNamePhrase)) // if is not null or an empty string { $filterName = $tmpFilterNamePhrase; } @@ -339,7 +339,7 @@ class FiltersLib $removeSelectedField = false; // Checks the parameter selectedField - if (isset($selectedField) && !isEmptyString($selectedField)) + if (!isEmptyString($selectedField)) { // Retrives all the used fields by the current filter $fields = $this->getElementSession(self::SESSION_FIELDS); @@ -373,7 +373,7 @@ class FiltersLib $removeSelectedField = false; // Checks the parameter selectedField - if (isset($selectedField) && !isEmptyString($selectedField)) + if (!isEmptyString($selectedField)) { // Retrives all the used fields by the current filter $fields = $this->getElementSession(self::SESSION_FIELDS); @@ -402,7 +402,7 @@ class FiltersLib $removeAppliedFilter = false; // Checks the parameter appliedFilter - if (isset($appliedFilter) && !isEmptyString($appliedFilter)) + if (!isEmptyString($appliedFilter)) { // Retrives all the used fields by the current filter $fields = $this->getElementSession(self::SESSION_FIELDS); @@ -490,7 +490,7 @@ class FiltersLib $addFilter = false; // Checks the parameter filter - if (isset($filter) && !isEmptyString($filter)) + if (!isEmptyString($filter)) { // Retrives all the used fields by the current filter $fields = $this->getElementSession(self::SESSION_FIELDS); @@ -533,7 +533,7 @@ class FiltersLib $saveCustomFilter = false; // by default returns a failure // Checks parameter customFilterDescription if not valid stop the execution - if (!isset($customFilterDescription) || isEmptyString($customFilterDescription)) + if (isEmptyString($customFilterDescription)) { return $saveCustomFilter; } diff --git a/application/models/content/Ampel_model.php b/application/models/content/Ampel_model.php index 4b8fab15a..c50025a12 100644 --- a/application/models/content/Ampel_model.php +++ b/application/models/content/Ampel_model.php @@ -50,7 +50,7 @@ class Ampel_model extends DB_Model */ public function execBenutzerSelect($benutzer_select) { - if (isset($benutzer_select) && !isEmptyString($benutzer_select)) + if (!isEmptyString($benutzer_select)) { return $this->execQuery($benutzer_select); } diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 06e29a44f..265b56cc2 100755 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -306,7 +306,7 @@ ); $filterWidgetArray['app'] = $APP; - $filterWidgetArray['datasetName'] = 'PersonActions'; + $filterWidgetArray['datasetName'] = 'overview'; $filterWidgetArray['filterKurzbz'] = 'InfoCenterSentApplicationAll'; $filterWidgetArray['filter_id'] = $this->input->get('filter_id'); diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 145c2e323..4979d60bd 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -215,7 +215,7 @@ ); $filterWidgetArray['app'] = $APP; - $filterWidgetArray['datasetName'] = 'PersonActions'; + $filterWidgetArray['datasetName'] = 'freigegeben'; $filterWidgetArray['filterKurzbz'] = 'InfoCenterFreigegeben5days'; $filterWidgetArray['filter_id'] = $this->input->get('filter_id'); diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 7134b16bf..9166e9154 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -21,7 +21,7 @@ $filters = array( array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'overview', 'filter_kurzbz' => 'InfoCenterSentApplicationAll', 'description' => '{Alle}', 'sort' => 1, @@ -52,7 +52,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'overview', 'filter_kurzbz' => 'InfoCenterSentApplication3days', 'description' => '{"3 Tage keine Aktion"}', 'sort' => 2, @@ -89,7 +89,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'overview', 'filter_kurzbz' => 'InfoCenterNotSentApplicationAll', 'description' => '{Alle}', 'sort' => 1, @@ -124,7 +124,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'overview', 'filter_kurzbz' => 'InfoCenterNotSentApplication14Days', 'description' => '{"14 Tage keine Aktion"}', 'sort' => 3, @@ -164,7 +164,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'overview', 'filter_kurzbz' => 'InfoCenterSentApplicationLt3days', 'description' => '{"< 3 Tage"}', 'sort' => 3, @@ -201,7 +201,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'overview', 'filter_kurzbz' => 'InfoCenterNotSentApplication5DaysOnline', 'description' => '{"5 Tage keine BewAktion"}', 'sort' => 2, @@ -247,7 +247,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'freigegeben', 'filter_kurzbz' => 'InfoCenterFreigegeben5days', 'description' => '{"5 Tage Letzte Aktion"}', 'sort' => 1, @@ -277,7 +277,7 @@ $filters = array( ), array( 'app' => 'infocenter', - 'dataset_name' => 'PersonActions', + 'dataset_name' => 'freigegeben', 'filter_kurzbz' => 'InfoCenterFreigegebenAlle', 'description' => '{Alle}', 'sort' => 2,