diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 78f85dbb9aa..a46b650fbff 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 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 @@ -58,7 +58,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') if (eregi('([^\\\/:]+)$',$_FILES["logo"]["name"],$reg)) { $original_file=$reg[1]; - + $isimage=image_format_supported($original_file); if ($isimage >= 0) { @@ -70,7 +70,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') if (dol_move_uploaded_file($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file,1) > 0) { dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file); - + // Create thumbs of logo if ($isimage > 0) { @@ -143,7 +143,7 @@ if ($_GET["action"] == 'addthumb') dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall); } else dolibarr_syslog($imgThumbSmall); - + // Création de la vignette de la page "Société/Institution" $imgThumbMini = vignette($conf->societe->dir_logos.'/'.$_GET["file"], 100, 30, '_mini',80); if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbMini,$reg)) @@ -274,11 +274,14 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit') print '
'; print ''; print ''; - if ($mysoc->logo_mini && file_exists($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_mini)) + if ($mysoc->logo_mini) { print ''.img_delete($langs->trans("Delete")).''; - print '   '; - print ''; + if (file_exists($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_mini)) + { + print '   '; + print ''; + } } else { diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 63c738faf93..7ca12a447df 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke diff --git a/htdocs/html.formfile.class.php b/htdocs/html.formfile.class.php index 0c7aa04df78..1d8946aaf14 100644 --- a/htdocs/html.formfile.class.php +++ b/htdocs/html.formfile.class.php @@ -58,23 +58,23 @@ class FormFile global $conf,$langs; print "\n\n\n"; - + if (! $titre) $titre=$langs->trans("AttachANewFile"); print_titre($titre); print '
'; print ''; - + print ''; print '
'; - + $max=$conf->global->MAIN_UPLOAD_DOC; // En Kb $maxphp=@ini_get('upload_max_filesize'); // En inconnu if (eregi('m$',$maxphp)) $maxphp=$maxphp*1024; if (eregi('k$',$maxphp)) $maxphp=$maxphp; // Now $max and $maxphp are in Kb if ($maxphp > 0) $max=min($max,$maxphp); - + if ($max > 0) { print ''; @@ -86,13 +86,13 @@ class FormFile print 'global->MAIN_UPLOAD_DOC)?' disabled="true"':''); print '>'; - + if ($addcancel) { print '   '; print ''; } - + if (! empty($conf->global->MAIN_UPLOAD_DOC)) { print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb"); @@ -108,7 +108,7 @@ class FormFile print ''; if (empty($sectionid)) print '
'; - + print "\n\n\n"; return 1; @@ -128,7 +128,7 @@ class FormFile * \param forcenomultilang N'affiche pas option langue meme si MAIN_MULTILANGS defini * \param iconPDF N'affiche que l'icone PDF avec le lien (1/0) * \param maxfilenamelength Max length for filename shown - * \param noform Do not output html form start and end + * \param noform Do not output html form start and end * \param param More param on http links * \remarks Le fichier de facture detaillee est de la forme * REFFACTURE-XXXXXX-detail.pdf ou XXXXX est une forme diverse @@ -138,7 +138,7 @@ class FormFile { // filedir = conf->...dir_ouput."/".get_exdir(id) include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php'); - + global $langs,$bc,$conf; $var=true; @@ -273,7 +273,7 @@ class FormFile else if ($modulepart == 'unpayed') { $modellist=''; - } + } else { dolibarr_print_error($this->db,'Bad value for modulepart'); @@ -284,10 +284,10 @@ class FormFile $html = new Form($db); $texte=$langs->trans('Generate'); - + if (empty($noform)) print '
'; print ''; - + print_titre($langs->trans("BuildDocuments")); print ''; @@ -343,7 +343,7 @@ class FormFile foreach($file_list as $i => $file) { $var=!$var; - + // Defini chemin relatif par rapport au module pour lien download $relativepath=$file["name"]; // Cas general if ($filename) $relativepath=$filename."/".$file["name"]; // Cas propal, facture... @@ -417,7 +417,7 @@ class FormFile global $user, $conf, $langs; global $bc; global $sortfield, $sortorder; - + // Affiche liste des documents existant if (empty($useinecm)) print_titre($langs->trans("AttachedFiles")); else { $bc[true]=''; $bc[false]=''; }; @@ -466,7 +466,7 @@ class FormFile print "\n"; } } - if (sizeof($filearray) == 0) + if (sizeof($filearray) == 0) { print '
'; if (empty($textifempty)) print $langs->trans("NoFileFound"); diff --git a/htdocs/includes/modules/commande/pdf_edison.modules.php b/htdocs/includes/modules/commande/pdf_edison.modules.php index 224a8471224..9972dd6a721 100644 --- a/htdocs/includes/modules/commande/pdf_edison.modules.php +++ b/htdocs/includes/modules/commande/pdf_edison.modules.php @@ -395,9 +395,10 @@ class pdf_edison extends ModelePDFCommandes $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } } - else if (defined("FAC_PDF_INTITULE")) + else { - $pdf->MultiCell(100, 4, FAC_PDF_INTITULE, 0, 'L'); + $text=$this->emetteur->nom; + $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } $pdf->SetFont('Arial','B',13); diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 54d478a4011..180739753d4 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -752,9 +752,10 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } } - else if (defined("FAC_PDF_INTITULE")) + else { - $pdf->MultiCell(100, 4, FAC_PDF_INTITULE, 0, 'L'); + $text=$this->emetteur->nom; + $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } $pdf->SetFont('Arial','B',13); diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php index b833acad6c4..ee623c6e5f8 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php @@ -355,7 +355,11 @@ Class pdf_expedition_merou extends ModelePdfExpedition $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L'); } } - else $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L'); + else + { + $text=$this->emetteur->nom; + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($text), 0, 'L'); + } //*********************Entete**************************** //Nom du Document diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index cda714bac95..e204e235e60 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -925,9 +925,10 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } } - else if (defined("FAC_PDF_INTITULE")) + else { - $pdf->MultiCell(100, 4, FAC_PDF_INTITULE, 0, 'L'); + $text=$this->emetteur->nom; + $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } $pdf->SetFont('Arial','B',13); diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index 5b9dc820525..1d8e3725de1 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -810,9 +810,10 @@ class pdf_oursin extends ModelePDFFactures $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } } - else if (defined("FAC_PDF_INTITULE")) + else { - $pdf->MultiCell(80, 6, FAC_PDF_INTITULE, 0, 'L'); + $text=$this->emetteur->nom; + $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } diff --git a/htdocs/includes/modules/propale/modules_propale.php b/htdocs/includes/modules/propale/modules_propale.php index 30272f2e4a6..7176311a057 100644 --- a/htdocs/includes/modules/propale/modules_propale.php +++ b/htdocs/includes/modules/propale/modules_propale.php @@ -59,6 +59,7 @@ class ModelePDFPropales extends FPDF $sql.=" FROM ".MAIN_DB_PREFIX."document_model"; $sql.=" WHERE type = '".$type."'"; + dolibarr_syslog("modules_propale::liste_modeles sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 50259f579ca..9da9868a765 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -779,9 +779,10 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L'); } } - else if (defined("FAC_PDF_INTITULE")) + else { - $pdf->MultiCell(100, 4, FAC_PDF_INTITULE, 0, 'L'); + $text=$this->emetteur->nom; + $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } $pdf->SetFont('Arial','B',13); diff --git a/mysql/migration/2.5.0-2.6.0.sql b/mysql/migration/2.5.0-2.6.0.sql index 435ebb5e338..23a30259de9 100644 --- a/mysql/migration/2.5.0-2.6.0.sql +++ b/mysql/migration/2.5.0-2.6.0.sql @@ -79,6 +79,8 @@ delete from llx_categorie_association where fk_categorie_mere = fk_categorie_fil alter table llx_societe add price_level tinyint(4) NULL; +delete from llx_document_model where nom = 'huitre' and type = 'invoice'; + -- V4.1 delete from llx_projet_task where fk_projet not in (select rowid from llx_projet); -- V4.1 ALTER TABLE llx_projet_task ADD CONSTRAINT fk_projet_task_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);