From dc0af179e94a7717cfdaf08e517e8c34cd38efe4 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Fri, 18 Dec 2015 01:41:30 +0100 Subject: [PATCH 01/17] add icalname on default event allow to manipulate it (show/hide) when we add some other calendar on main (eg fichinter calendar) --- htdocs/comm/action/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 2324b6ee799..a8f1c6f5939 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1230,7 +1230,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } else { - $numother++; $cssclass='family_other'; + $numother++; + $color=$event->icalcolor; + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); + if (empty($cacheusers[$event->userownerid])) { From efb1e91a2368e8bb7719e83fed9e5fd233c909a4 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 19 Dec 2015 10:29:56 +0100 Subject: [PATCH 02/17] Update index.php i have add an icalcolor test for icalevent too and made some reindentation --- htdocs/comm/action/index.php | 63 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a8f1c6f5939..f13e48a56e4 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1171,14 +1171,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Line with td contains all div of each events print ''; - print '
'; + print '
'; //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); $i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array(); $ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day); $nextindextouse=count($colorindexused); // At first run this is 0, so fist user has 0, next 1, ... - //print $nextindextouse; + //print $nextindextouse; foreach ($eventarray as $daykey => $notused) { @@ -1191,23 +1191,23 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { if ($i < $maxprint || $maxprint == 0 || ! empty($conf->global->MAIN_JS_SWITCH_AGENDA)) { - $keysofuserassigned=array_keys($event->userassigned); + $keysofuserassigned=array_keys($event->userassigned); - $ponct=($event->date_start_in_calendar == $event->date_end_in_calendar); + $ponct=($event->date_start_in_calendar == $event->date_end_in_calendar); // Define $color (Hex string like '0088FF') and $cssclass of event $color=-1; $colorindex=-1; - if (in_array($user->id, $keysofuserassigned)) - { - $nummytasks++; $cssclass='family_mytasks'; + if (in_array($user->id, $keysofuserassigned)) + { + $nummytasks++; $cssclass='family_mytasks'; - if (empty($cacheusers[$event->userownerid])) - { - $newuser=new User($db); - $newuser->fetch($event->userownerid); - $cacheusers[$event->userownerid]=$newuser; - } - //var_dump($cacheusers[$event->userownerid]->color); + if (empty($cacheusers[$event->userownerid])) + { + $newuser=new User($db); + $newuser->fetch($event->userownerid); + $cacheusers[$event->userownerid]=$newuser; + } + //var_dump($cacheusers[$event->userownerid]->color); // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; @@ -1221,7 +1221,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } $numicals[dol_string_nospecial($event->icalname)]++; } - $color=$event->icalcolor; + $color=($event->icalcolor?$event->icalcolor:-1); $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } else if ($event->type_code == 'BIRTHDAY') @@ -1229,23 +1229,22 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } else - { - $numother++; - $color=$event->icalcolor; - $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); - + { + $numother++; + $color=($event->icalcolor?$event->icalcolor:-1); + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); - if (empty($cacheusers[$event->userownerid])) - { - $newuser=new User($db); - $newuser->fetch($event->userownerid); - $cacheusers[$event->userownerid]=$newuser; - } - //var_dump($cacheusers[$event->userownerid]->color); + if (empty($cacheusers[$event->userownerid])) + { + $newuser=new User($db); + $newuser->fetch($event->userownerid); + $cacheusers[$event->userownerid]=$newuser; + } + //var_dump($cacheusers[$event->userownerid]->color); // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; - } + } if ($color == -1) // Color was not forced. Set color according to color index. { // Define color index if not yet defined @@ -1256,14 +1255,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } else { - $colorindex=$nextindextouse; - $colorindexused[$idusertouse]=$colorindex; + $colorindex=$nextindextouse; + $colorindexused[$idusertouse]=$colorindex; if (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++; // Prepare to use next color } //print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'
'; - // Define color + // Define color $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); - } + } $cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; // Defined style to disable drag and drop feature From 3ff9fe3123006307373f6904cadbe06df64082ec Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 9 Jan 2016 08:26:08 +0100 Subject: [PATCH 03/17] Fix: Add missing key language for propal --- htdocs/comm/index.php | 1 + htdocs/langs/en_US/propal.lang | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 00bba632d1c..ddacf259ae4 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -37,6 +37,7 @@ if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn if (! $user->rights->societe->lire) accessforbidden(); $langs->load("commercial"); +$langs->load("propal"); $action=GETPOST('action', 'alpha'); $bid=GETPOST('bid', 'int'); diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index d12d7595f94..f78ac37601c 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -25,6 +25,7 @@ LastModifiedProposals=Last %s modified proposals AllPropals=All proposals LastProposals=Last proposals SearchAProposal=Search a proposal +NoProposal=No proposal ProposalsStatistics=Commercial proposal's statistics NumberOfProposalsByMonth=Number by month AmountOfProposalsByMonthHT=Amount by month (net of tax) From af9e46d179ac28958757359fb5afe40d6771f230 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 10 Jan 2016 06:56:20 +0100 Subject: [PATCH 04/17] Fix: Wrong language file for 2 menu entries in accountancy module --- htdocs/core/menus/init_menu_auguria.sql | 4 ++-- htdocs/core/menus/standard/eldy.lib.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index a1ae52859de..74c6260259e 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -228,8 +228,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2721__+MAX_llx_menu__, 'accountancy', '', 2720__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyyear.php', 'ByYear', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2722__+MAX_llx_menu__, 'accountancy', '', 2720__+MAX_llx_menu__, '/accountancy/bookkeeping/balancebymonth.php', 'AccountBalanceByMonth', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 1, __ENTITY__); -- Fiscal year & Chart of accounts -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2750__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'accountancy', '$user->rights->accounting->fiscalyear', '', 2, 20, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2751__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'accountancy', '$user->rights->accounting->chartofaccount', '', 2, 21, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2750__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '$user->rights->accounting->fiscalyear', '', 2, 20, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2751__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 2, 21, __ENTITY__); -- Check deposit insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index fedb49dcbd2..d8f940767b9 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1010,6 +1010,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // Setup if (! empty($conf->accounting->enabled)) { + $langs->load("admin"); + $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy", $langs->trans("Fiscalyear"),0,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear'); $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy", $langs->trans("Chartofaccounts"),0,$user->rights->accounting->chartofaccount, '', $mainmenu, 'chartofaccount'); } From 87f1e55bcbdc357a15093e9e20ed0dd2366ef832 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 10 Jan 2016 07:08:49 +0100 Subject: [PATCH 05/17] Fix: SQL error on user bank tab --- htdocs/user/class/userbankaccount.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index c89d7162c2a..30c795bbd72 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -133,15 +133,14 @@ class UserBankAccount extends Account * Load record from database * * @param int $id Id of record - * @param int $socid Id of company. If this is filled, function will return the default RIB of company * @return int <0 if KO, >0 if OK */ - function fetch($id, $socid=0) + function fetch($id) { - if (empty($id) && empty($socid)) return -1; + if (empty($id)) return -1; $sql = "SELECT rowid, fk_user, entity, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; - $sql.= " owner_address, default_rib, label, datec, tms as datem"; + $sql.= " owner_address, label, datec, tms as datem"; $sql.= " FROM ".MAIN_DB_PREFIX."user_rib"; if ($id) $sql.= " WHERE rowid = ".$id; if ($socid) $sql.= " WHERE fk_user = ".$userid; From 965a96784cfdc36f33912aa804f3c4380f9d2ac2 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 10 Jan 2016 07:35:00 +0100 Subject: [PATCH 06/17] Fix: Donation some problems with french article --- htdocs/core/modules/dons/html_cerfafr.html | 6 ++++-- htdocs/core/modules/dons/html_cerfafr.modules.php | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index df6f58af77d..59403147977 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -201,7 +201,7 @@
- __AMOUNT__ euros + __AMOUNT__ euros
@@ -215,7 +215,9 @@ Le bénéficiaire certifie sur l’honneur que les dons et versements qu’il reçoit ouvrent droit à la réduction d'impôt prévue à l’article (3) :
- __CodeDon__ + + +
__ARTICLE200____ARTICLE238____ARTICLE885__

diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index e80d97b781a..c20eb924e97 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -146,6 +146,7 @@ class html_cerfafr extends ModeleDon $ModePaiement = ' Remise d\'espèces Chèque Virement, prélèvement, carte bancaire'; } + /* if (empty($don->societe)) { $CodeDon = ' 200 du CGI 238 bis du CGI 885-0 V bis A du CGI'; @@ -154,6 +155,7 @@ class html_cerfafr extends ModeleDon { $CodeDon = ' 200 du CGI 238 bis du CGI 885-0 V bis A du CGI'; } + */ // Define contents $donmodel=DOL_DOCUMENT_ROOT ."/core/modules/dons/html_cerfafr.html"; @@ -186,7 +188,7 @@ class html_cerfafr extends ModeleDon $form = str_replace('__DonationRecipient__',$outputlangs->trans("DonationRecipient"),$form); $form = str_replace('__DonationDatePayment__',$outputlangs->trans("DonationDatePayment"),$form); $form = str_replace('__PaymentMode__',$outputlangs->trans("PaymentMode"),$form); - $form = str_replace('__CodeDon__',$CodeDon,$form); + // $form = str_replace('__CodeDon__',$CodeDon,$form); $form = str_replace('__Name__',$outputlangs->trans("Name"),$form); $form = str_replace('__Address__',$outputlangs->trans("Address"),$form); $form = str_replace('__Zip__',$outputlangs->trans("Zip"),$form); From fddd02eecc00641a5e941be8070d2802d55bf6ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jan 2016 11:31:22 +0100 Subject: [PATCH 07/17] Complete fix #4354 --- htdocs/holiday/class/holiday.class.php | 9 ++++----- htdocs/holiday/define_holiday.php | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index eb558e1c37f..32045542aed 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -817,18 +817,17 @@ class Holiday extends CommonObject } /** - * Retourne la valeur d'un paramètre de configuration + * Return value of a conf parameterfor leave module + * TODO Move this into llx_const table * - * @param string $name name du paramètre de configuration - * @param int $fk_type Filter on type - * @return string retourne la valeur du paramètre + * @param string $name name of parameter + * @return string value of parameter */ function getConfCP($name, $fk_type=0) { $sql = "SELECT value"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; $sql.= " WHERE name = '".$name."'"; - if ($fk_type > 0) $sql.=" AND fk_type = ".$fk_type; dol_syslog(get_class($this).'::getConfCP name='.$name.'', LOG_DEBUG); $result = $this->db->query($sql); diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index eb7fea3598c..71d286348e8 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -159,7 +159,7 @@ llxHeader(array(),$langs->trans('CPTitreMenu')); print load_fiche_titre($langs->trans('MenuConfCP'), '', 'title_hrm.png'); print '
'.$langs->trans('LastUpdateCP').': '."\n"; -$lastUpdate = $holiday->getConfCP('lastUpdate', 0); +$lastUpdate = $holiday->getConfCP('lastUpdate'); if ($lastUpdate) { $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; From aa0b002119a8cf78ece6d48429c28b0b70d63415 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jan 2016 11:35:06 +0100 Subject: [PATCH 08/17] Fix #4354 --- htdocs/holiday/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index bd9fd680087..0b3bcf469d5 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -618,7 +618,7 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') // From $expediteur = new User($db); - $expediteur->fetch($cp->fk_validator); + $expediteur->fetch($cp->fk_user_cancel); $emailFrom = $expediteur->email; // Subject From 694530bfaea1e9f494e65d2f37fb6fc92de6c2f3 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 10 Jan 2016 13:00:48 +0100 Subject: [PATCH 09/17] Fix: Gives the possibility to the module, to provide his own family info and position of this family. (canceled $this->family) --- dev/skeletons/modMyModule.class.php | 5 ++++- htdocs/admin/modules.php | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index ed8f8ed976e..f4fb280ef9d 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2016 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,6 +53,9 @@ class modMyModule extends DolibarrModules // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "other"; + // Gives the possibility to the module, to provide his own family info and position of this family. (canceled $this->family) + $this->familyinfo = array('myownfamily' => array('position' => '001', 'label' => $langs->trans("MyOwnFamily"))); + // Module position in the family $this->module_position = 500; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 92cc7d3bff5..3fbaddd0a3f 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -142,10 +142,10 @@ foreach ($modulesdir as $dir) if (! $objMod->numero > 0) { - dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR); + dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR); } $j = $objMod->numero; - + $modulequalified=1; // We discard modules according to features level (PS: if module is activated we always show it) @@ -161,17 +161,25 @@ foreach ($modulesdir as $dir) { $modules[$i] = $objMod; $filename[$i]= $modName; - + $special = $objMod->special; - $familykey = $objMod->family; + + // Gives the possibility to the module, to provide his own family info and position of this family + if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) { + $familyinfo = array_merge($familyinfo, $objMod->familyinfo); + $familykey = key($objMod->familyinfo); + } else { + $familykey = $objMod->family; + } + $moduleposition = ($objMod->module_position?$objMod->module_position:'500'); if ($moduleposition == 500 && ($objMod->isCoreOrExternalModule() == 'external')) { $moduleposition = 800; } - + if ($special == 1) $familykey='interface'; - + $orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number $dirmod[$i] = $dir; // Set categ[$i] @@ -323,7 +331,7 @@ if ($mode != 'marketplace') $objMod = $modules[$key]; $special = $objMod->special; - + //print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."
"; //if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev') if (($special >= 4 && $mode != 'expdev') From bf098005407bf6e04c13aab8b3dea1bafe646a65 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Jan 2016 18:52:26 +0100 Subject: [PATCH 10/17] Fix function signature --- htdocs/holiday/class/holiday.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 32045542aed..1d1c624aa4c 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -823,7 +823,7 @@ class Holiday extends CommonObject * @param string $name name of parameter * @return string value of parameter */ - function getConfCP($name, $fk_type=0) + function getConfCP($name) { $sql = "SELECT value"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; From 4d8a9abdbcb3e9b9b5f62e9e444fa0c274a329d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 8 Jan 2016 11:57:18 +0100 Subject: [PATCH 11/17] [Security] Detect lockfile even without configuration --- htdocs/install/inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 5b010f80e0b..dcf968d700f 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -174,8 +174,14 @@ if (preg_match('/install.lock/i',$_SERVER["SCRIPT_FILENAME"])) } exit; } -$lockfile=DOL_DATA_ROOT.'/install.lock'; -if (constant('DOL_DATA_ROOT') && file_exists($lockfile)) + +$lockfile = DOL_DATA_ROOT . '/install.lock'; +if (constant(DOL_DATA_ROOT) === null) { + // We don't have a configuration file yet + // Try to detect any lockfile in the default documents path + $lockfile = '../../documents/install.lock'; +} +if (@file_exists($lockfile)) { print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).
'; if (! empty($dolibarr_main_url_root)) From cf6be40922922f2ee8e865fc85aa38cfc5f97eae Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 11 Jan 2016 22:03:26 +0100 Subject: [PATCH 12/17] New: #3292 Make sure each and every page displays a title --- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/supplier/list.php | 2 +- htdocs/adherents/stats/byproperties.php | 2 +- htdocs/adherents/stats/geo.php | 2 +- htdocs/comm/contact.php | 9 ++++----- htdocs/compta/tva/clients.php | 2 +- htdocs/compta/tva/quadri_detail.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/langs/en_US/compta.lang | 1 + htdocs/loan/note.php | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 2346df27c77..9faf44e4815 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -375,7 +375,7 @@ if ($action == 'export_csv') } } else { - llxHeader('', '', ''); + llxHeader('', $langs->trans("PurchasesJournal")); $form = new Form($db); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index d47c2c924c8..33322fd52c4 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -111,7 +111,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both /* * View */ -llxHeader('', $langs->trans("Ventilation")); +llxHeader('', $langs->trans("SuppliersVentilation")); print '