Merge branch 'master' into feature-68296/Vue_Router_via_Extensions_erweitern_ma0080

This commit is contained in:
Harald Bamberger
2026-02-26 16:05:32 +01:00
283 changed files with 27539 additions and 4539 deletions
+70
View File
@@ -515,3 +515,73 @@ function has_permissions_for_stg($studiengang_kz, $permissions = '')
return false;
}
/**
* check if an entry exists in the database
*/
function is_in_db($key, $model = '')
{
if (!$model)
return false;
$field = strstr($model, ":");
if ($field) {
$model = strstr($model, ":", true);
$field = substr($field, 1);
}
$CI =& get_instance();
$CI->load->model($model, $model);
if ($field) {
$result = $CI->$model->loadWhere([
$field => $key
]);
} else {
$result = $CI->$model->load($key);
}
return (isSuccess($result) && hasData($result));
}
/**
* is building an array for Dropdown Entry in Print Dropdown
* @param $id id for the Document to add to the Document Array
* @param $name title of the dropdownEntry
* @param $parameterUrl url of parameters xml, xsl, format etc as needed
* WITHOUT BASEURL eg. "xml=abschlusspruefung.rdf.php&xsl_stg_kz=$studiengang_kz&xsl=Bescheid&output=pdf"
* @param $uid default parameter, if null only parameterurl will be added
* additional needed parameter: put in the parameterUrl
* @param $alternativeBaseUrl: if baseUrl not pdfExport.php, put here alternative without ? char, eg. "zutrittskarte.php"
*
* @return Array
*/
function buildDropdownEntryPrintArray($id, $name, $parameterurl, $uid=null, $order=null, $alternativeBaseUrl=null)
{
//DEFAULT BASEURL
$baseurl = "pdfExport.php?";
$uidString = $uid ? "&uid=" . $uid : "";
if($alternativeBaseUrl)
{
return [
"id" => $id,
"type" => "documenturl",
"name" => $name,
"url" => $alternativeBaseUrl . "?" . $parameterurl . $uidString,
"order" => $order
];
}
else
return [
"id" => $id,
"type" => "documenturl",
"name" => $name,
"url" => $baseurl . $parameterurl . "&uid=" . $uid,
"order" => $order
];
}
+24 -1
View File
@@ -185,7 +185,15 @@ function generateJSModulesInclude($JSModules)
for ($tmpJSsCounter = 0; $tmpJSsCounter < count($tmpJSs); $tmpJSsCounter++)
{
$toPrint = sprintf($jsInclude, base_url($tmpJSs[$tmpJSsCounter].$cachetoken)).PHP_EOL;
if($ci->config->item('use_fhcomplete_build_version_in_path'))
{
$relurl = preg_replace('#public/#', 'public/' . $ci->config->item('fhcomplete_build_version') . '/', $tmpJSs[$tmpJSsCounter]);
$toPrint = sprintf($jsInclude, base_url($relurl)).PHP_EOL;
}
else
{
$toPrint = sprintf($jsInclude, base_url($tmpJSs[$tmpJSsCounter].$cachetoken)).PHP_EOL;
}
if ($tmpJSsCounter > 0) $toPrint = "\t\t".$toPrint;
@@ -247,6 +255,21 @@ function generateSkipLink($skipID)
echo $toPrint;
}
function absoluteJsImportUrl($relurl)
{
$ci =& get_instance();
$ci->load->config('javascript');
if($ci->config->item('use_fhcomplete_build_version_in_path'))
{
$url = base_url(preg_replace('#^public/#', 'public/' . $ci->config->item('fhcomplete_build_version') . '/', $relurl));
}
else
{
$url = base_url($relurl) . '?'. $ci->config->item('fhcomplete_build_version');
}
return $url;
}
/*
* Manipulate CI views includes Array to load
* - public/js/FhcApps.js via customJSs and