Php renomme spontanémement les variable POST qui ont un '.'
Modification de variable pour que ca n'impacte pas le fonctionnement.
This commit is contained in:
parent
79023396cf
commit
c4bae3f8ef
|
@ -88,6 +88,7 @@ function variable_init_maybe() {
|
||||||
*/
|
*/
|
||||||
function variable_get($name, $default = null, $createit_comment = null) {
|
function variable_get($name, $default = null, $createit_comment = null) {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
$name=str_replace('.', '_', $name); // Php can't handle POST var with a '.'
|
||||||
|
|
||||||
variable_init_maybe();
|
variable_init_maybe();
|
||||||
|
|
||||||
|
@ -112,6 +113,8 @@ function variable_set($name, $value, $comment=null) {
|
||||||
global $conf, $db, $err;
|
global $conf, $db, $err;
|
||||||
$err->log('variable', 'variable_set', '+'.serialize($value).'+'.$comment.'+');
|
$err->log('variable', 'variable_set', '+'.serialize($value).'+'.$comment.'+');
|
||||||
|
|
||||||
|
$name=str_replace('.', '_', $name); // Php can't handle POST var with a '.'
|
||||||
|
|
||||||
$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);
|
||||||
|
@ -137,6 +140,7 @@ function variable_set($name, $value, $comment=null) {
|
||||||
*/
|
*/
|
||||||
function variable_del($name) {
|
function variable_del($name) {
|
||||||
global $conf, $db;
|
global $conf, $db;
|
||||||
|
$name=str_replace('.', '_', $name); // Php can't handle POST var with a '.'
|
||||||
|
|
||||||
$db->query("DELETE FROM `variable` WHERE name = '".$name."'");
|
$db->query("DELETE FROM `variable` WHERE name = '".$name."'");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue