mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
gehaltsbestandteillib set uid to pgsql
This commit is contained in:
@@ -49,6 +49,7 @@ class GehaltsbestandteilLib
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->setUIDtoPGSQL();
|
||||
if( intval($gehaltsbestandteil->getGehaltsbestandteil_id()) > 0 )
|
||||
{
|
||||
$this->updateGehaltsbestandteil($gehaltsbestandteil);
|
||||
@@ -109,6 +110,7 @@ class GehaltsbestandteilLib
|
||||
|
||||
public function deleteGehaltsbestandteil(Gehaltsbestandteil $gehaltsbestandteil)
|
||||
{
|
||||
$this->setUIDtoPGSQL();
|
||||
$ret = $this->GehaltsbestandteilModel->delete($gehaltsbestandteil->getGehaltsbestandteil_id());
|
||||
|
||||
if (isError($ret))
|
||||
@@ -119,6 +121,7 @@ class GehaltsbestandteilLib
|
||||
|
||||
public function endGehaltsbestandteil(Gehaltsbestandteil $gehaltsbestandteil, $enddate)
|
||||
{
|
||||
$this->setUIDtoPGSQL();
|
||||
if( $gehaltsbestandteil->getBis() !== null && $gehaltsbestandteil->getBis() < $enddate )
|
||||
{
|
||||
return;
|
||||
@@ -136,4 +139,14 @@ class GehaltsbestandteilLib
|
||||
throw new Exception('error ending gehaltsbestandteil');
|
||||
}
|
||||
}
|
||||
|
||||
protected function setUIDtoPGSQL() {
|
||||
$ret = $this->GehaltsbestandteilModel
|
||||
->execReadOnlyQuery('SET LOCAL pv21.uid TO \''
|
||||
. $this->loggedInUser . '\'');
|
||||
if(isError($ret))
|
||||
{
|
||||
throw new Exception('error setting uid to pgsql');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,8 +456,9 @@ class VertragsbestandteilLib
|
||||
}
|
||||
|
||||
protected function setUIDtoPGSQL() {
|
||||
$uid = getAuthUID();
|
||||
$ret = $this->VertragsbestandteilModel->execReadOnlyQuery('SET LOCAL pv21.uid TO \'' . $uid . '\'');
|
||||
$ret = $this->VertragsbestandteilModel
|
||||
->execReadOnlyQuery('SET LOCAL pv21.uid TO \''
|
||||
. $this->loggedInUser . '\'');
|
||||
if(isError($ret))
|
||||
{
|
||||
throw new Exception('error setting uid to pgsql');
|
||||
|
||||
Reference in New Issue
Block a user