mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Merge branch 'ent-10032-contrasena-de-replicacion-de-bbdd-no-se-encripta-en-bbdd' into 'develop'
Ent 10032 contrasena de replicacion de bbdd no se encripta en bbdd See merge request artica/pandorafms!5418
This commit is contained in:
commit
a96f3afdc2
@ -67,7 +67,7 @@ function config_create_value($token, $value)
|
|||||||
*
|
*
|
||||||
* @return boolean True if success. False on failure.
|
* @return boolean True if success. False on failure.
|
||||||
*/
|
*/
|
||||||
function config_update_value($token, $value, $noticed=false)
|
function config_update_value($token, $value, $noticed=false, $password=false)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
// Include functions_io to can call __() function.
|
// Include functions_io to can call __() function.
|
||||||
@ -91,7 +91,11 @@ function config_update_value($token, $value, $noticed=false)
|
|||||||
|
|
||||||
if (isset($config[$token]) === false) {
|
if (isset($config[$token]) === false) {
|
||||||
$config[$token] = $value;
|
$config[$token] = $value;
|
||||||
return (bool) config_create_value($token, io_safe_input($value));
|
if (($password === false)) {
|
||||||
|
return (bool) config_create_value($token, io_safe_input($value));
|
||||||
|
} else {
|
||||||
|
return (bool) config_create_value($token, io_input_password($value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it has not changed.
|
// If it has not changed.
|
||||||
@ -104,7 +108,7 @@ function config_update_value($token, $value, $noticed=false)
|
|||||||
|
|
||||||
$result = db_process_sql_update(
|
$result = db_process_sql_update(
|
||||||
'tconfig',
|
'tconfig',
|
||||||
['value' => io_safe_input($value)],
|
['value' => ($password === false) ? io_safe_input($value) : io_input_password($value)],
|
||||||
['token' => $token]
|
['token' => $token]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user