mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
- Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper - Adapted the code in application/* to use as much as possible this two new functions - Removed the php function empty almost everywhere
This commit is contained in:
@@ -6,14 +6,14 @@ class Reihungstest_widget extends DropdownWidget
|
||||
{
|
||||
$this->load->model('crm/Reihungstest_model', 'ReihungstestModel');
|
||||
$this->ReihungstestModel->addOrder('datum', 'DESC');
|
||||
|
||||
|
||||
$this->addSelectToModel($this->ReihungstestModel, 'reihungstest_id', 'CONCAT(datum, \' \', uhrzeit, \' \', anmerkung)');
|
||||
|
||||
|
||||
$parametersArray = array();
|
||||
// If the parameters studiengang or studiensemester are given and are not empty
|
||||
if (isset($widgetData) && is_array($widgetData)
|
||||
&& ((isset($widgetData['studiengang']) && !empty($widgetData['studiengang']))
|
||||
|| (isset($widgetData['studiensemester']) && !empty($widgetData['studiensemester']))))
|
||||
&& ((isset($widgetData['studiengang']) && !isEmptyString($widgetData['studiengang']))
|
||||
|| (isset($widgetData['studiensemester']) && !isEmptyString($widgetData['studiensemester']))))
|
||||
{
|
||||
if ($widgetData['studiengang'] != null)
|
||||
{
|
||||
@@ -30,14 +30,14 @@ class Reihungstest_widget extends DropdownWidget
|
||||
// Set 0 = 1 in the where clause of the query
|
||||
$parametersArray['0'] = '1';
|
||||
}
|
||||
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->ReihungstestModel->loadWhere($parametersArray),
|
||||
true,
|
||||
'Select a reihungstest...',
|
||||
'No reihungstest found'
|
||||
);
|
||||
|
||||
|
||||
$this->loadDropDownView($widgetData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user