From c4bae3f8ef8373e451aa0813d2ae651f50868d22 Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 9 Jan 2014 09:51:57 +0000 Subject: [PATCH] =?UTF-8?q?Php=20renomme=20spontan=C3=A9mement=20les=20var?= =?UTF-8?q?iable=20POST=20qui=20ont=20un=20'.'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modification de variable pour que ca n'impacte pas le fonctionnement. --- bureau/class/variables.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bureau/class/variables.php b/bureau/class/variables.php index 30115039..c6d86fe4 100644 --- a/bureau/class/variables.php +++ b/bureau/class/variables.php @@ -88,6 +88,7 @@ function variable_init_maybe() { */ function variable_get($name, $default = null, $createit_comment = null) { global $conf; + $name=str_replace('.', '_', $name); // Php can't handle POST var with a '.' variable_init_maybe(); @@ -112,6 +113,8 @@ function variable_set($name, $value, $comment=null) { global $conf, $db, $err; $err->log('variable', 'variable_set', '+'.serialize($value).'+'.$comment.'+'); + $name=str_replace('.', '_', $name); // Php can't handle POST var with a '.' + $conf[$name] = $value; if (is_object($value) || is_array($value)) { $value = serialize($value); @@ -137,6 +140,7 @@ function variable_set($name, $value, $comment=null) { */ function variable_del($name) { global $conf, $db; + $name=str_replace('.', '_', $name); // Php can't handle POST var with a '.' $db->query("DELETE FROM `variable` WHERE name = '".$name."'");