mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- 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:
@@ -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'
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user