diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index c9f08184ecc..3e0b63d64fe 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -394,9 +394,6 @@ class DolibarrModules $err = 0; - // Removed because create pb of compatibility - // if ($this->family == "base") $conf->entity = 0; // Common module - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const "; $sql.= "WHERE name = '".$this->const_name."' "; $sql.= "AND entity = ".$conf->entity; @@ -425,9 +422,6 @@ class DolibarrModules $err = 0; - // Removed because create pb of compatibility - // if ($this->family == "base") $conf->entity = 0; // Common module - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const "; $sql.= "WHERE name = '".$this->const_name."'"; $sql.= "AND entity = ".$conf->entity; diff --git a/htdocs/includes/modules/modMultiCompany.class.php b/htdocs/includes/modules/modMultiCompany.class.php index b8b812b7742..f26d04ec73f 100644 --- a/htdocs/includes/modules/modMultiCompany.class.php +++ b/htdocs/includes/modules/modMultiCompany.class.php @@ -204,9 +204,11 @@ class modMultiCompany extends DolibarrModules { $sql = array(); - //$result=$this->load_tables(); + $init = $this->_init($sql); + + $result=$this->load_tables('/multicompany/sql/init/'); - return $this->_init($sql); + return $init; } /** @@ -219,6 +221,7 @@ class modMultiCompany extends DolibarrModules { $sql = array(); + $result=$this->load_tables('/multicompany/sql/remove/'); $result = $this->destroy_cookie(); return $this->_remove($sql); @@ -232,9 +235,9 @@ class modMultiCompany extends DolibarrModules * This function is called by this->init. * \return int <=0 if KO, >0 if OK */ - function load_tables() + function load_tables($path) { - return $this->_load_tables('/multicompany/sql/'); + return $this->_load_tables($path); } /** diff --git a/htdocs/multicompany/sql/init.sql b/htdocs/multicompany/sql/init.sql deleted file mode 100644 index ecb21991bc1..00000000000 --- a/htdocs/multicompany/sql/init.sql +++ /dev/null @@ -1,19 +0,0 @@ --- Copyright (C) 2009 Regis Houssin --- --- 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 --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --- --- $Id$ --- -