diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php
index cd30af0dfdc..618a8803a6e 100644
--- a/htdocs/admin/syslog.php
+++ b/htdocs/admin/syslog.php
@@ -198,7 +198,8 @@ foreach ($syslogModules as $moduleName)
{
foreach ($setuparray as $option)
{
- if (defined($option['constant'])) $value = constant($option['constant']);
+ if (isset($_POST[$option['constant']])) $value=$_POST[$option['constant']];
+ else if (defined($option['constant'])) $value = constant($option['constant']);
else $value = (isset($option['default']) ? $option['default'] : '');
print $option['name'].': ';
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 7bd1544fe14..cc27e0cd835 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1394,6 +1394,8 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
$remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
+ $datedelivery = (!empty($objectsrc->date_livraison)?$objectsrc->date_livraison:'');
+
$note_private = (! empty($objectsrc->note) ? $objectsrc->note : (! empty($objectsrc->note_private) ? $objectsrc->note_private : ''));
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : '');
@@ -1410,6 +1412,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
$remise_percent = $soc->remise_percent;
$remise_absolue = 0;
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
+ $projectid = 0;
}
$absolute_discount=$soc->getAvailableDiscounts();
@@ -1432,7 +1435,8 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
// Reference client
print '
'.$langs->trans('RefCustomer').' ';
- print ' ';
+ //print ' ';
+ print ' '; // We must not use ref_client of proposal for an order
print ' ';
// Client
@@ -1463,43 +1467,37 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
// Date de livraison
print "".$langs->trans("DeliveryDate").' ';
- if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY))
+ if (empty($datedelivery))
{
- $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
- }
- else
- {
- $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
+ if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY)) $datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
+ else $datedelivery=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
}
$form->select_date($datedelivery,'liv_','','','',"crea_commande",1,1);
print " ";
// Conditions de reglement
print ''.$langs->trans('PaymentConditionsShort').' ';
- $form->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id',-1,1);
+ $form->select_conditions_paiements($cond_reglement_id,'cond_reglement_id',-1,1);
print ' ';
// Mode de reglement
print ''.$langs->trans('PaymentMode').' ';
- $form->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
+ $form->select_types_paiements($mode_reglement_id,'mode_reglement_id');
print ' ';
// Delivery delay
print ''.$langs->trans('AvailabilityPeriod').' ';
- $form->select_availability($propal->availability,'availability_id','',1);
+ $form->select_availability($availability_id,'availability_id','',1);
print ' ';
// What trigger creation
print ''.$langs->trans('Source').' ';
- $form->select_demand_reason(($origin=='propal'?'SRC_COMM':''),'demand_reason_id','',1);
+ $form->select_demand_reason($demand_reason_id,'demand_reason_id','',1);
print ' ';
// Project
if (! empty($conf->projet->enabled))
{
- $projectid = 0;
- if ($origin == 'project') $projectid = ($originid?$originid:0);
-
print ''.$langs->trans('Project').' ';
$numprojet=select_projects($soc->id,$projectid);
if ($numprojet==0)
diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php
index 7b60344fc06..15309b3f70e 100644
--- a/htdocs/compta/facture/impayees.php
+++ b/htdocs/compta/facture/impayees.php
@@ -129,6 +129,20 @@ if ($action == "builddoc" && $user->rights->facture->lire)
}
}
+// Remove file
+if ($action == 'remove_file')
+{
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+
+ $langs->load("other");
+ $upload_dir = $diroutputpdf;
+ $file = $upload_dir . '/' . GETPOST('file');
+ $ret=dol_delete_file($file,0,0,0,'');
+ if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
+ else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
+ $action='';
+}
+
/*
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 92f2a8e3836..5767aee6b48 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -439,22 +439,6 @@ class Conf
if (isset($this->contrat)) $this->contract=$this->contrat;
if (isset($this->categorie)) $this->category=$this->categorie;
-
- // Define menu manager in setup
- if (empty($user->societe_id)) // If internal user or not defined
- {
- $this->top_menu=(empty($this->global->MAIN_MENU_STANDARD_FORCED)?$this->global->MAIN_MENU_STANDARD:$this->global->MAIN_MENU_STANDARD_FORCED);
- $this->smart_menu=(empty($this->global->MAIN_MENU_SMARTPHONE_FORCED)?$this->global->MAIN_MENU_SMARTPHONE:$this->global->MAIN_MENU_SMARTPHONE_FORCED);
- }
- else // If external user
- {
- $this->top_menu=(empty($this->global->MAIN_MENUFRONT_STANDARD_FORCED)?$this->global->MAIN_MENUFRONT_STANDARD:$this->global->MAIN_MENUFRONT_STANDARD_FORCED);
- $this->smart_menu=(empty($this->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$this->global->MAIN_MENUFRONT_SMARTPHONE:$this->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
- }
- // For backward compatibility
- if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_backoffice.php';
- elseif ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_backoffice.php';
-
// Object $mc
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
{
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 32fd57ec3c5..40cad87130f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1971,10 +1971,10 @@ class Form
/**
* Return list of events that triggered an object creation
*
- * @param int $selected Id du type d'origine pre-selectionne
+ * @param int $selected Id or code of type origin to select by default
* @param string $htmlname Nom de la zone select
* @param string $exclude To exclude a code value (Example: SRC_PROP)
- * @param int $addempty Add an empty entry
+ * @param int $addempty Add an empty entry
* @return void
*/
function select_demand_reason($selected='',$htmlname='demandreasonid',$exclude='',$addempty=0)
@@ -1989,7 +1989,7 @@ class Form
{
if ($arraydemandreason['code']==$exclude) continue;
- if ($selected == $arraydemandreason['id'])
+ if ($selected && ($selected == $arraydemandreason['id'] || $selected == $arraydemandreason['code']))
{
print '';
}
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 8ddf40e2abf..a56981b0371 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -530,7 +530,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print ''.$langs->trans("Poste").' ';
print ''.$langs->trans("PhonePro").' ';
print ''.$langs->trans("PhoneMobile").' ';
- print ''.$langs->trans("Fax").' '; // TODO Fax is obsolete, not used by several companies
+ print ''.$langs->trans("Fax").' ';
print ''.$langs->trans("EMail").' ';
print " ";
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
@@ -578,7 +578,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print dol_print_phone($obj->phone_mobile,$country_code,$obj->rowid,$object->id,'AC_TEL');
print ' ';
print '';
- print dol_print_phone($obj->fax,$country_code,$obj->rowid,$object->id,'AC_FAX'); // TODO Fax is obsolete, not used by several companies
+ print dol_print_phone($obj->fax,$country_code,$obj->rowid,$object->id,'AC_FAX');
print ' ';
print '';
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
@@ -586,9 +586,14 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
{
- print ' ';
- print img_object($langs->trans("Rendez-Vous"),"action_rdv");
- print ' ';
+ print ' ';
+ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
+ {
+ print '';
+ print img_object($langs->trans("Rendez-Vous"),"action_rdv");
+ print ' ';
+ }
+ print '';
print img_object($langs->trans("Event"),"action");
print ' ';
}
@@ -731,7 +736,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
// Check parameters
if (! is_object($object)) dol_print_error('','BadParameter');
- $now=dol_now();
+ $now=dol_now('tzuser');
$out='';
if (! empty($conf->agenda->enabled))
@@ -897,7 +902,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
$out='';
$histo=array();
$numaction = 0 ;
- $now=dol_now();
+ $now=dol_now('tzuser');
if (! empty($conf->agenda->enabled))
{
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index 273abe91b7c..b71762a0f60 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -67,8 +67,8 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/comm/list.php?leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 510__+MAX_llx_menu__, 'companies', '', 509__+MAX_llx_menu__, '/societe/soc.php?leftmenu=customers&action=create&type=c', 'MenuNewCustomer', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
-- Third parties - Contacts
-insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses||Contacts@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__);
-insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/fiche.php?leftmenu=contacts&action=create', 'NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
+insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__);
+insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/fiche.php?leftmenu=contacts&action=create', 'NewContactAddress', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=p', 'Prospects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&type=c', 'Customers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__);
diff --git a/htdocs/core/menus/standard/auguria_backoffice.php b/htdocs/core/menus/standard/auguria_backoffice.php
index 99f76275c3f..cbae14ce2cd 100644
--- a/htdocs/core/menus/standard/auguria_backoffice.php
+++ b/htdocs/core/menus/standard/auguria_backoffice.php
@@ -29,15 +29,13 @@
/**
- * \class MenuTop
- * \brief Classe permettant la gestion du menu du haut Auguria
+ * Classe permettant la gestion du menu du haut Auguria
*/
-
class MenuTop
{
var $db;
var $require_left=array("auguria_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
- var $hideifnotallowed=0; // Put 0 for back office menu, 1 for front office menu
+ var $type_user=0; // Put 0 for internal users, 1 for external users
var $atarget=""; // Valeur du target a utiliser dans les liens
@@ -61,7 +59,7 @@ class MenuTop
{
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
- print_auguria_menu($this->db,$this->atarget,$this->hideifnotallowed);
+ print_auguria_menu($this->db,$this->atarget,$this->type_user);
}
}
diff --git a/htdocs/core/menus/standard/auguria_frontoffice.php b/htdocs/core/menus/standard/auguria_frontoffice.php
index 4446cbe483d..a59404b4428 100644
--- a/htdocs/core/menus/standard/auguria_frontoffice.php
+++ b/htdocs/core/menus/standard/auguria_frontoffice.php
@@ -35,7 +35,7 @@ class MenuTop
{
var $db;
var $require_left=array("auguria_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
- var $hideifnotallowed=1; // Put 0 for back office menu, 1 for front office menu
+ var $type_user=1; // Put 0 for internal users, 1 for external users
var $atarget=""; // Valeur du target a utiliser dans les liens
@@ -60,7 +60,7 @@ class MenuTop
{
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria.lib.php';
- print_auguria_menu($this->db,$this->atarget,$this->hideifnotallowed);
+ print_auguria_menu($this->db,$this->atarget,$this->type_user);
}
}
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 0c846a4092e..4ef4ede7015 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -29,7 +29,7 @@
*
* @param DoliDB $db Database handler
* @param string $atarget Target
- * @param int $type_user 0=Internal,1=External,2=All
+ * @param int $type_user 0=Menu for backoffice, 1=Menu for front office
* @return void
*/
function print_eldy_menu($db,$atarget,$type_user)
diff --git a/htdocs/core/menus/standard/eldy_backoffice.php b/htdocs/core/menus/standard/eldy_backoffice.php
index cba3c2fbf2f..b38265e7b12 100644
--- a/htdocs/core/menus/standard/eldy_backoffice.php
+++ b/htdocs/core/menus/standard/eldy_backoffice.php
@@ -28,14 +28,13 @@
/**
- * \class MenuTop
- * \brief Class to manage top menu Eldy (for internal users)
+ * Class to manage top menu Eldy (for internal users)
*/
class MenuTop
{
var $db;
var $require_left=array("eldy_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
- var $hideifnotallowed=0; // Put 0 for back office menu, 1 for front office menu
+ var $type_user=0; // Put 0 for internal users, 1 for external users
var $atarget=""; // Valeur du target a utiliser dans les liens
@@ -59,7 +58,7 @@ class MenuTop
{
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
- print_eldy_menu($this->db,$this->atarget,$this->hideifnotallowed);
+ print_eldy_menu($this->db,$this->atarget,$this->type_user);
}
}
diff --git a/htdocs/core/menus/standard/eldy_frontoffice.php b/htdocs/core/menus/standard/eldy_frontoffice.php
index b6ae55fad70..9ee98e5a296 100644
--- a/htdocs/core/menus/standard/eldy_frontoffice.php
+++ b/htdocs/core/menus/standard/eldy_frontoffice.php
@@ -34,7 +34,7 @@ class MenuTop
{
var $db;
var $require_left=array("eldy_frontoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
- var $hideifnotallowed=1; // Put 0 for back office menu, 1 for front office menu
+ var $type_user=1; // Put 0 for internal users, 1 for external users
var $atarget=""; // Valeur du target a utiliser dans les liens
@@ -58,7 +58,7 @@ class MenuTop
{
require_once DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy.lib.php';
- print_eldy_menu($this->db,$this->atarget,$this->hideifnotallowed);
+ print_eldy_menu($this->db,$this->atarget,$this->type_user);
}
}
diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php
index 9382f6bb333..f67ded5b41f 100644
--- a/htdocs/core/menus/standard/empty.php
+++ b/htdocs/core/menus/standard/empty.php
@@ -28,7 +28,7 @@ class MenuTop
{
var $db;
var $require_left=array("empty"); // If this top menu handler must be used with a particular left menu handler
- var $hideifnotallowed=false; // Put 0 for back office menu, 1 for front office menu
+ var $type_user=0; // Put 0 for internal users, 1 for external users
var $atarget=""; // To store arget to use in menu links
@@ -50,7 +50,7 @@ class MenuTop
*/
function showmenu()
{
- global $user,$conf,$langs,$dolibarr_main_db_name;;
+ global $user,$conf,$langs,$dolibarr_main_db_name;
print_start_menu_array_empty();
diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php
index b5d8ff64189..04d4ac6de93 100644
--- a/htdocs/install/inc.php
+++ b/htdocs/install/inc.php
@@ -199,18 +199,37 @@ if (constant('DOL_DATA_ROOT') && file_exists($lockfile))
// Force usage of log file for install and upgrades
$conf->syslog->enabled=1;
-$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
-if (! defined('SYSLOG_FILE_ON')) define('SYSLOG_FILE_ON',1);
-if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined
-{
- if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
- else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
- else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
- else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
- else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
- //print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
-}
-if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
+$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
+if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined
+{
+ if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
+ else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
+ else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
+ else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
+ else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
+ //print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
+}
+if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
+// We init log handler for install
+$handlers = array('mod_syslog_file');
+foreach ($handlers as $handler)
+{
+ $file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
+ if (!file_exists($file))
+ {
+ throw new Exception('Missing log handler file '.$handler.'.php');
+ }
+
+ require_once $file;
+ $loghandlerinstance = new $handler();
+ if (!$loghandlerinstance instanceof LogHandlerInterface)
+ {
+ throw new Exception('Log handler does not extend LogHandlerInterface');
+ }
+
+ $conf->loghandlers[]=$loghandlerinstance;
+}
+
// Removed magic_quotes
if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP 5.4
diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
index cab42a60716..1f8a79372df 100755
--- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
+++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql
@@ -241,6 +241,11 @@ alter table llx_facturedet add column localtax2_type varchar(1) after localtax2_
ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(1);
ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(1);
+alter table llx_facturedet_rec add column localtax1_type varchar(1) after localtax1_tx;
+alter table llx_facturedet_rec add column localtax2_type varchar(1) after localtax2_tx;
+ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(1);
+ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(1);
+
alter table llx_propaldet add column localtax1_type varchar(1) after localtax1_tx;
alter table llx_propaldet add column localtax2_type varchar(1) after localtax2_tx;
ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(1);
diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec.sql b/htdocs/install/mysql/tables/llx_facturedet_rec.sql
index fe40c1fe97e..94d8cfe440c 100644
--- a/htdocs/install/mysql/tables/llx_facturedet_rec.sql
+++ b/htdocs/install/mysql/tables/llx_facturedet_rec.sql
@@ -29,8 +29,10 @@ create table llx_facturedet_rec
label varchar(255) DEFAULT NULL,
description text,
tva_tx double(6,3) DEFAULT 19.6, -- taux tva
- localtax1_tx double(6,3) DEFAULT 0, -- tax local tax 1
- localtax2_tx double(6,3) DEFAULT 0, -- tax local tax 2
+ localtax1_tx double(6,3) DEFAULT 0, -- localtax1 rate
+ localtax1_type varchar(1) NULL, -- localtax1 type
+ localtax2_tx double(6,3) DEFAULT 0, -- localtax2 rate
+ localtax2_type varchar(1) NULL, -- localtax2 type
qty real, -- quantity
remise_percent real DEFAULT 0, -- pourcentage de remise
remise real DEFAULT 0, -- montant de la remise
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 18ef06ebbb5..67021ac039a 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -167,7 +167,7 @@ FullPathToPostgreSQLdumpCommand= Chemin complet vers la commande pg_dump
ExportOptions= Options d'exportation
AddDropDatabase= Ajouter ordres DROP DATABASE
AddDropTable= Ajouter ordres DROP TABLE
-Structure=Structure
+ExportStructure=Structure
Datas= Données
NameColumn= Nomme les colonnes
ExtendedInsert= Instructions INSERT étendues
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 0daf63ff750..ff5c7299ee1 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1149,8 +1149,22 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$toprightmenu='';
+ // Define menu manager in setup
+ if (empty($user->societe_id)) // If internal user or not defined
+ {
+ $conf->top_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED);
+ $conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
+ }
+ else // If external user
+ {
+ $conf->top_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?$conf->global->MAIN_MENUFRONT_STANDARD:$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
+ $conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
+ }
+ // For backward compatibility
+ if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
+ elseif ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_backoffice.php';
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
-
+
// For backward compatibility with old modules
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php
index fe30daa233a..749e7a7f4d6 100755
--- a/htdocs/theme/amarok/style.css.php
+++ b/htdocs/theme/amarok/style.css.php
@@ -909,7 +909,7 @@ tr.impair table.nobordernopadding td, tr.pair table.nobordernopadding td {paddin
-moz-box-shadow:2px 4px 2px #cccccc;
-webkit-box-shadow:2px 4px 2px #cccccc;
box-shadow:2px 4px 2px #cccccc;
- white-space:nowrap;
+ /*white-space:nowrap;*/
}
.box {