mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-05 06:09:27 +00:00
- VorlageLib fix
- MessageLib better message error
This commit is contained in:
@@ -401,6 +401,10 @@ class MessageLib
|
||||
$result = $this->_error($result->retval, EXIT_ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->_error("Receiver not present", EXIT_ERROR);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -122,16 +122,22 @@ class VorlageLib
|
||||
$where .= "sprache = " . $this->ci->VorlageModel->escape($sprache);
|
||||
}
|
||||
|
||||
$vorlage = $this->ci->organisationseinheitlib->treeSearch(
|
||||
'public',
|
||||
'tbl_vorlagestudiengang',
|
||||
array("vorlage_kurzbz", "studiengang_kz", "version", "text", "oe_kurzbz",
|
||||
"vorlagestudiengang_id", "style", "berechtigung", "anmerkung_vorlagestudiengang",
|
||||
"aktiv", "sprache", "subject", "orgform_kurzbz"),
|
||||
$where,
|
||||
"version DESC",
|
||||
$oe_kurzbz
|
||||
);
|
||||
// Try to search the template with the given vorlage_kurzbz
|
||||
$vorlage = $this->ci->VorlageStudiengangModel->loadWhere(array("vorlage_kurzbz" => $vorlage_kurzbz));
|
||||
// If the searched template was not found
|
||||
if (is_object($vorlage) && $vorlage->error == EXIT_SUCCESS && is_array($vorlage->retval) && count($vorlage->retval) == 0)
|
||||
{
|
||||
$vorlage = $this->ci->organisationseinheitlib->treeSearch(
|
||||
'public',
|
||||
'tbl_vorlagestudiengang',
|
||||
array("vorlage_kurzbz", "studiengang_kz", "version", "text", "oe_kurzbz",
|
||||
"vorlagestudiengang_id", "style", "berechtigung", "anmerkung_vorlagestudiengang",
|
||||
"aktiv", "sprache", "subject", "orgform_kurzbz"),
|
||||
$where,
|
||||
"version DESC",
|
||||
$oe_kurzbz
|
||||
);
|
||||
}
|
||||
|
||||
return $vorlage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user