From 3674435bcf253a190e0f76377c84aa249fb45396 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 11 Jul 2010 13:27:26 +0000 Subject: [PATCH] Fix: Model not activated by default --- htdocs/includes/modules/modProjet.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php index 0a0b5e39a36..7da6f774870 100644 --- a/htdocs/includes/modules/modProjet.class.php +++ b/htdocs/includes/modules/modProjet.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2010 Regis Houssin @@ -21,8 +21,8 @@ */ /** - * \defgroup projet Module projet - * \brief Module pour inclure le detail par projets dans les autres modules + * \defgroup projet Module project + * \brief Module to create projects/tasks/gantt diagram. Projects can them be affected to tasks. * \version $Id$ */ @@ -149,9 +149,16 @@ class modProjet extends DolibarrModules */ function init() { + global $conf; + // Permissions $this->remove(); + $sql = array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','project',".$conf->entity.")", + ); + return $this->_init($sql); }