- Added examples to application/config/db_crypt.php

- core/DB_Model->_addDecryptLoad fixed when checking the condition if the used operator is made of two characters
This commit is contained in:
Paolo
2023-02-21 16:11:49 +01:00
parent 2729b60b39
commit 2b9af86955
2 changed files with 17 additions and 6 deletions
+6 -1
View File
@@ -20,5 +20,10 @@
if (!defined('BASEPATH')) exit('No direct script access allowed');
// NOTE: if database encryption is _not_ used then leave this array empty!
$config['encryption_passwords'] = array();
$config['encryption_passwords'] = array(
// 'password name 1' => 'password 1'
// 'password name 2' => 'password 2'
// 'password name ...' => 'password ...'
// 'password name N' => 'password N'
);
+11 -5
View File
@@ -923,7 +923,7 @@ class DB_Model extends CI_Model
$value,
$encryptionPassword
),
false
false // no escaping
);
}
else // otherwise copy this element as it is
@@ -1035,12 +1035,18 @@ class DB_Model extends CI_Model
{
$operator = null; // operator not found in the column name
// Custom operators
if (strpos($column, '>') != false
|| strpos($column, '<') != false
|| strpos($column, '>=') != false
// Custom operators with 2 chars
if (strpos($column, '>=') != false
|| strpos($column, '<=') != false
|| strpos($column, '!=') != false
|| strpos($column, '<>') != false
)
{
$operator = ' '.substr(trim($column), -2).' ';
}
// Custom operators with 1 chars
elseif (strpos($column, '>') != false
|| strpos($column, '<') != false
|| strpos($column, '=') != false
)
{