From c31c40a61e5cfee694a87b7677d09b0f2d61ffe7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 12:10:55 +0200 Subject: [PATCH 01/40] Fix: Force mainmenu. This does not solve completely bug of eaccelerator but provide a way to have access to system menu to help to diagnose. --- htdocs/core/menus/standard/eldy.lib.php | 80 ++++++++++++------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 725723bb45a..dd0e8bb911f 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -652,67 +652,67 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) $langs->load("help"); // Setup - $newmenu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup'); + $newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", $langs->trans("Setup"), 0, 1, '', $mainmenu, 'setup'); if ($leftmenu=="setup") { - $newmenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"),1); - $newmenu->add("/admin/modules.php", $langs->trans("Modules"),1); - $newmenu->add("/admin/menus.php", $langs->trans("Menus"),1); - $newmenu->add("/admin/ihm.php", $langs->trans("GUISetup"),1); + $newmenu->add("/admin/company.php?mainmenu=home", $langs->trans("MenuCompanySetup"),1); + $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules"),1); + $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1); + $newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1); if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES'))) { if ($leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1); } - $newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1); - $newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1); - $newmenu->add("/admin/proxy.php", $langs->trans("Security"),1); - $newmenu->add("/admin/limits.php", $langs->trans("MenuLimits"),1); - $newmenu->add("/admin/pdf.php", $langs->trans("PDF"),1); - $newmenu->add("/admin/mails.php", $langs->trans("Emails"),1); - $newmenu->add("/admin/sms.php", $langs->trans("Sms"),1); - $newmenu->add("/admin/dict.php", $langs->trans("DictionnarySetup"),1); - $newmenu->add("/admin/const.php", $langs->trans("OtherSetup"),1); + $newmenu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"),1); + $newmenu->add("/admin/delais.php?mainmenu=home",$langs->trans("Alerts"),1); + $newmenu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"),1); + $newmenu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"),1); + $newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"),1); + $newmenu->add("/admin/mails.php?mainmenu=home", $langs->trans("Emails"),1); + $newmenu->add("/admin/sms.php?mainmenu=home", $langs->trans("Sms"),1); + $newmenu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionnarySetup"),1); + $newmenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"),1); } // System info - $newmenu->add("/admin/system/index.php?leftmenu=system", $langs->trans("SystemInfo"), 0, 1, '', $mainmenu, 'system'); + $newmenu->add("/admin/system/index.php?mainmenu=home&leftmenu=system", $langs->trans("SystemInfo"), 0, 1, '', $mainmenu, 'system'); if ($leftmenu=="system") { - $newmenu->add("/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1); - $newmenu->add("/admin/system/constall.php", $langs->trans("AllParameters"),2); - $newmenu->add("/admin/system/modules.php", $langs->trans("Modules"),2); - $newmenu->add("/admin/triggers.php", $langs->trans("Triggers"),2); - $newmenu->add("/admin/system/about.php", $langs->trans("About"),2); - $newmenu->add("/admin/system/os.php", $langs->trans("OS"),1); - $newmenu->add("/admin/system/web.php", $langs->trans("WebServer"),1); - $newmenu->add("/admin/system/phpinfo.php", $langs->trans("Php"),1); + $newmenu->add("/admin/system/dolibarr.php?mainmenu=home", $langs->trans("Dolibarr"),1); + $newmenu->add("/admin/system/constall.php?mainmenu=home", $langs->trans("AllParameters"),2); + $newmenu->add("/admin/system/modules.php?mainmenu=home", $langs->trans("Modules"),2); + $newmenu->add("/admin/triggers.php?mainmenu=home", $langs->trans("Triggers"),2); + $newmenu->add("/admin/system/about.php?mainmenu=home", $langs->trans("About"),2); + $newmenu->add("/admin/system/os.php?mainmenu=home", $langs->trans("OS"),1); + $newmenu->add("/admin/system/web.php?mainmenu=home", $langs->trans("WebServer"),1); + $newmenu->add("/admin/system/phpinfo.php?mainmenu=home", $langs->trans("Php"),1); //if (function_exists('xdebug_is_enabled')) $newmenu->add("/admin/system/xdebug.php", $langs->trans("XDebug"),1); - $newmenu->add("/admin/system/database.php", $langs->trans("Database"),1); - $newmenu->add("/admin/system/database-tables.php", $langs->trans("Tables"),2); - $newmenu->add("/admin/system/database-tables-contraintes.php", $langs->trans("Constraints"),2); + $newmenu->add("/admin/system/database.php?mainmenu=home", $langs->trans("Database"),1); + $newmenu->add("/admin/system/database-tables.php?mainmenu=home", $langs->trans("Tables"),2); + $newmenu->add("/admin/system/database-tables-contraintes.php?mainmenu=home", $langs->trans("Constraints"),2); } // System info - $newmenu->add("/admin/tools/index.php?leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); + $newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("SystemTools"), 0, 1, '', $mainmenu, 'admintools'); if ($leftmenu=="admintools") { - $newmenu->add("/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1); - $newmenu->add("/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1); - $newmenu->add("/admin/tools/update.php", $langs->trans("MenuUpgrade"),1); - if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php", $langs->trans("EAccelerator"),1); - $newmenu->add("/admin/tools/listevents.php", $langs->trans("Audit"),1); - $newmenu->add("/admin/tools/listsessions.php", $langs->trans("Sessions"),1); - $newmenu->add("/admin/tools/purge.php", $langs->trans("Purge"),1); - $newmenu->add("/support/index.php", $langs->trans("HelpCenter"),1,1,'targethelp'); + $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1); + $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1); + $newmenu->add("/admin/tools/update.php?mainmenu=home", $langs->trans("MenuUpgrade"),1); + if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home", $langs->trans("EAccelerator"),1); + $newmenu->add("/admin/tools/listevents.php?mainmenu=home", $langs->trans("Audit"),1); + $newmenu->add("/admin/tools/listsessions.php?mainmenu=home", $langs->trans("Sessions"),1); + $newmenu->add("/admin/tools/purge.php?mainmenu=home", $langs->trans("Purge"),1); + $newmenu->add("/support/index.php?mainmenu=home", $langs->trans("HelpCenter"),1,1,'targethelp'); } } - $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, 1, '', $mainmenu, 'users'); + $newmenu->add("/user/home.php?mainmenu=home&leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, 1, '', $mainmenu, 'users'); if ($leftmenu=="users") { - $newmenu->add("/user/index.php", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); - $newmenu->add("/user/fiche.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin); - $newmenu->add("/user/group/index.php", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin); - $newmenu->add("/user/group/fiche.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin); + $newmenu->add("/user/index.php?mainmenu=home", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); + $newmenu->add("/user/fiche.php?action=create?mainmenu=home", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin); + $newmenu->add("/user/group/index.php?mainmenu=home", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin); + $newmenu->add("/user/group/fiche.php?mainmenu=home&action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin); } } From 8e9f3cabf3ae7c677a5dae136043660bbdc0afa4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 12:44:52 +0200 Subject: [PATCH 02/40] Fix: left menu for home menu --- htdocs/core/menus/standard/eldy.lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index dd0e8bb911f..a808d6ee75d 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -706,13 +706,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) } } - $newmenu->add("/user/home.php?mainmenu=home&leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, 1, '', $mainmenu, 'users'); + $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, 1, '', $mainmenu, 'users'); if ($leftmenu=="users") { - $newmenu->add("/user/index.php?mainmenu=home", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); - $newmenu->add("/user/fiche.php?action=create?mainmenu=home", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin); - $newmenu->add("/user/group/index.php?mainmenu=home", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin); - $newmenu->add("/user/group/fiche.php?mainmenu=home&action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin); + $newmenu->add("/user/index.php", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin); + $newmenu->add("/user/fiche.php?action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin); + $newmenu->add("/user/group/index.php", $langs->trans("Groups"), 1, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin); + $newmenu->add("/user/group/fiche.php?action=create", $langs->trans("NewGroup"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin); } } From cb8b5188be77bc1b17dd937d02aae64b13248328 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:07:53 +0200 Subject: [PATCH 03/40] Change to help to fight the mainmenu lost bug. --- htdocs/core/class/menubase.class.php | 2 +- htdocs/core/menus/standard/auguria.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 50f906b1118..584b47a794a 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -411,7 +411,7 @@ class Menubase * Load entries found in database in a menu array. * * @param array $newmenu Menu array to complete (in most cases, it's empty, may be already initialized with some menu manager like eldy) - * @param string $mymainmenu Value for mainmenu to filter menu to load (often $_SESSION['mainmenu']) + * @param string $mymainmenu Value for mainmenu to filter menu to load (often $_SESSION["mainmenu"]) * @param string $myleftmenu Value for leftmenu to filter menu to load (always '') * @param int $type_user Filter on type of user (0=Internal,1=External,2=All) * @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...) diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index de947d7edc3..8023c202f56 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -77,7 +77,7 @@ function print_auguria_menu($db,$atarget,$type_user) // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION['mainmenu']) && $newTabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"'; + else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; print_start_menu_entry_auguria($idsel); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index a808d6ee75d..e249311631f 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -472,7 +472,7 @@ function print_eldy_menu($db,$atarget,$type_user) // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; - else if (! empty($_SESSION['mainmenu']) && $newTabMenu[$i]['mainmenu'] == $_SESSION['mainmenu']) $classname='class="tmenusel"'; + else if (! empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname='class="tmenusel"'; else $classname='class="tmenu"'; print_start_menu_entry($idsel); From 5580a4cc30800c1ffa71198869eb82dbc9e4109f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:23:57 +0200 Subject: [PATCH 04/40] Fix: Missing translation --- htdocs/admin/commande.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 569ac1b8b69..da441327e5b 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'); $langs->load("admin"); $langs->load("errors"); +$langs->load("orders"); if (! $user->admin) accessforbidden(); From 91b8f33ea556e2d1da4e980425635e07550281e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:36:51 +0200 Subject: [PATCH 05/40] Fix: textarea field was not detected --- htdocs/core/class/html.form.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b34ea5a2b2e..fc0b7d09d63 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -189,8 +189,8 @@ class Form else { if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); + elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); - elseif ($typeofdata == 'text' || $typeofdata == 'textarea') $ret.=dol_htmlentitiesbr($value); else if (preg_match('/^select;/',$typeofdata)) { $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); @@ -2887,7 +2887,7 @@ class Form function load_cache_vatrates($country_code) { global $langs; - + if (count($this->cache_vatrates)) return 0; // Cache deja charge $sql = "SELECT DISTINCT t.taux, t.recuperableonly"; @@ -3391,7 +3391,7 @@ class Form function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0, $disabled=0) { global $langs; - + if ($value_as_key) $array=array_combine($array, $array); $out='"; return $out; } - + /** * Show a multiselect form from an array. * @@ -3474,7 +3474,7 @@ class Form } } } - + if (! empty($array)) { foreach ($array as $key => $value) @@ -3497,7 +3497,7 @@ class Form $out.= ' selected="selected"'; } $out.= '>'; - + $newval = ($translate ? $langs->trans(ucfirst($value)) : $value); $newval = ($key_in_label ? $key.' - '.$newval : $newval); $out.= dol_htmlentitiesbr($newval); @@ -3506,7 +3506,7 @@ class Form } } $out.= ''."\n"; - + return $out; } From 907c7f748d65b329fe10266f20a75859ebbf97e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:41:55 +0200 Subject: [PATCH 06/40] Fix: Bad CR for public note. Must work when text is full text with \n and also when text is HTML with br. --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 4 ++-- .../modules/expedition/doc/pdf_expedition_rouget.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 2 +- htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php | 2 +- htdocs/core/modules/project/pdf/pdf_baleine.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_jaune.modules.php | 2 +- .../core/modules/supplier_invoice/pdf/pdf_canelle.modules.php | 2 +- .../core/modules/supplier_order/pdf/pdf_muscadet.modules.php | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index b6f0408c494..4c4697a8bbf 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -235,7 +235,7 @@ class pdf_einstein extends ModelePDFCommandes $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -309,7 +309,7 @@ class pdf_einstein extends ModelePDFCommandes if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100; if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100; if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100; - + $vatrate=(string) $object->lines[$i]->tva_tx; $localtax1rate=(string) $object->lines[$i]->localtax1_tx; $localtax2rate=(string) $object->lines[$i]->localtax2_tx; diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php index 554a6a6887d..050e6bd5b83 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php @@ -195,7 +195,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); } $nexY = $pdf->GetY(); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index bed8f2d784b..5cd9b1f699a 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 5807a8b5efa..a8117d80cfe 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -185,7 +185,7 @@ class pdf_soleil extends ModelePDFFicheinter $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index a24c480e39b..05da0f4bed4 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -213,7 +213,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php index 70e948178ba..b34d3b9a6fc 100644 --- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php @@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxref-1, $tab_top-2, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxref-1, $tab_top-2, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-($tab_top-2); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index f67af8c43c5..6ad16f9b993 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -222,7 +222,7 @@ class pdf_azur extends ModelePDFPropales $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php index 705df1cd9b1..bccdc8342be 100644 --- a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php @@ -222,7 +222,7 @@ class pdf_jaune extends ModelePDFPropales $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index dc49c2566bd..ab822e7fe53 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -228,7 +228,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index a999e435111..ea2a71ba41f 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -241,7 +241,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $tab_top = 88; $pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages - $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; @@ -1008,7 +1008,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { $carac_client_name=$outputlangs->convToOutputCharset($object->client->name); } - + $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target'); // Show recipient From 216df5ad0712512525807cef31378f4ec1dbc4fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:46:40 +0200 Subject: [PATCH 07/40] Fix: Add hidden option to restore lost feature. --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 80018d53d5b..b1c8d801aef 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -214,7 +214,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if ($sourcecompany->state_id && empty($sourcecompany->departement)) $sourcecompany->departement=getState($sourcecompany->state_id); if ($targetcompany->state_id && empty($targetcompany->departement)) $targetcompany->departement=getState($targetcompany->state_id); - if ($mode == 'source') + if ($mode == 'source' || ! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS)) { $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n"; From e503b2d85892821f415ec0628b238204fac0e495 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:50:23 +0200 Subject: [PATCH 08/40] Fix: Field must be reset after adding. --- htdocs/comm/propal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e20d67c95ab..9c257299a01 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -834,6 +834,7 @@ else if ($action == "addline" && $user->rights->propale->creer) unset($_POST['np_price']); unset($_POST['dp_desc']); unset($_POST['np_tva_tx']); + unset($_POST['np_desc']); } else { @@ -2028,7 +2029,7 @@ else print ''; print $companystatic->getNomUrl(1,'customer'); print ''; - + // Customer ref print ''; print $objp->ref_client; From eff43a8e0cdc4b5a5c4ab7868fbf469aa1340355 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 13:59:35 +0200 Subject: [PATCH 09/40] Fix: wrong encoding of special chars --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index b1c8d801aef..a8c07cf0b5d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -858,7 +858,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl if ( empty($hideref) ) { - if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->trans("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref + if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref else $ref_prodserv = $prodser->ref; // Show local ref only $ref_prodserv .= " - "; From ab80f6aaa71964e3e7e35c603df9b70b94cb72a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 14:06:59 +0200 Subject: [PATCH 10/40] Fix: Can clone a proposal --- htdocs/comm/propal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 9c257299a01..3fdf2e22d12 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1147,7 +1147,7 @@ if ($id > 0 || ! empty($ref)) //'text' => $langs->trans("ConfirmClone"), //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=3)')) + array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOST('socid','int'),'socid','(s.client=1 OR s.client=2 OR s.client=3)')) ); // Paiement incomplet. On demande si motif = escompte ou autre $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1); From db53aa53b6195cc41136a928bfdf77821e1fbdba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 14:24:02 +0200 Subject: [PATCH 11/40] Fix: Lines useless --- htdocs/public/agenda/agendaexport.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index a46b87b2ea4..a08bdad1814 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -55,9 +55,6 @@ require_once(DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'); // Security check if (! $conf->agenda->enabled) accessforbidden('',1,1,1); -$mainmenu=isset($_GET["mainmenu"])?$_GET["mainmenu"]:""; -$leftmenu=isset($_GET["leftmenu"])?$_GET["leftmenu"]:""; - // Define format, type and filter $format='ical'; $type='event'; From 52f324002c8090d2f395958c9f7da7cf2d782983 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 14:39:20 +0200 Subject: [PATCH 12/40] Add log to try to find the mainmenu lost bug. --- htdocs/core/menus/standard/eldy.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e249311631f..93fb91deaf6 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -582,15 +582,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) if (isset($_GET["mainmenu"])) { // On sauve en session le menu principal choisi - $mainmenu=$_GET["mainmenu"]; - $_SESSION["mainmenu"]=$mainmenu; + $_SESSION["mainmenu"]=$_GET["mainmenu"]; $_SESSION["leftmenuopened"]=""; + $mainmenu=$_GET["mainmenu"]; } else { // On va le chercher en session si non defini par le lien $mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:''; } + //print 'mainmenu='.$mainmenu.' SESSION='.$_SESSION["mainmenu"]; if (isset($_GET["leftmenu"])) { From 32339b03fd50ed296414330be1754cdaa5b046cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 14:48:40 +0200 Subject: [PATCH 13/40] Add log to try to find the mainmenu lost bug. --- htdocs/core/menus/standard/eldy.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e249311631f..08c00b66f9a 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -582,15 +582,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) if (isset($_GET["mainmenu"])) { // On sauve en session le menu principal choisi - $mainmenu=$_GET["mainmenu"]; - $_SESSION["mainmenu"]=$mainmenu; + $_SESSION["mainmenu"]=$_GET["mainmenu"]; $_SESSION["leftmenuopened"]=""; + $mainmenu=$_GET["mainmenu"]; } else { // On va le chercher en session si non defini par le lien $mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:''; } + //print 'mainmenu='.$mainmenu.' SESSION='.$_SESSION["mainmenu"].' GLOBAL='.$GLOBALS["mainmenu"]; if (isset($_GET["leftmenu"])) { From 3a2caa3e469099a2e3d7a4bdca3c2cef40423d20 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 Apr 2012 20:38:49 +0200 Subject: [PATCH 14/40] Fix: Try a fix for the lost mainmenu session. --- htdocs/main.inc.php | 11 +++++++++-- htdocs/paypal/lib/paypalfunctions.lib.php | 13 +++++++++++-- htdocs/user/passwordforgotten.php | 2 -- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 56d97ff11fc..d10a9e91706 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -163,6 +163,13 @@ $sessiontimeout='DOLSESSTIMEOUT_'.$prefix; if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]); session_name($sessionname); session_start(); +if (ini_get('register_globals')) // To solve bug in using $_SESSION +{ + foreach ($_SESSION as $key=>$value) + { + if (isset($GLOBALS[$key])) unset($GLOBALS[$key]); + } +} // Init the 5 global objects // This include will set: $conf, $db, $langs, $user, $mysoc objects @@ -433,7 +440,7 @@ if (! defined('NOLOGIN')) dol_syslog('User not found, connexion refused'); session_destroy(); session_name($sessionname); - session_start(); + session_start(); // Fixing the bug of register_globals here is useless since session is empty if ($resultFetchUser == 0) { @@ -475,7 +482,7 @@ if (! defined('NOLOGIN')) dol_syslog("Can't load user even if session logged. _SESSION['dol_login']=".$login, LOG_WARNING); session_destroy(); session_name($sessionname); - session_start(); + session_start(); // Fixing the bug of register_globals here is useless since session is empty if ($resultFetchUser == 0) { diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index bcd995e436d..07e0e2bbb3f 100755 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -22,8 +22,17 @@ * \brief Page with Paypal init var. */ -if (session_id() == "") session_start(); - +if (session_id() == "") +{ + session_start(); + if (ini_get('register_globals')) // To solve bug in using $_SESSION + { + foreach ($_SESSION as $key=>$value) + { + if (isset($GLOBALS[$key])) unset($GLOBALS[$key]); + } + } +} // ================================== // PayPal Express Checkout Module diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 2becad4f564..2ed1576328f 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -70,8 +70,6 @@ if ($action == 'validatenewpassword' && $username && $passwordmd5) { $newpassword=$edituser->setPassword($user,$edituser->pass_temp,0); dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); - //session_start(); - //$_SESSION["loginmesg"]=$langs->trans("PasswordChanged"); header("Location: ".DOL_URL_ROOT.'/'); exit; } From 2b77a99fa3caf9c2e2890cfb1c534397711a8bf7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Apr 2012 19:12:20 +0200 Subject: [PATCH 15/40] Fix: [ bug #372 ] Upgrade error from 3.1.0 to 3.2.0 Beta --- htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index b5ccfefeb4a..e35611107a5 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -213,9 +213,11 @@ ALTER TABLE llx_paiement ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowi ALTER TABLE llx_product_price ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid; -- Restore foreign key (on llx_expedition_methode before) on correct table (llx_c_shipment_mode) +UPDATE llx_expedition SET fk_expedition_methode = null WHERE fk_expedition_methode NOT IN (SELECT rowid FROM llx_c_shipment_mode); ALTER TABLE llx_expedition DROP FOREIGN KEY fk_expedition_fk_expedition_methode; ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_expedition_methode FOREIGN KEY (fk_expedition_methode) REFERENCES llx_c_shipment_mode (rowid); + -- VMYSQL4.1 UPDATE llx_chargesociales set tms = date_creation WHERE tms = '0000-00-00 00:00:00'; ALTER TABLE llx_propal MODIFY fk_projet integer DEFAULT NULL; From d390f3137f8f8b52d5296d2eca9069429dc2751c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Apr 2012 19:44:05 +0200 Subject: [PATCH 16/40] Fix: [ bug #367 ] "Multi-tiers" fonctionality inverted in project contacts. --- htdocs/core/class/html.formcompany.class.php | 2 +- htdocs/projet/contact.php | 10 +++++----- htdocs/projet/fiche.php | 6 ++++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 52c0ce52e5f..8999341513e 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -506,7 +506,7 @@ class FormCompany * @param string $var_id Name of id field * @param string $selected Pre-selected third party * @param string $htmlname Name of HTML form - * @param string $limitto Disable answers that are not id in this array list + * @param array $limitto Disable answers that are not id in this array list * @param int $forceid This is to force antoher object id than object->id * @return void * TODO obsolete ? diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index d7f501e0a0f..f1fe6eb5c55 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -248,8 +248,8 @@ if ($id > 0 || ! empty($ref)) print ''; // Line to add external contact. Only if project is linked to a third party. - if ($project->societe->id) - { + //if ($project->societe->id) + //{ print '
'; print ''; print ''; @@ -265,12 +265,12 @@ if ($id > 0 || ! empty($ref)) print ''; $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id; - $selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany'); + $selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany', (empty($project->societe->id)?array():array($project->societe->id))); print ''; print ''; $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid'); - if ($nbofcontacts == 0) print $langs->trans("NoContactDefined"); + //if ($nbofcontacts == 0) print $langs->trans("NoContactDefined"); print ''; print ''; $formcompany->selectTypeContact($project, '', 'type','external','rowid'); @@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref)) print ''; print "
"; - } + //} print ' '; } diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index edc44e5e7fd..925f93e0465 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -416,7 +416,9 @@ else // Customer print ''.$langs->trans("Company").''; - print $form->select_company($project->societe->id,'socid','',1,1); + $text=$form->select_company($project->societe->id,'socid','',1,1); + $texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty"); + print $form->textwithtooltip($text.' '.img_help(),$texthelp,1); print ''; // Visibility @@ -449,7 +451,7 @@ else print '

