Ajout d'infos de debug dans les variables
This commit is contained in:
parent
429a629475
commit
580d89f75c
|
@ -109,14 +109,15 @@ function variable_get($name, $default = null, $createit_comment = null) {
|
||||||
* of serialization as necessary.
|
* of serialization as necessary.
|
||||||
*/
|
*/
|
||||||
function variable_set($name, $value, $comment=null) {
|
function variable_set($name, $value, $comment=null) {
|
||||||
global $conf, $db;
|
global $conf, $db, $err;
|
||||||
|
$err->log('variable', 'variable_set', '+'.serialize($value).'+'.$comment.'+');
|
||||||
|
|
||||||
$conf[$name] = $value;
|
$conf[$name] = $value;
|
||||||
if (is_object($value) || is_array($value)) {
|
if (is_object($value) || is_array($value)) {
|
||||||
$value = serialize($value);
|
$value = serialize($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_null($comment) ) {
|
if ( empty($comment) ) {
|
||||||
$query = "INSERT INTO variable (name, value) values ('".$name."', '".$value."') on duplicate key update name='$name', value='$value';";
|
$query = "INSERT INTO variable (name, value) values ('".$name."', '".$value."') on duplicate key update name='$name', value='$value';";
|
||||||
} else {
|
} else {
|
||||||
$comment=mysql_real_escape_string($comment);
|
$comment=mysql_real_escape_string($comment);
|
||||||
|
|
Loading…
Reference in New Issue