- Added functions isSuccess, isError and hasData in message helper

- Updated the code using these new functions
This commit is contained in:
bison-paolo
2016-10-14 15:04:15 +02:00
parent f8c70df0bc
commit a20bf91193
13 changed files with 89 additions and 54 deletions
@@ -7,7 +7,12 @@ class OrganisationseinheitLib
public function __construct()
{
$this->ci =& get_instance();
// Loads model Organisationseinheit_model
$this->ci->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel');
// Loads helper message to manage returning messages
$this->ci->load->helper('Message');
}
/**
@@ -47,7 +52,7 @@ class OrganisationseinheitLib
$result = $this->ci->OrganisationseinheitModel->getOneLevel($schema, $table, $select, $where, $orderby, $oe_kurzbz);
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval) && count($result->retval) > 0)
if (hasData($result))
{
if ($result->retval[0]->_ppk != null && $result->retval[0]->oe_kurzbz == null)
{