mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
use only prestundent_id in Archive-functionality
This commit is contained in:
@@ -452,6 +452,11 @@ 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"));
|
||||
|
||||
@@ -486,4 +491,20 @@ 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