mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Changed method getOERoot of MessageToken_model and method redirectByToken of controller to retrive the correct root of the organisation unit tree
This commit is contained in:
@@ -53,22 +53,15 @@ class Redirect extends FHC_Controller
|
||||
if ($oe_kurzbz != null && $oe_kurzbz != '')
|
||||
{
|
||||
$organisationRoot = null;
|
||||
|
||||
$getOERoot = $this->MessageTokenModel->getOERoot($oe_kurzbz);
|
||||
if ($getOERoot) // If no errors occurred
|
||||
if (isSuccess($getOERoot)) // If no errors occurred
|
||||
{
|
||||
// If data are present
|
||||
if (is_array($getOERoot->result()) && count($getOERoot->result()) > 0)
|
||||
{
|
||||
$organisationseinheit = $getOERoot->result()[0];
|
||||
if ($organisationseinheit->oe_kurzbz == null)
|
||||
{
|
||||
show_error('No organisation unit present in the message');
|
||||
}
|
||||
else
|
||||
{
|
||||
$organisationRoot = $organisationseinheit->oe_kurzbz;
|
||||
}
|
||||
}
|
||||
$organisationRoot = $getOERoot->retval;
|
||||
}
|
||||
else
|
||||
{
|
||||
show_error('No organisation unit present in the message');
|
||||
}
|
||||
|
||||
$addonAufnahmeUrls = $this->config->item('addons_aufnahme_url');
|
||||
|
||||
Reference in New Issue
Block a user