mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
skip adding uid to params for templates Ausbildungsver and AusbVerEng instead of deleting it afterwards
This commit is contained in:
@@ -442,6 +442,10 @@ class Documents extends FHCAPI_Controller
|
||||
'betreuerart_kurzbz',
|
||||
'studiensemester_kurzbz'
|
||||
] as $key) {
|
||||
if (in_array($xsl, array('Ausbildungsver', 'AusbVerEng')) && $key === 'uid')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$value = $this->input->post_get($key);
|
||||
if ($value !== null)
|
||||
$params .= '&' . $key . '=' . urlencode($value);
|
||||
@@ -452,11 +456,6 @@ class Documents extends FHCAPI_Controller
|
||||
$params .= '&vertrag_id[]=' . urlencode($id);
|
||||
}
|
||||
|
||||
//delete uid param for Ausbildungsvertrag
|
||||
if($xsl == 'Ausbildungsver' || $xsl == "AusbVerEng") {
|
||||
$params = $this->_cutUidParam($params);
|
||||
}
|
||||
|
||||
if (!$vorlage->archivierbar)
|
||||
$this->terminateWithError($this->p->t("stv", "grades_error_archive"));
|
||||
|
||||
@@ -491,20 +490,4 @@ class Documents extends FHCAPI_Controller
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
*
|
||||
* @return String paramString without paramUid
|
||||
*/
|
||||
private function _cutUidParam($string)
|
||||
{
|
||||
$string = preg_replace('/uid=[^&]*&?/', '', $string);
|
||||
|
||||
$params = trim($string, '&');
|
||||
$params = preg_replace('/&&+/', '&', $params);
|
||||
|
||||
return $params;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user