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.
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))
{
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/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"))
{
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();
diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php
index bad34ac83b2..a66eb7509a8 100644
--- a/htdocs/admin/mailing.php
+++ b/htdocs/admin/mailing.php
@@ -41,15 +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();
@@ -101,11 +103,31 @@ 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 '';
-$db->close();
llxFooter();
+$db->close();
?>
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)
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/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/comm/propal.php b/htdocs/comm/propal.php
index e20d67c95ab..3fdf2e22d12 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
{
@@ -1146,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);
@@ -2028,7 +2029,7 @@ else
print '';
print $companystatic->getNomUrl(1,'customer');
print ' | ';
-
+
// Customer ref
print '';
print $objp->ref_client;
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/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');
/**
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index b34ea5a2b2e..2269febfcc5 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";
@@ -2915,7 +2915,7 @@ class Form
}
else
{
- $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$code_pays).'';
+ $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$country_code).'';
return -1;
}
}
@@ -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;
}
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/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/db/mssql.class.php b/htdocs/core/db/mssql.class.php
index 9067effca1d..a2e6a9e3b83 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
@@ -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 d8f18d2971c..6f978b0b0fd 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
@@ -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 3fbda6c3613..7afea5a8da3 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;
@@ -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 ca74e4384bc..a717afe0ec1 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;
@@ -978,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 06d1a460976..c7a02ecded1 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
@@ -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;
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 80018d53d5b..fa6283b8e30 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";
@@ -807,7 +807,10 @@ 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))
+ {
+ $libelleproduitservice.='__N__';
+ }
if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except)
{
@@ -827,7 +830,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 +849,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,9 +859,9 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
}
}
- if ( empty($hideref) )
+ 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 .= " - ";
@@ -885,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;
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 725723bb45a..08c00b66f9a 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);
@@ -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"]))
{
@@ -652,57 +653,57 @@ 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');
}
}
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/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/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/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');
}
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..a4c2ca9b592 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;
@@ -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);
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
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'])) {
|
-
-
+ |
+
|
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);
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..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);
@@ -213,9 +215,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;
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/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/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/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
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
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
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/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;
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 '';
}
else
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';
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');
/*
diff --git a/htdocs/theme/bureau2crea/img/grip.png b/htdocs/theme/bureau2crea/img/grip.png
new file mode 100644
index 00000000000..216e51ca8f0
Binary files /dev/null and b/htdocs/theme/bureau2crea/img/grip.png differ
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;
}
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);
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;
}