forked from Wavyzz/dolibarr
je pensais avoir trouvé un bug dans ce module mais c'est juste un soucis d'indentation qui fait que j'arrive pas à lire le code, désolé donc je réindente pour m'y retrouver
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -54,21 +55,21 @@ class DolibarrModules
|
|||||||
// Ins<6E>re les constantes
|
// Ins<6E>re les constantes
|
||||||
$err = 0;
|
$err = 0;
|
||||||
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."';";
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$this->const_name."';";
|
||||||
$this->db->query($sql_del);
|
$this->db->query($sql_del);
|
||||||
$sql ="INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES
|
|
||||||
('".$this->const_name."','1',0);";
|
|
||||||
|
|
||||||
|
$sql ="INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES
|
||||||
|
('".$this->const_name."','1',0);";
|
||||||
if (!$this->db->query($sql))
|
if (!$this->db->query($sql))
|
||||||
{
|
{
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ins<6E>re les boxes dans llx_boxes_def
|
// Ins<6E>re les boxes dans llx_boxes_def
|
||||||
foreach ($this->boxes as $key => $value)
|
foreach ($this->boxes as $key => $value)
|
||||||
{
|
{
|
||||||
$titre = $this->boxes[$key][0];
|
$titre = $this->boxes[$key][0];
|
||||||
$file = $this->boxes[$key][1];
|
$file = $this->boxes[$key][1];
|
||||||
|
|
||||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."boxes_def WHERE name ='".$titre."'";
|
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."boxes_def WHERE name ='".$titre."'";
|
||||||
|
|
||||||
if ( $this->db->query($sql) )
|
if ( $this->db->query($sql) )
|
||||||
@@ -110,21 +111,21 @@ class DolibarrModules
|
|||||||
if ($row[0] == 0)
|
if ($row[0] == 0)
|
||||||
{
|
{
|
||||||
// Si non trouve // '$visible'
|
// Si non trouve // '$visible'
|
||||||
if (strlen($note)){
|
if (strlen($note)){
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible) VALUES ('$name','$type','$val','$note',0);";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible) VALUES ('$name','$type','$val','$note',0);";
|
||||||
}elseif (strlen($val))
|
}elseif (strlen($val))
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,visible) VALUES ('$name','$type','$val',0);";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,visible) VALUES ('$name','$type','$val',0);";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,visible) VALUES ('$name','$type',0);";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,visible) VALUES ('$name','$type',0);";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $this->db->query($sql) )
|
if (! $this->db->query($sql) )
|
||||||
{
|
{
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -173,7 +174,7 @@ class DolibarrModules
|
|||||||
$sql .= "(".$r_id.",'".$r_desc."','".$r_modul."','".$r_type."',".$r_def.");";
|
$sql .= "(".$r_id.",'".$r_desc."','".$r_modul."','".$r_type."',".$r_def.");";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print "<pre>DEBUG ERIC: $sql</pre>\n";
|
||||||
if ( $this->db->query($sql) )
|
if ( $this->db->query($sql) )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user