- FilterWidget: now it is possible to provide the encryptedColumns parameter to specify which columns of a database table are encrypted, how to cast them and which password to use to decrypt them

- Added new constants PGSQL_BYTEA_TYPE, CRYPT_CONF_PASSWORDS, CRYPT_CAST, CRYPT_PASSWORD_NAME, CRYPT_SELECT_TEMPLATE, CRYPT_WHERE_TEMPLATE and CRYPT_WRITE_TEMPLATE to application/core/DB_Model.php
- Added new optional parameter encryptedColumns to application/core/DB_Model insert, update, load, loadWhere, execQuery, execReadOnlyQuery and _toPhp
- Added new private methods _addEncrypt, _addDecryptQuery and _addDecryptLoad to application/core/DB_Model.php
- core/DB_Model: now it is possible to provide the encryptedColumns parameter to specify which columns  of a database table are encrypted, how to cast them and which password to use to decrypt them
- Adapted application/models/system/PersonLog_model.php
This commit is contained in:
Paolo
2023-02-08 13:33:40 +01:00
parent 4fa1193948
commit c831355012
5 changed files with 314 additions and 102 deletions
+18 -1
View File
@@ -1,5 +1,22 @@
<?php
/**
* Copyright (C) 2023 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/>.
*/
class PersonLog_model extends DB_Model
{
/**
@@ -17,7 +34,7 @@ class PersonLog_model extends DB_Model
* @param array $data Data of Log Entry to save.
* @return success object if true
*/
public function insert($data)
public function insert($data, $encryptedColumns = null)
{
$result = $this->db->insert($this->dbTable, $data);
if ($result)