'; print '   '; print '
'; - + print ''; } else From 2515d27d197868003a4a8a31c04df4bf3f9d7905 Mon Sep 17 00:00:00 2001 From: simnandez Date: Sun, 22 Apr 2012 18:17:16 +0200 Subject: [PATCH 17/40] Update ChangeLog with fixes --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8f70155e56f..2a7e27221d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -66,6 +66,8 @@ For users: - Fix: Can use POS module with several concurrent users. - Fix: Installer don't fails with Mysql version that added a ssl_cypher field. - Fix: Sanitize input parameters. +- Fix: [ bug #368 ] Product list +- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills For developers: - New: Can add a left menu into an existing top menu or left menu. From 455789d575a7c27cec7fa705637093ab7e81d648 Mon Sep 17 00:00:00 2001 From: FHenry Date: Fri, 20 Apr 2012 15:48:48 +0200 Subject: [PATCH 18/40] Remove Eclipse Warning (Undeclare variable) --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index fc0b7d09d63..2269febfcc5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2915,7 +2915,7 @@ class Form } else { - $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$code_pays).''; + $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$country_code).''; return -1; } } From d5b21a05b2c5b241d6d6a9dd104382ca0d3c473d Mon Sep 17 00:00:00 2001 From: FHenry Date: Fri, 20 Apr 2012 15:54:37 +0200 Subject: [PATCH 19/40] Remove Eclipse variable warning --- htdocs/core/modules/fichinter/modules_fichinter.php | 2 +- .../core/modules/supplier_invoice/pdf/pdf_canelle.modules.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index de1a1c79ee2..edd5be4401a 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -156,7 +156,7 @@ abstract class ModeleNumRefFicheinter */ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { - global $conf,$langs; + global $conf,$langs,$user; $langs->load("ficheinter"); $error=0; diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index ab822e7fe53..a4c2ca9b592 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -398,7 +398,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->Output($file,'F'); // Actions on extra fields (by external module or standard code) - if (! is_object($hookmanager)) + if (!is_object($hookmanager)) { include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); $hookmanager=new HookManager($this->db); From 58df839271d178391fc0cb356b8438cdf8bc5308 Mon Sep 17 00:00:00 2001 From: FHenry Date: Wed, 25 Apr 2012 18:36:58 +0200 Subject: [PATCH 20/40] Rename global variable from MAIN_SOCIETE_UNSUBSCRIBE to MAILING_EMAIL_UNSUBSCRIBE to be reliable on dolibarr implementation Conflicts: htdocs/admin/mailing.php --- htdocs/admin/mailing.php | 21 +++++++++++++++++++ htdocs/comm/mailing/fiche.php | 6 +++--- htdocs/public/emailing/mailing-read.php | 2 +- .../public/emailing/mailing-unsubscribe.php | 2 +- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index bad34ac83b2..4aa0ea209f7 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -49,6 +49,8 @@ if ($action == 'setvalue' && $user->admin) if (! $res > 0) $error++; $res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; + $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; if (! $error) { @@ -101,6 +103,25 @@ print ''; +$var=!$var; +print ''; +print $langs->trans("ActivateCheckRead").''; +if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1) +{ + print ''; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; +} +else +{ + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ''; +} +print ''; + + + print ''; print ''; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 5f02441159c..d0708c96db5 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -57,7 +57,7 @@ $substitutionarray=array( '__SIGNATURE__' => 'Signature', '__PERSONALIZED__' => 'Personalized' ); -if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) +if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) { $substitutionarray=array_merge( $substitutionarray, @@ -81,7 +81,7 @@ $substitutionarrayfortest=array( '__SIGNATURE__' => 'TESTSignature', '__PERSONALIZED__' => 'TESTPersonalized' ); -if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) +if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) { $substitutionarrayfortest=array_merge( $substitutionarrayfortest, @@ -1043,7 +1043,7 @@ else print '
'.$langs->trans("CommonSubstitutions").':
'; print '__ID__ = '.$langs->trans("IdRecord").'
'; print '__EMAIL__ = '.$langs->trans("EMail").'
'; - if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) + if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE) { print '__CHECK_READ__ = '.$langs->trans("CheckRead").'
'; print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'
'; diff --git a/htdocs/public/emailing/mailing-read.php b/htdocs/public/emailing/mailing-read.php index 0576b7dd614..91267cd6628 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -32,7 +32,7 @@ require("../../main.inc.php"); $id=GETPOST('tag'); -if (empty($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)) accessforbidden('Option not enabled'); +if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled'); /* diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index 3d361b10e3c..ac261268a58 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -39,7 +39,7 @@ $langs->load("mails"); $id=GETPOST('tag'); $unsuscrib=GETPOST('unsuscrib'); -if (empty($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)) accessforbidden('Option not enabled'); +if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled'); /* From fa0e1ca87e8dccf7bc5b75602da34125f5c0d7a9 Mon Sep 17 00:00:00 2001 From: FHenry Date: Tue, 24 Apr 2012 16:15:46 +0200 Subject: [PATCH 21/40] remove useless line --- htdocs/projet/class/project.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 619ff6f0807..9d127f202b8 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -736,7 +736,6 @@ class Project extends CommonObject $this->id = 0; $this->ref = 'SPECIMEN'; $this->specimen = 1; - $socid = rand(1, $num_socs); $this->socid = 1; $this->date_c = $now; $this->date_m = $now; From 6e84b8ca63b4dca0da2f4fbb417ea4ae4768c6fe Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 26 Apr 2012 08:50:39 +0200 Subject: [PATCH 22/40] Fix: Bad include --- htdocs/compta/prelevement/class/bon-prelevement.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/class/bon-prelevement.class.php b/htdocs/compta/prelevement/class/bon-prelevement.class.php index c75d6fc70b8..6468c846bcb 100644 --- a/htdocs/compta/prelevement/class/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/class/bon-prelevement.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2012 Juanjo Menent * * 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 @@ -27,7 +27,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'); -if ($conf->esaeb->enabled) require_once(DOL_DOCUMENT_ROOT.'/esaeb/class/esaeb19.class.php'); +if ($conf->esaeb->enabled) dol_include_once('/esaeb/class/esaeb19.class.php'); /** From 0092f1bc89749429262ab1844b6de75f873c4a3d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 26 Apr 2012 10:29:46 +0200 Subject: [PATCH 23/40] Fix: problem of line break between label and description when using fckeditor --- htdocs/core/lib/pdf.lib.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a8c07cf0b5d..8469ca9b931 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -807,7 +807,11 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl // Description long of product line if ($desc && ($desc != $label)) { - if ( $libelleproduitservice && empty($hidedesc) ) $libelleproduitservice.="\n"; + if ($libelleproduitservice && empty($hidedesc)) + { + if ($conf->global->FCKEDITOR_ENABLE_DETAILS) $libelleproduitservice.='
'; + else $libelleproduitservice.="\n"; + } if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) { @@ -827,7 +831,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl { if ($idprod) { - if ( empty($hidedesc) ) $libelleproduitservice.=$desc; + if (empty($hidedesc)) $libelleproduitservice.=$desc; } else { @@ -846,7 +850,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl $ref_prodserv = ""; if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this { - if($prodser->isservice()) + if ($prodser->isservice()) { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Service")." "; } @@ -856,7 +860,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl } } - if ( empty($hideref) ) + if (empty($hideref)) { if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref else $ref_prodserv = $prodser->ref; // Show local ref only From 99006125fdf7c0344749b27cad445fb0a221f051 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 14:57:16 +0200 Subject: [PATCH 24/40] Fix: export of print sheets --- htdocs/adherents/cartes/carte.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index e0b8fca05e7..8e753cbfa34 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -153,7 +153,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg } // Build and output PDF - if (empty($mode) || $mode=='card' || $mode='cardlogin') + if (empty($mode) || $mode=='card' || $mode=='cardlogin') { if (! count($arrayofmembers)) { From 3918335bf7050acec2bf14f90c609e1e7e734785 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 15:32:48 +0200 Subject: [PATCH 25/40] No new feature into a beta. Also this feature is a security hole for the moment, so it should not be enabled as a common default feautre but must be kept hidden. --- htdocs/admin/mailing.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 4aa0ea209f7..a66eb7509a8 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -41,17 +41,17 @@ $action = GETPOST('action','alpha'); if ($action == 'setvalue' && $user->admin) { $db->begin(); - + $mailfrom = GETPOST('MAILING_EMAIL_FROM','alpha'); $mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha'); - + $res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; $res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - + if (! $error) { $db->commit(); @@ -103,6 +103,7 @@ print ''; +/* $var=!$var; print ''; print $langs->trans("ActivateCheckRead").''; @@ -119,14 +120,14 @@ else print ''; } print ''; - +*/ print ''; print ''; -$db->close(); llxFooter(); +$db->close(); ?> From 9200847eaa59a182b41a80cd278f6404f7f0e305 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 15:44:04 +0200 Subject: [PATCH 26/40] Fix: Try a better fix. Format of content of table should depend of content and output rules and not on how data was input. --- htdocs/core/lib/pdf.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 8469ca9b931..fa6283b8e30 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -809,8 +809,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl { if ($libelleproduitservice && empty($hidedesc)) { - if ($conf->global->FCKEDITOR_ENABLE_DETAILS) $libelleproduitservice.='
'; - else $libelleproduitservice.="\n"; + $libelleproduitservice.='__N__'; } if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) @@ -889,11 +888,13 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl $period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')'; } //print '>'.$outputlangs->charset_output.','.$period; - $libelleproduitservice.="\n".$period; + $libelleproduitservice.="__N__".$period; //print $libelleproduitservice; } // Now we convert \n into br + if (dol_textishtml($libelleproduitservice)) $libelleproduitservice=preg_replace('/__N__/','
',$libelleproduitservice); + else $libelleproduitservice=preg_replace('/__N__/',"\n",$libelleproduitservice); $libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1); return $libelleproduitservice; From 2a19e9d2a11f6e8f9a02bc31a097fa1abf4cc476 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 18:04:55 +0200 Subject: [PATCH 27/40] Fix: Var can't be static --- htdocs/core/db/mssql.class.php | 4 ++-- htdocs/core/db/mysql.class.php | 4 ++-- htdocs/core/db/mysqli.class.php | 6 +++--- htdocs/core/db/pgsql.class.php | 7 ++++--- htdocs/core/db/sqlite.class.php | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index 9067effca1d..5c4439bd083 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -38,9 +38,9 @@ class DoliDBMssql //! Database label static $label='MSSQL'; //! Charset used to force charset when creating database - static $forcecharset='latin1'; + var $forcecharset='latin1'; // Can't be static as it may be forced with a dynamic value //! Collate used to force collate when creating database - static $forcecollate='latin1_swedish_ci'; + var $forcecollate='latin1_swedish_ci'; // Can't be static as it may be forced with a dynamic value //! Version min database static $versionmin=array(2000); //! Resultset of last request diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index d8f18d2971c..cd295d68cc2 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -38,9 +38,9 @@ class DoliDBMysql //! Database label static $label='MySQL'; //! Charset used to force charset when creating database - static $forcecharset='utf8'; // latin1, utf8 + var $forcecharset='utf8'; // latin1, utf8. Can't be static as it may be forced with a dynamic value //! Collate used to force collate when creating database - static $forcecollate='utf8_general_ci'; // latin1_swedish_ci, utf8_general_ci + var $forcecollate='utf8_general_ci'; // latin1_swedish_ci, utf8_general_ci. Can't be static as it may be forced with a dynamic value //! Version min database static $versionmin=array(4,1,0); //! Resultset of last request diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 3fbda6c3613..6b82861d1f7 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -38,9 +38,9 @@ class DoliDBMysqli //! Database label static $label='MySQL'; //! Charset used to force charset when creating database - static $forcecharset='utf8'; // latin1, utf8 + var $forcecharset='utf8'; // latin1, utf8. Can't be static as it may be forced with a dynamic value //! Collate used to force collate when creating database - static $forcecollate='utf8_general_ci'; // latin1_swedish_ci, utf8_general_ci + var $forcecollate='utf8_general_ci'; // latin1_swedish_ci, utf8_general_ci. Can't be static as it may be forced with a dynamic value //! Version min database static $versionmin=array(4,1,0); //! Resultset of last request @@ -83,7 +83,7 @@ class DoliDBMysqli function DoliDBMysqli($type, $host, $user, $pass, $name='', $port=0) { global $conf,$langs; - + // TODO error in strict mode (static property for "$forcecharset" and "$forcecollate") //if (! empty($conf->db->character_set)) $this->forcecharset=$conf->db->character_set; //if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation; diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index ca74e4384bc..12346c504dc 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -40,7 +40,7 @@ class DoliDBPgsql //! Database label static $label='PostgreSQL'; // Label of manager //! Charset - static $forcecharset='latin1'; + var $forcecharset='latin1'; // Can't be static as it may be forced with a dynamic value //! Version min database static $versionmin=array(8,4,0); // Version min database @@ -81,8 +81,9 @@ class DoliDBPgsql { global $conf,$langs; - $this->forcecharset=$conf->file->character_set_client; - $this->forcecollate=$conf->db->dolibarr_main_db_collation; + if (! empty($conf->db->character_set)) $this->forcecharset=$conf->db->character_set; + if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation; + $this->database_user=$user; $this->transaction_opened=0; diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index 06d1a460976..673d5c1d4e7 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -38,9 +38,9 @@ class DoliDBSqlite //! Database label static $label='PDO Sqlite'; //! Charset used to force charset when creating database - static $forcecharset='utf8'; // latin1, utf8 + var $forcecharset='utf8'; // latin1, utf8. Can't be static as it may be forced with a dynamic value //! Collate used to force collate when creating database - static $forcecollate='utf8_general_ci'; // latin1_swedish_ci, utf8_general_ci + var $forcecollate='utf8_general_ci'; // latin1_swedish_ci, utf8_general_ci. Can't be static as it may be forced with a dynamic value //! Version min database static $versionmin=array(3,0,0); //! Resultset of last request From 6b9717b250787696de013ecd61009bc6c2dcb08d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 18:38:15 +0200 Subject: [PATCH 28/40] Fix: Use same algo to scan modules than admin/modules page --- htdocs/admin/system/modules.php | 41 +++++++++++++++++---------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 84c8340ff12..a3a52653496 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -47,29 +47,30 @@ $modules = array(); $modules_names = array(); $modules_files = array(); +// Search modules dirs +$modulesdir = array(); foreach ($conf->file->dol_document_root as $type => $dirroot) { - $modulesdir[] = $dirroot . "/core/modules/"; - - if ($type == 'alt') - { - $handle=@opendir($dirroot); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') - { - if (is_dir($dirroot . '/' . $file . '/core/modules/')) - { - $modulesdir[] = $dirroot . '/' . $file . '/core/modules/'; - } - } - } - closedir($handle); - } - } + $modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/'; + + $handle=@opendir($dirroot); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') + { + if (is_dir($dirroot . '/' . $file . '/core/modules/')) + { + $modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/'; + } + } + } + closedir($handle); + } } +//var_dump($modulesdir); + // Load list of modules foreach($modulesdir as $dir) From 450ccf31a7f1ad8e63847511eafaba0dfe739add Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 18:52:05 +0200 Subject: [PATCH 29/40] Fix: Bad declaration of error_reporting Conflicts: htdocs/filefunc.inc.php --- htdocs/filefunc.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 5346643adec..2e6f0bd1f8f 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -53,8 +53,8 @@ if (! defined('LOG_DEBUG')) } } -// Forcage du parametrage PHP error_reporting (Dolibarr non utilisable en mode error E_ALL) -error_reporting(E_ALL ^ E_NOTICE); +// Force PHP error_reporting setup (Dolibarr may report warning without this) +error_reporting(E_ALL & ~(E_STRICT|E_NOTICE)); //error_reporting(E_ALL | E_STRICT); From d4d598d0aa75cbfcf8e3ce3240408acfb0125799 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Apr 2012 20:51:51 +0200 Subject: [PATCH 30/40] Fix: left align --- .../core/modules/member/labels/pdf_standardlabel.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/member/labels/pdf_standardlabel.class.php b/htdocs/core/modules/member/labels/pdf_standardlabel.class.php index f5f74cd8c40..617bb2c3121 100644 --- a/htdocs/core/modules/member/labels/pdf_standardlabel.class.php +++ b/htdocs/core/modules/member/labels/pdf_standardlabel.class.php @@ -177,7 +177,7 @@ class pdf_standardlabel else { $pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft)); + $pdf->MultiCell($this->_Width, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } } else if ($textleft!='' && $textright!='') // @@ -194,12 +194,12 @@ class pdf_standardlabel if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+3+$this->_Line_Height,20); else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+3+$this->_Line_Height,20); $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell($this->_Width-22, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft)); + $pdf->MultiCell($this->_Width-22, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); } else { $pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); - $pdf->MultiCell(round($this->_Width/2), $this->_Line_Height, $outputlangs->convToOutputCharset($textleft)); + $pdf->MultiCell(round($this->_Width/2), $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L'); $pdf->SetXY($_PosX+round($this->_Width/2), $_PosY+3+$this->_Line_Height); $pdf->MultiCell(round($this->_Width/2)-2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R'); } From 3641a4b5bbac109f4c4f455d1f271001855ba59a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Apr 2012 21:40:13 +0200 Subject: [PATCH 31/40] Fix: Regression --- htdocs/adherents/liste.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 9b9d631bf28..dbdb8174c6b 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -52,7 +52,7 @@ $search_login=GETPOST("search_login"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); $search_categ=GETPOST("search_categ"); -$sall=GETPOST("sall",'int'); +$sall=GETPOST("sall"); if (GETPOST("button_removefilter")) { From 74887b5850ba0ac341a72636f447588113774c11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Apr 2012 09:33:43 +0200 Subject: [PATCH 32/40] Fix: Removed warnings --- htdocs/core/db/mssql.class.php | 7 +++++-- htdocs/core/db/mysql.class.php | 2 +- htdocs/core/db/mysqli.class.php | 2 +- htdocs/core/db/pgsql.class.php | 2 +- htdocs/core/db/sqlite.class.php | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index 5c4439bd083..a2e6a9e3b83 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -796,9 +796,12 @@ class DoliDBMssql */ function DDLCreateDb($database,$charset='',$collation='',$owner='') { - // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci + if (empty($charset)) $charset=$this->forcecharset; + if (empty($collation)) $collation=$this->forcecollate; + + // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci $sql = 'CREATE DATABASE '.$database; - $sql.= ' DEFAULT CHARACTER SET '.$this->forcecharset.' DEFAULT COLLATE '.$this->forcecollate; + $sql.= ' DEFAULT CHARACTER SET '.$charset.' DEFAULT COLLATE '.$collation; $ret=$this->query($sql); if (! $ret) { diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index cd295d68cc2..6f978b0b0fd 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -797,7 +797,7 @@ class DoliDBMysql function DDLCreateDb($database,$charset='',$collation='',$owner='') { if (empty($charset)) $charset=$this->forcecharset; - if (empty($collation)) $collation=$this->collation; + if (empty($collation)) $collation=$this->forcecollate; // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci $sql = 'CREATE DATABASE '.$database; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 6b82861d1f7..7afea5a8da3 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -791,7 +791,7 @@ class DoliDBMysqli function DDLCreateDb($database,$charset='',$collation='',$owner='') { if (empty($charset)) $charset=$this->forcecharset; - if (empty($collation)) $collation=$this->collation; + if (empty($collation)) $collation=$this->forcecollate; // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci $sql = 'CREATE DATABASE '.$database; diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 12346c504dc..a717afe0ec1 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -979,7 +979,7 @@ class DoliDBPgsql function DDLCreateDb($database,$charset='',$collation='',$owner='') { if (empty($charset)) $charset=$this->forcecharset; - if (empty($collation)) $collation=$this->collation; + if (empty($collation)) $collation=$this->forcecollate; $ret=$this->query('CREATE DATABASE '.$database.' OWNER '.$owner.' ENCODING \''.$charset.'\''); return $ret; diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index 673d5c1d4e7..c7a02ecded1 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -939,7 +939,7 @@ class DoliDBSqlite function DDLCreateDb($database,$charset='',$collation='',$owner='') { if (empty($charset)) $charset=$this->forcecharset; - if (empty($collation)) $collation=$this->collation; + if (empty($collation)) $collation=$this->forcecollate; // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci $sql = 'CREATE DATABASE '.$database; From 69b429914f40a63397604168bbfd59adac02d5e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Apr 2012 19:03:14 +0200 Subject: [PATCH 33/40] Fix: Firstname/Lastname lost Conflicts: htdocs/admin/tools/update.php --- htdocs/adherents/fiche.php | 4 ++-- htdocs/admin/tools/update.php | 4 +--- htdocs/user/class/user.class.php | 16 +++++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index c7d2c2b162d..cd15b82eb42 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -160,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user { // Creation user $nuser = new User($db); - $result=$nuser->create_from_member($object,GETPOST('login','alpha')); + $result=$nuser->create_from_member($object,GETPOST('login')); if ($result < 0) { @@ -181,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights { // Creation user $company = new Societe($db); - $result=$company->create_from_member($object,GETPOST('companyname','alpha')); + $result=$company->create_from_member($object,GETPOST('companyname')); if ($result < 0) { diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 7e56a51f426..14167134209 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='
'.$_GET["msg"].'
'; $urldolibarr='http://www.dolibarr.org/downloads/'; -//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon'; $urldolibarrmodules='http://www.dolistore.com/'; -//$urldolibarrthemes='http://www.dolibarr.org/'; $urldolibarrthemes='http://www.dolistore.com/'; $dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT); $dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot); @@ -141,4 +139,4 @@ print $langs->trans("SetupIsReadyForUse").'
'; print ''; llxFooter(); -?> \ No newline at end of file +?> diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index bc367203775..e34e750d9d6 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -938,12 +938,12 @@ class User extends CommonObject // Positionne parametres $this->admin = 0; - $this->nom = $member->nom; - $this->prenom = $member->prenom; + $this->lastname = $member->lastname; + $this->firstname = $member->firstname; $this->email = $member->email; $this->pass = $member->pass; - if (empty($login)) $login=strtolower(substr($member->prenom, 0, 4)) . strtolower(substr($member->nom, 0, 4)); + if (empty($login)) $login=strtolower(substr($member->firstname, 0, 4)) . strtolower(substr($member->lastname, 0, 4)); $this->login = $login; $this->db->begin(); @@ -1047,8 +1047,8 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters - $this->nom = trim($this->nom); // TODO deprecated - $this->prenom = trim($this->prenom); // TODO deprecated + $this->nom = trim($this->nom); // deprecated + $this->prenom = trim($this->prenom); // deprecated $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); $this->login = trim($this->login); @@ -1142,8 +1142,10 @@ class User extends CommonObject if ($result >= 0) { - $adh->prenom=$this->firstname; - $adh->nom=$this->lastname; + $adh->prenom=$this->firstname; // deprecated + $adh->nom=$this->lastname; // deprecated + $adh->firstname=$this->firstname; + $adh->lastname=$this->lastname; $adh->login=$this->login; $adh->pass=$this->pass; $adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe); From 129bb0cf2ff0d20592f1f7667da262d1a4c995cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Apr 2012 19:15:16 +0200 Subject: [PATCH 34/40] Fix: awful IE --- htdocs/theme/eldy/style.css.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 4519a2756e3..252ffbcb423 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -403,7 +403,7 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { padding: 0px 5px 0px 5px; margin: 0px 1px 2px 1px; white-space: nowrap; - text-shadow: 1px 2px 4px #BFBFBF; + text-shadow: 1px 1px 1px #BFBFBF; } a.tmenu:link, a.tmenu:visited { color: #; @@ -416,7 +416,7 @@ a.tmenu:hover, a.tmenu:active { border-top: 1px solid #D8D8D8; border-bottom: 2px solid #F4F4F4; background: #F4F4F4; - text-shadow: 1px 2px 4px #BFBFBF; + text-shadow: 1px 1px 1px #BFBFBF; } a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { @@ -430,7 +430,7 @@ a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { border-: 1px solid #D8D8D8; border-bottom: 2px solid #F4F4F4; white-space: nowrap; - text-shadow: 1px 2px 4px #BFBFBF; + text-shadow: 1px 1px 1px #BFBFBF; } From 67adc110863ecc65bd752bff8cd87a247743a373 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 May 2012 15:08:54 +0200 Subject: [PATCH 35/40] Fix: [ bug #378 ] status for order i, process is "waiting for reception" --- htdocs/commande/class/commande.class.php | 8 ++++---- htdocs/langs/en_US/orders.lang | 3 ++- htdocs/langs/fr_FR/orders.lang | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 252200cf6df..ce2b3014604 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -620,7 +620,7 @@ class Commande extends CommonObject // $date_commande is deprecated $date = ($this->date_commande ? $this->date_commande : $this->date); - + $now=dol_now(); $this->db->begin(); @@ -2444,7 +2444,7 @@ class Commande extends CommonObject if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort'); if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort'); if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort'); - if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$langs->trans('StatusOrderSentShort'); + if ($statut==2) return img_picto($langs->trans('StatusOrderSent'),'statut3').' '.$langs->trans('StatusOrderSentShort'); if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort'); if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort'); } @@ -2462,7 +2462,7 @@ class Commande extends CommonObject if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled'); if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft'); if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated'); - if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderOnProcess'); + if ($statut==2) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderSent'); if ($statut==3 && ! $facturee) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill'); if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed'); } @@ -2471,7 +2471,7 @@ class Commande extends CommonObject if ($statut==-1) return $langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5'); if ($statut==0) return $langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0'); if ($statut==1) return $langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1'); - if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderOnProcess'),'statut3'); + if ($statut==2) return $langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderSent'),'statut3'); if ($statut==3 && ! $facturee) return $langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7'); if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6'); } diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 57a47022b94..a244c69aef0 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -28,6 +28,7 @@ StatusOrderCanceledShort=Canceled StatusOrderDraftShort=Draft StatusOrderValidatedShort=Validated StatusOrderSentShort=In process +StatusOrderSent=Shipment in process StatusOrderOnProcessShort=Reception StatusOrderProcessedShort=Processed StatusOrderToBillShort=To bill @@ -145,4 +146,4 @@ OrderByMail=Mail OrderByFax=Fax OrderByEMail=EMail OrderByWWW=Online -OrderByPhone=Phone \ No newline at end of file +OrderByPhone=Phone diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index 3d0532f02e7..a3c140aa2d6 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -29,6 +29,7 @@ StatusOrderDraftShort=Brouillon StatusOrderValidatedShort=Validée StatusOrderOnProcessShort=Réception StatusOrderSentShort=Envoi en cours +StatusOrderSent=Envoi en cours StatusOrderProcessedShort=Traitée StatusOrderToBillShort=À facturer StatusOrderApprovedShort=Approuvée @@ -146,4 +147,4 @@ OrderByMail=Courrier OrderByFax=Fax OrderByEMail=EMail OrderByWWW=En ligne -OrderByPhone=Téléphone \ No newline at end of file +OrderByPhone=Téléphone From 9edd80b850d6f926cd9fb82c6604ecb6cc21f948 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 May 2012 15:28:11 +0200 Subject: [PATCH 36/40] Fix: Clean database to allow constraints --- htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index e35611107a5..321e7ff1348 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -156,6 +156,8 @@ ALTER TABLE llx_categorie_fournisseur DROP INDEX fk_categorie; ALTER TABLE llx_categorie_fournisseur ADD PRIMARY KEY pk_categorie_fournisseur (fk_categorie, fk_societe); ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_categorie (fk_categorie); ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_societe (fk_societe); +DELETE FROM llx_categorie_fournisseur WHERE fk_categorie NOT IN (SELECT rowid FROM llx_categorie); +DELETE FROM llx_categorie_fournisseur WHERE fk_societe NOT IN (SELECT rowid FROM llx_societe); ALTER TABLE llx_categorie_fournisseur ADD CONSTRAINT fk_categorie_fournisseur_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_fournisseur ADD CONSTRAINT fk_categorie_fournisseur_fk_soc FOREIGN KEY (fk_societe) REFERENCES llx_societe (rowid); From c7daf233cde06f839b745bc62bfe8ab09fac2e14 Mon Sep 17 00:00:00 2001 From: simnandez Date: Wed, 2 May 2012 09:21:52 +0200 Subject: [PATCH 37/40] Trad: [ bug #378 ] status for order i, process is "waiting for reception" --- htdocs/langs/ca_ES/orders.lang | 7 ++++++- htdocs/langs/es_ES/orders.lang | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang index 8f0a392f6c8..8c7a382a1c9 100644 --- a/htdocs/langs/ca_ES/orders.lang +++ b/htdocs/langs/ca_ES/orders.lang @@ -29,6 +29,7 @@ StatusOrderDraftShort=Esborrany StatusOrderValidatedShort=Validada StatusOrderOnProcessShort=Per rebre StatusOrderSentShort=Expedició en curs +StatusOrderSent=Enviament en curs StatusOrderProcessedShort=Processada StatusOrderToBillShort=A facturar StatusOrderApprovedShort=Aprovada @@ -119,10 +120,12 @@ TypeContact_order_supplier_internal_SHIPPING=Responsable recepció comanda a pro TypeContact_order_supplier_external_BILLING=Contacte proveïdor facturació comanda TypeContact_order_supplier_external_SHIPPING=Contacte proveïdor lliurament comanda TypeContact_order_supplier_external_CUSTOMER=Contacte proveïdor seguiment comanda + Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON no definida Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON no definida Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Error en la càrrega de l'arxiu mòdul '%s' Error_FailedToLoad_COMMANDE_ADDON_File=Error en la càrrega de l'arxiu mòdul '%s' + # Sources OrderSource0=Pressupost OrderSource1=Internet @@ -134,12 +137,14 @@ OrderSource6=Revistes QtyOrdered=Qt. demanda AddDeliveryCostLine=Afegir una línia de despeses de ports indicant el pes de la comanda SetDemandReason=Indicar origen de la comanda + # Document models PDFEinsteinDescription=Model de comanda complet (logo...) PDFEdisonDescription=Model de comanda simple + # Orders modes OrderByMail=Correu OrderByFax=Fax OrderByEMail=E-Mail OrderByWWW=En línia -OrderByPhone=Telèfon +OrderByPhone=Telèfon \ No newline at end of file diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index 2cc068560d2..ffc68da4709 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -29,6 +29,7 @@ StatusOrderDraftShort=Borrador StatusOrderValidatedShort=Validado StatusOrderOnProcessShort=Pdte. Recibir StatusOrderSentShort=Expedición en curso +StatusOrderSent=Envío en curso StatusOrderProcessedShort=Procesado StatusOrderToBillShort=A facturar StatusOrderApprovedShort=Aprobado @@ -119,10 +120,12 @@ TypeContact_order_supplier_internal_SHIPPING=Responsable recepción pedido a pro TypeContact_order_supplier_external_BILLING=Contacto proveedor facturación pedido TypeContact_order_supplier_external_SHIPPING=Contacto proveedor entrega pedido TypeContact_order_supplier_external_CUSTOMER=Contacto proveedor seguimiento pedido + Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON no definida Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON no definida Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Error en la carga del archivo módulo '%s' Error_FailedToLoad_COMMANDE_ADDON_File=Error en la carga del archivo módulo '%s' + # Sources OrderSource0=Presupuesto OrderSource1=Internet @@ -134,12 +137,14 @@ OrderSource6=Revistas QtyOrdered=Cant. pedida AddDeliveryCostLine=Añadir una línea de gastos de portes indicando el peso del pedido SetDemandReason=Indicar origen del pedido + # Document models PDFEinsteinDescription=Modelo de pedido completo (logo...) PDFEdisonDescription=Modelo de pedido simple + # Orders modes OrderByMail=Correo OrderByFax=Fax OrderByEMail=E-Mail OrderByWWW=En línea -OrderByPhone=Teléfono +OrderByPhone=Teléfono \ No newline at end of file From f5cc12895a5cdd98167e904a03b133a381e73dfb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 May 2012 13:41:34 +0200 Subject: [PATCH 38/40] Fix: Missing picto --- htdocs/theme/bureau2crea/img/grip.png | Bin 0 -> 140 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 htdocs/theme/bureau2crea/img/grip.png diff --git a/htdocs/theme/bureau2crea/img/grip.png b/htdocs/theme/bureau2crea/img/grip.png new file mode 100644 index 0000000000000000000000000000000000000000..216e51ca8f077b7b6e1fd0186c0c0f2166433394 GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWw1GdY&$hAr-fh{`~)M&urOHm|*HR$3pPT$@Ayaj~s1VnVO^^ l++$Vx!D_0W6eAN4!v%Slk5$J{tODv}@O1TaS?83{1OQvFESvxU literal 0 HcmV?d00001 From afd9b817be30f9d157e5e8ae9c7d74356d43406b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 May 2012 00:17:33 +0200 Subject: [PATCH 39/40] Fix: Missing translation --- htdocs/langs/en_US/ecm.lang | 1 + htdocs/langs/fr_FR/ecm.lang | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index d6151f3e5e2..1519bf6c8fd 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -36,6 +36,7 @@ ECMSearchByEntity=Search by object ECMSectionOfDocuments=Directories of documents ECMTypeManual=Manual ECMTypeAuto=Automatic +ECMDocsBySocialContributions=Documents linked to social contributions ECMDocsByThirdParties=Documents linked to third parties ECMDocsByProposals=Documents linked to proposals ECMDocsByOrders=Documents linked to customers orders diff --git a/htdocs/langs/fr_FR/ecm.lang b/htdocs/langs/fr_FR/ecm.lang index 842ff373da8..27aef45cfba 100644 --- a/htdocs/langs/fr_FR/ecm.lang +++ b/htdocs/langs/fr_FR/ecm.lang @@ -36,6 +36,7 @@ ECMSearchByEntity=Recherche par objet ECMSectionOfDocuments=Répertoires des documents ECMTypeManual=Manuel ECMTypeAuto=Automatique +ECMDocsBySocialContributions=Documents associés à des charges sociales ECMDocsByThirdParties=Documents associés aux tiers ECMDocsByProposals=Documents associés aux propositions ECMDocsByOrders=Documents associés aux commandes From 47c0b8272d6c759056490abc46898a413f1c315a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 May 2012 14:19:34 +0200 Subject: [PATCH 40/40] Fix: Middle Conflicts: htdocs/core/tpl/login.tpl.php --- htdocs/core/tpl/login.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 72de98269af..b0f72b159df 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -133,8 +133,8 @@ if (! empty($hookmanager->resArray['options'])) { - -Logo + +