Experimental: add function to encrypt sensitive data in database
This commit is contained in:
parent
163433f7b0
commit
e8101d5fbe
@ -105,21 +105,17 @@ print '</form>';
|
|||||||
|
|
||||||
|
|
||||||
# Affiche lignes des constantes
|
# Affiche lignes des constantes
|
||||||
if ($all==1)
|
$sql = "SELECT";
|
||||||
{
|
$sql.= " rowid";
|
||||||
$sql = "SELECT rowid, name, value, note, entity ";
|
$sql.= ", ".$db->decrypt('name',$conf->db->dolibarr_main_db_encryption,$conf->db->dolibarr_main_db_cryptkey)." as name";
|
||||||
$sql.= "FROM llx_const ";
|
$sql.= ", ".$db->decrypt('value',$conf->db->dolibarr_main_db_encryption,$conf->db->dolibarr_main_db_cryptkey)." as value";
|
||||||
$sql.= "WHERE entity IN (0,".$conf->entity.") ";
|
$sql.= ", note";
|
||||||
$sql.= "ORDER BY name ASC";
|
$sql.= ", entity";
|
||||||
}
|
$sql.= " FROM ".MAIN_DB_PREFIX."const";
|
||||||
else
|
$sql.= " WHERE entity IN (0,".$conf->entity.")";
|
||||||
{
|
if (!isset($all)) $sql.= " AND visible = 1";
|
||||||
$sql = "SELECT rowid, name, value, note, entity ";
|
$sql.= " ORDER BY name ASC";
|
||||||
$sql.= "FROM llx_const ";
|
|
||||||
$sql.= "WHERE visible = 1 ";
|
|
||||||
$sql.= "AND entity IN (0,".$conf->entity.") ";
|
|
||||||
$sql.= "ORDER BY name ASC";
|
|
||||||
}
|
|
||||||
dol_syslog("Const::listConstant sql=".$sql);
|
dol_syslog("Const::listConstant sql=".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user