From fad4cfc8f78cf9685577baef5d862f21132d6279 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Jun 2006 23:25:56 +0000 Subject: [PATCH] =?UTF-8?q?S=E9lection=20d'un=20modele=20de=20generation?= =?UTF-8?q?=20de=20pdf=20si=20aucun=20actif.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/install/upgrade2.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 7e1949ec272..63c1644589a 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Laurent Destailleur + * Copyright (C) 2005-2006 Laurent Destailleur * * 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 @@ -619,6 +619,20 @@ function migrate_modeles($db,$langs,$conf) } } + if ($conf->expedition->enabled) + { + include_once(DOL_DOCUMENT_ROOT.'/expedition/mods/pdf/ModelePdfExpedition.class.php'); + $model=new ModelePDFExpedition(); + $modellist=$model->liste_modeles($db); + if (sizeof($modellist)==0) + { + // Aucun model par defaut. + $sql=" insert into llx_document_model(nom,type) values('rouget','shipping')"; + $resql = $db->query($sql); + if (! $resql) dolibarr_print_error($db); + } + } + //print $langs->trans("AlreadyDone"); }