CIS4 and old CIS support

This commit is contained in:
Paolo
2024-12-11 17:15:18 +01:00
parent 83e74cbdaf
commit bfb3f09f79
7 changed files with 229 additions and 7 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
/**
* Copyright (C) 2024 fhcomplete.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
if (! defined('BASEPATH')) exit('No direct script access allowed');
class BankData extends Auth_Controller
{
/**
*
*/
public function __construct()
{
parent::__construct(
array(
'view' => 'basis/cis:r'
)
);
}
/**
*
*/
public function view()
{
$this->load->view('Cis/BankData');
}
}
@@ -72,11 +72,11 @@ class Bank extends FHCAPI_Controller
array($loggedPersonId)
);
// If a db error occurred then terminate
if (isError($bankDataResult)) $this->terminateWithError('Database error while retrieving bank data', self::ERROR_TYPE_DB);
// Get the retrieved data or terminate
$data = $this->getDataOrTerminateWithError($bankDataResult);
// If everythin was fine then return the database results
$this->terminateWithSuccess(getData($bankDataResult));
// Anyway terminate it!
$this->terminateWithSuccess($data);
}
/**
@@ -120,7 +120,7 @@ class Bank extends FHCAPI_Controller
$writeDataResult = null; // it is considered as an error
// If at least a record exists
// If at least a record exists then update
if (hasData($bankDataResult))
{
// Then update
@@ -136,7 +136,7 @@ class Bank extends FHCAPI_Controller
)
);
}
else
else // otherwise insert
{
// Otherwise insert
$writeDataResult = $this->BankverbindungModel->insert(