This commit is contained in:
Raphaël Doursenaud 2012-05-02 17:29:16 +02:00
commit ea07afd6c2
56 changed files with 238 additions and 171 deletions

View File

@ -66,6 +66,8 @@ For users:
- Fix: Can use POS module with several concurrent 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: Installer don't fails with Mysql version that added a ssl_cypher field.
- Fix: Sanitize input parameters. - Fix: Sanitize input parameters.
- Fix: [ bug #368 ] Product list
- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills
For developers: For developers:
- New: Can add a left menu into an existing top menu or left menu. - New: Can add a left menu into an existing top menu or left menu.

View File

@ -153,7 +153,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
} }
// Build and output PDF // Build and output PDF
if (empty($mode) || $mode=='card' || $mode='cardlogin') if (empty($mode) || $mode=='card' || $mode=='cardlogin')
{ {
if (! count($arrayofmembers)) if (! count($arrayofmembers))
{ {

View File

@ -160,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
{ {
// Creation user // Creation user
$nuser = new User($db); $nuser = new User($db);
$result=$nuser->create_from_member($object,GETPOST('login','alpha')); $result=$nuser->create_from_member($object,GETPOST('login'));
if ($result < 0) if ($result < 0)
{ {
@ -181,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
{ {
// Creation user // Creation user
$company = new Societe($db); $company = new Societe($db);
$result=$company->create_from_member($object,GETPOST('companyname','alpha')); $result=$company->create_from_member($object,GETPOST('companyname'));
if ($result < 0) if ($result < 0)
{ {

View File

@ -52,7 +52,7 @@ $search_login=GETPOST("search_login");
$type=GETPOST("type"); $type=GETPOST("type");
$search_email=GETPOST("search_email"); $search_email=GETPOST("search_email");
$search_categ=GETPOST("search_categ"); $search_categ=GETPOST("search_categ");
$sall=GETPOST("sall",'int'); $sall=GETPOST("sall");
if (GETPOST("button_removefilter")) if (GETPOST("button_removefilter"))
{ {

View File

@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
$langs->load("admin"); $langs->load("admin");
$langs->load("errors"); $langs->load("errors");
$langs->load("orders");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -49,6 +49,8 @@ if ($action == 'setvalue' && $user->admin)
if (! $res > 0) $error++; if (! $res > 0) $error++;
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity); $res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++; if (! $res > 0) $error++;
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error) if (! $error)
{ {
@ -101,11 +103,31 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail")); if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
print '</td></tr>'; print '</td></tr>';
/*
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("ActivateCheckRead").'</td><td>';
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=0">';
print img_picto($langs->trans("Enabled"),'switch_on');
print '</a>';
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=1">';
print img_picto($langs->trans("Disabled"),'switch_off');
print '</a>';
}
print '</td></tr>';
*/
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>'; print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
print '</table></form>'; print '</table></form>';
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@ -47,12 +47,12 @@ $modules = array();
$modules_names = array(); $modules_names = array();
$modules_files = array(); $modules_files = array();
// Search modules dirs
$modulesdir = array();
foreach ($conf->file->dol_document_root as $type => $dirroot) foreach ($conf->file->dol_document_root as $type => $dirroot)
{ {
$modulesdir[] = $dirroot . "/core/modules/"; $modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/';
if ($type == 'alt')
{
$handle=@opendir($dirroot); $handle=@opendir($dirroot);
if (is_resource($handle)) if (is_resource($handle))
{ {
@ -62,14 +62,15 @@ foreach ($conf->file->dol_document_root as $type => $dirroot)
{ {
if (is_dir($dirroot . '/' . $file . '/core/modules/')) if (is_dir($dirroot . '/' . $file . '/core/modules/'))
{ {
$modulesdir[] = $dirroot . '/' . $file . '/core/modules/'; $modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/';
} }
} }
} }
closedir($handle); closedir($handle);
} }
}
} }
//var_dump($modulesdir);
// Load list of modules // Load list of modules
foreach($modulesdir as $dir) foreach($modulesdir as $dir)

View File

@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='<div class="error">'.$_GET["msg"].'</div>';
$urldolibarr='http://www.dolibarr.org/downloads/'; $urldolibarr='http://www.dolibarr.org/downloads/';
//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon';
$urldolibarrmodules='http://www.dolistore.com/'; $urldolibarrmodules='http://www.dolistore.com/';
//$urldolibarrthemes='http://www.dolibarr.org/';
$urldolibarrthemes='http://www.dolistore.com/'; $urldolibarrthemes='http://www.dolistore.com/';
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT); $dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot); $dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);

View File

@ -57,7 +57,7 @@ $substitutionarray=array(
'__SIGNATURE__' => 'Signature', '__SIGNATURE__' => 'Signature',
'__PERSONALIZED__' => 'Personalized' '__PERSONALIZED__' => 'Personalized'
); );
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
{ {
$substitutionarray=array_merge( $substitutionarray=array_merge(
$substitutionarray, $substitutionarray,
@ -81,7 +81,7 @@ $substitutionarrayfortest=array(
'__SIGNATURE__' => 'TESTSignature', '__SIGNATURE__' => 'TESTSignature',
'__PERSONALIZED__' => 'TESTPersonalized' '__PERSONALIZED__' => 'TESTPersonalized'
); );
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
{ {
$substitutionarrayfortest=array_merge( $substitutionarrayfortest=array_merge(
$substitutionarrayfortest, $substitutionarrayfortest,
@ -1043,7 +1043,7 @@ else
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>'; print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
print '__ID__ = '.$langs->trans("IdRecord").'<br>'; print '__ID__ = '.$langs->trans("IdRecord").'<br>';
print '__EMAIL__ = '.$langs->trans("EMail").'<br>'; print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE) if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
{ {
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>'; print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>'; print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';

View File

@ -834,6 +834,7 @@ else if ($action == "addline" && $user->rights->propale->creer)
unset($_POST['np_price']); unset($_POST['np_price']);
unset($_POST['dp_desc']); unset($_POST['dp_desc']);
unset($_POST['np_tva_tx']); unset($_POST['np_tva_tx']);
unset($_POST['np_desc']);
} }
else else
{ {
@ -1146,7 +1147,7 @@ if ($id > 0 || ! empty($ref))
//'text' => $langs->trans("ConfirmClone"), //'text' => $langs->trans("ConfirmClone"),
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), //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' => '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 // 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); $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$object->ref),'confirm_clone',$formquestion,'yes',1);

View File

@ -2444,7 +2444,7 @@ class Commande extends CommonObject
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort'); 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==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==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('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort');
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort'); 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==-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==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==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('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill');
if ($statut==3 && $facturee) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed'); 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==-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==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==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('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7');
if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6'); if ($statut==3 && $facturee) return $langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6');
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * 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 * 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."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.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');
/** /**

View File

@ -189,8 +189,8 @@ class Form
else else
{ {
if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); 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 == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day');
elseif ($typeofdata == 'text' || $typeofdata == 'textarea') $ret.=dol_htmlentitiesbr($value);
else if (preg_match('/^select;/',$typeofdata)) else if (preg_match('/^select;/',$typeofdata))
{ {
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata)); $arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
@ -2915,7 +2915,7 @@ class Form
} }
else else
{ {
$this->error = '<font class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$code_pays).'</font>'; $this->error = '<font class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$country_code).'</font>';
return -1; return -1;
} }
} }

View File

@ -506,7 +506,7 @@ class FormCompany
* @param string $var_id Name of id field * @param string $var_id Name of id field
* @param string $selected Pre-selected third party * @param string $selected Pre-selected third party
* @param string $htmlname Name of HTML form * @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 * @param int $forceid This is to force antoher object id than object->id
* @return void * @return void
* TODO obsolete ? * TODO obsolete ?

View File

@ -411,7 +411,7 @@ class Menubase
* Load entries found in database in a menu array. * 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 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 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 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...) * @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...)

View File

@ -38,9 +38,9 @@ class DoliDBMssql
//! Database label //! Database label
static $label='MSSQL'; static $label='MSSQL';
//! Charset used to force charset when creating database //! 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 //! 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 //! Version min database
static $versionmin=array(2000); static $versionmin=array(2000);
//! Resultset of last request //! Resultset of last request
@ -796,9 +796,12 @@ class DoliDBMssql
*/ */
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
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 // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database; $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); $ret=$this->query($sql);
if (! $ret) if (! $ret)
{ {

View File

@ -38,9 +38,9 @@ class DoliDBMysql
//! Database label //! Database label
static $label='MySQL'; static $label='MySQL';
//! Charset used to force charset when creating database //! 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 //! 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 //! Version min database
static $versionmin=array(4,1,0); static $versionmin=array(4,1,0);
//! Resultset of last request //! Resultset of last request
@ -797,7 +797,7 @@ class DoliDBMysql
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; 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 // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database; $sql = 'CREATE DATABASE '.$database;

View File

@ -38,9 +38,9 @@ class DoliDBMysqli
//! Database label //! Database label
static $label='MySQL'; static $label='MySQL';
//! Charset used to force charset when creating database //! 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 //! 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 //! Version min database
static $versionmin=array(4,1,0); static $versionmin=array(4,1,0);
//! Resultset of last request //! Resultset of last request
@ -791,7 +791,7 @@ class DoliDBMysqli
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; 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 // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database; $sql = 'CREATE DATABASE '.$database;

View File

@ -40,7 +40,7 @@ class DoliDBPgsql
//! Database label //! Database label
static $label='PostgreSQL'; // Label of manager static $label='PostgreSQL'; // Label of manager
//! Charset //! Charset
static $forcecharset='latin1'; var $forcecharset='latin1'; // Can't be static as it may be forced with a dynamic value
//! Version min database //! Version min database
static $versionmin=array(8,4,0); // Version min database static $versionmin=array(8,4,0); // Version min database
@ -81,8 +81,9 @@ class DoliDBPgsql
{ {
global $conf,$langs; global $conf,$langs;
$this->forcecharset=$conf->file->character_set_client; if (! empty($conf->db->character_set)) $this->forcecharset=$conf->db->character_set;
$this->forcecollate=$conf->db->dolibarr_main_db_collation; if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation;
$this->database_user=$user; $this->database_user=$user;
$this->transaction_opened=0; $this->transaction_opened=0;
@ -978,7 +979,7 @@ class DoliDBPgsql
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; 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.'\''); $ret=$this->query('CREATE DATABASE '.$database.' OWNER '.$owner.' ENCODING \''.$charset.'\'');
return $ret; return $ret;

View File

@ -38,9 +38,9 @@ class DoliDBSqlite
//! Database label //! Database label
static $label='PDO Sqlite'; static $label='PDO Sqlite';
//! Charset used to force charset when creating database //! 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 //! 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 //! Version min database
static $versionmin=array(3,0,0); static $versionmin=array(3,0,0);
//! Resultset of last request //! Resultset of last request
@ -939,7 +939,7 @@ class DoliDBSqlite
function DDLCreateDb($database,$charset='',$collation='',$owner='') function DDLCreateDb($database,$charset='',$collation='',$owner='')
{ {
if (empty($charset)) $charset=$this->forcecharset; 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 // ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database; $sql = 'CREATE DATABASE '.$database;

View File

@ -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 ($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 ($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"; $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 // Description long of product line
if ($desc && ($desc != $label)) 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) 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 ($idprod)
{ {
if ( empty($hidedesc) ) $libelleproduitservice.=$desc; if (empty($hidedesc)) $libelleproduitservice.=$desc;
} }
else else
{ {
@ -846,7 +849,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
$ref_prodserv = ""; $ref_prodserv = "";
if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this 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")." "; $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 else $ref_prodserv = $prodser->ref; // Show local ref only
$ref_prodserv .= " - "; $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)).')'; $period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')';
} }
//print '>'.$outputlangs->charset_output.','.$period; //print '>'.$outputlangs->charset_output.','.$period;
$libelleproduitservice.="\n".$period; $libelleproduitservice.="__N__".$period;
//print $libelleproduitservice; //print $libelleproduitservice;
} }
// Now we convert \n into br // Now we convert \n into br
if (dol_textishtml($libelleproduitservice)) $libelleproduitservice=preg_replace('/__N__/','<br>',$libelleproduitservice);
else $libelleproduitservice=preg_replace('/__N__/',"\n",$libelleproduitservice);
$libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1); $libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1);
return $libelleproduitservice; return $libelleproduitservice;

View File

@ -77,7 +77,7 @@ function print_auguria_menu($db,$atarget,$type_user)
// Define the class (top menu selected or not) // Define the class (top menu selected or not)
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; 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"'; else $classname='class="tmenu"';
print_start_menu_entry_auguria($idsel); print_start_menu_entry_auguria($idsel);

View File

@ -472,7 +472,7 @@ function print_eldy_menu($db,$atarget,$type_user)
// Define the class (top menu selected or not) // Define the class (top menu selected or not)
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; 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"'; else $classname='class="tmenu"';
print_start_menu_entry($idsel); 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"])) if (isset($_GET["mainmenu"]))
{ {
// On sauve en session le menu principal choisi // On sauve en session le menu principal choisi
$mainmenu=$_GET["mainmenu"]; $_SESSION["mainmenu"]=$_GET["mainmenu"];
$_SESSION["mainmenu"]=$mainmenu;
$_SESSION["leftmenuopened"]=""; $_SESSION["leftmenuopened"]="";
$mainmenu=$_GET["mainmenu"];
} }
else else
{ {
// On va le chercher en session si non defini par le lien // On va le chercher en session si non defini par le lien
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:''; $mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
} }
//print 'mainmenu='.$mainmenu.' SESSION='.$_SESSION["mainmenu"].' GLOBAL='.$GLOBALS["mainmenu"];
if (isset($_GET["leftmenu"])) if (isset($_GET["leftmenu"]))
{ {
@ -652,57 +653,57 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
$langs->load("help"); $langs->load("help");
// Setup // 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") if ($leftmenu=="setup")
{ {
$newmenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"),1); $newmenu->add("/admin/company.php?mainmenu=home", $langs->trans("MenuCompanySetup"),1);
$newmenu->add("/admin/modules.php", $langs->trans("Modules"),1); $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules"),1);
$newmenu->add("/admin/menus.php", $langs->trans("Menus"),1); $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1);
$newmenu->add("/admin/ihm.php", $langs->trans("GUISetup"),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 (! 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); if ($leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1);
} }
$newmenu->add("/admin/boxes.php", $langs->trans("Boxes"),1); $newmenu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"),1);
$newmenu->add("/admin/delais.php",$langs->trans("Alerts"),1); $newmenu->add("/admin/delais.php?mainmenu=home",$langs->trans("Alerts"),1);
$newmenu->add("/admin/proxy.php", $langs->trans("Security"),1); $newmenu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"),1);
$newmenu->add("/admin/limits.php", $langs->trans("MenuLimits"),1); $newmenu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"),1);
$newmenu->add("/admin/pdf.php", $langs->trans("PDF"),1); $newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"),1);
$newmenu->add("/admin/mails.php", $langs->trans("Emails"),1); $newmenu->add("/admin/mails.php?mainmenu=home", $langs->trans("Emails"),1);
$newmenu->add("/admin/sms.php", $langs->trans("Sms"),1); $newmenu->add("/admin/sms.php?mainmenu=home", $langs->trans("Sms"),1);
$newmenu->add("/admin/dict.php", $langs->trans("DictionnarySetup"),1); $newmenu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionnarySetup"),1);
$newmenu->add("/admin/const.php", $langs->trans("OtherSetup"),1); $newmenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"),1);
} }
// System info // 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") if ($leftmenu=="system")
{ {
$newmenu->add("/admin/system/dolibarr.php", $langs->trans("Dolibarr"),1); $newmenu->add("/admin/system/dolibarr.php?mainmenu=home", $langs->trans("Dolibarr"),1);
$newmenu->add("/admin/system/constall.php", $langs->trans("AllParameters"),2); $newmenu->add("/admin/system/constall.php?mainmenu=home", $langs->trans("AllParameters"),2);
$newmenu->add("/admin/system/modules.php", $langs->trans("Modules"),2); $newmenu->add("/admin/system/modules.php?mainmenu=home", $langs->trans("Modules"),2);
$newmenu->add("/admin/triggers.php", $langs->trans("Triggers"),2); $newmenu->add("/admin/triggers.php?mainmenu=home", $langs->trans("Triggers"),2);
$newmenu->add("/admin/system/about.php", $langs->trans("About"),2); $newmenu->add("/admin/system/about.php?mainmenu=home", $langs->trans("About"),2);
$newmenu->add("/admin/system/os.php", $langs->trans("OS"),1); $newmenu->add("/admin/system/os.php?mainmenu=home", $langs->trans("OS"),1);
$newmenu->add("/admin/system/web.php", $langs->trans("WebServer"),1); $newmenu->add("/admin/system/web.php?mainmenu=home", $langs->trans("WebServer"),1);
$newmenu->add("/admin/system/phpinfo.php", $langs->trans("Php"),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); //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.php?mainmenu=home", $langs->trans("Database"),1);
$newmenu->add("/admin/system/database-tables.php", $langs->trans("Tables"),2); $newmenu->add("/admin/system/database-tables.php?mainmenu=home", $langs->trans("Tables"),2);
$newmenu->add("/admin/system/database-tables-contraintes.php", $langs->trans("Constraints"),2); $newmenu->add("/admin/system/database-tables-contraintes.php?mainmenu=home", $langs->trans("Constraints"),2);
} }
// System info // 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") if ($leftmenu=="admintools")
{ {
$newmenu->add("/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1); $newmenu->add("/admin/tools/dolibarr_export.php?mainmenu=home", $langs->trans("Backup"),1);
$newmenu->add("/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1); $newmenu->add("/admin/tools/dolibarr_import.php?mainmenu=home", $langs->trans("Restore"),1);
$newmenu->add("/admin/tools/update.php", $langs->trans("MenuUpgrade"),1); $newmenu->add("/admin/tools/update.php?mainmenu=home", $langs->trans("MenuUpgrade"),1);
if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php", $langs->trans("EAccelerator"),1); if (function_exists('eaccelerator_info')) $newmenu->add("/admin/tools/eaccelerator.php?mainmenu=home", $langs->trans("EAccelerator"),1);
$newmenu->add("/admin/tools/listevents.php", $langs->trans("Audit"),1); $newmenu->add("/admin/tools/listevents.php?mainmenu=home", $langs->trans("Audit"),1);
$newmenu->add("/admin/tools/listsessions.php", $langs->trans("Sessions"),1); $newmenu->add("/admin/tools/listsessions.php?mainmenu=home", $langs->trans("Sessions"),1);
$newmenu->add("/admin/tools/purge.php", $langs->trans("Purge"),1); $newmenu->add("/admin/tools/purge.php?mainmenu=home", $langs->trans("Purge"),1);
$newmenu->add("/support/index.php", $langs->trans("HelpCenter"),1,1,'targethelp'); $newmenu->add("/support/index.php?mainmenu=home", $langs->trans("HelpCenter"),1,1,'targethelp');
} }
} }

View File

@ -235,7 +235,7 @@ class pdf_einstein extends ModelePDFCommandes
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -195,7 +195,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
if (! empty($object->note_public)) if (! empty($object->note_public))
{ {
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $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(); $nexY = $pdf->GetY();

View File

@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -185,7 +185,7 @@ class pdf_soleil extends ModelePDFFicheinter
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -156,7 +156,7 @@ abstract class ModeleNumRefFicheinter
*/ */
function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) 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"); $langs->load("ficheinter");
$error=0; $error=0;

View File

@ -213,7 +213,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -177,7 +177,7 @@ class pdf_standardlabel
else else
{ {
$pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height); $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!='') // 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); 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); 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->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 else
{ {
$pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height); $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->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'); $pdf->MultiCell(round($this->_Width/2)-2, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R');
} }

View File

@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects
if (! empty($object->note_public)) if (! empty($object->note_public))
{ {
$pdf->SetFont('','', $default_font_size - 1); $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(); $nexY = $pdf->GetY();
$height_note=$nexY-($tab_top-2); $height_note=$nexY-($tab_top-2);

View File

@ -222,7 +222,7 @@ class pdf_azur extends ModelePDFPropales
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -222,7 +222,7 @@ class pdf_jaune extends ModelePDFPropales
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -228,7 +228,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;
@ -398,7 +398,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // 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'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -241,7 +241,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages $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(); $nexY = $pdf->GetY();
$height_note=$nexY-$tab_top; $height_note=$nexY-$tab_top;

View File

@ -133,8 +133,8 @@ if (! empty($hookmanager->resArray['options'])) {
</table> </table>
</td> </td>
<td align="center" valign="top"> <td align="center" valign="middle">
<img alt="Logo" title="" src="<?php echo $urllogo; ?>" /> <img alt="Logo" title="" src="<?php echo $urllogo; ?>" id="img_logo" />
</td> </td>
</tr> </tr>

View File

@ -53,8 +53,8 @@ if (! defined('LOG_DEBUG'))
} }
} }
// Forcage du parametrage PHP error_reporting (Dolibarr non utilisable en mode error E_ALL) // Force PHP error_reporting setup (Dolibarr may report warning without this)
error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));
//error_reporting(E_ALL | E_STRICT); //error_reporting(E_ALL | E_STRICT);

View File

@ -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 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_categorie (fk_categorie);
ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_societe (fk_societe); 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_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); 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; 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) -- 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 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); 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'; -- 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; ALTER TABLE llx_propal MODIFY fk_projet integer DEFAULT NULL;

View File

@ -29,6 +29,7 @@ StatusOrderDraftShort=Esborrany
StatusOrderValidatedShort=Validada StatusOrderValidatedShort=Validada
StatusOrderOnProcessShort=Per rebre StatusOrderOnProcessShort=Per rebre
StatusOrderSentShort=Expedició en curs StatusOrderSentShort=Expedició en curs
StatusOrderSent=Enviament en curs
StatusOrderProcessedShort=Processada StatusOrderProcessedShort=Processada
StatusOrderToBillShort=A facturar StatusOrderToBillShort=A facturar
StatusOrderApprovedShort=Aprovada 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_BILLING=Contacte proveïdor facturació comanda
TypeContact_order_supplier_external_SHIPPING=Contacte proveïdor lliurament comanda TypeContact_order_supplier_external_SHIPPING=Contacte proveïdor lliurament comanda
TypeContact_order_supplier_external_CUSTOMER=Contacte proveïdor seguiment comanda TypeContact_order_supplier_external_CUSTOMER=Contacte proveïdor seguiment comanda
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON no definida Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON no definida
Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_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_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' Error_FailedToLoad_COMMANDE_ADDON_File=Error en la càrrega de l'arxiu mòdul '%s'
# Sources # Sources
OrderSource0=Pressupost OrderSource0=Pressupost
OrderSource1=Internet OrderSource1=Internet
@ -134,9 +137,11 @@ OrderSource6=Revistes
QtyOrdered=Qt. demanda QtyOrdered=Qt. demanda
AddDeliveryCostLine=Afegir una línia de despeses de ports indicant el pes de la comanda AddDeliveryCostLine=Afegir una línia de despeses de ports indicant el pes de la comanda
SetDemandReason=Indicar origen de la comanda SetDemandReason=Indicar origen de la comanda
# Document models # Document models
PDFEinsteinDescription=Model de comanda complet (logo...) PDFEinsteinDescription=Model de comanda complet (logo...)
PDFEdisonDescription=Model de comanda simple PDFEdisonDescription=Model de comanda simple
# Orders modes # Orders modes
OrderByMail=Correu OrderByMail=Correu
OrderByFax=Fax OrderByFax=Fax

View File

@ -36,6 +36,7 @@ ECMSearchByEntity=Search by object
ECMSectionOfDocuments=Directories of documents ECMSectionOfDocuments=Directories of documents
ECMTypeManual=Manual ECMTypeManual=Manual
ECMTypeAuto=Automatic ECMTypeAuto=Automatic
ECMDocsBySocialContributions=Documents linked to social contributions
ECMDocsByThirdParties=Documents linked to third parties ECMDocsByThirdParties=Documents linked to third parties
ECMDocsByProposals=Documents linked to proposals ECMDocsByProposals=Documents linked to proposals
ECMDocsByOrders=Documents linked to customers orders ECMDocsByOrders=Documents linked to customers orders

View File

@ -28,6 +28,7 @@ StatusOrderCanceledShort=Canceled
StatusOrderDraftShort=Draft StatusOrderDraftShort=Draft
StatusOrderValidatedShort=Validated StatusOrderValidatedShort=Validated
StatusOrderSentShort=In process StatusOrderSentShort=In process
StatusOrderSent=Shipment in process
StatusOrderOnProcessShort=Reception StatusOrderOnProcessShort=Reception
StatusOrderProcessedShort=Processed StatusOrderProcessedShort=Processed
StatusOrderToBillShort=To bill StatusOrderToBillShort=To bill

View File

@ -29,6 +29,7 @@ StatusOrderDraftShort=Borrador
StatusOrderValidatedShort=Validado StatusOrderValidatedShort=Validado
StatusOrderOnProcessShort=Pdte. Recibir StatusOrderOnProcessShort=Pdte. Recibir
StatusOrderSentShort=Expedición en curso StatusOrderSentShort=Expedición en curso
StatusOrderSent=Envío en curso
StatusOrderProcessedShort=Procesado StatusOrderProcessedShort=Procesado
StatusOrderToBillShort=A facturar StatusOrderToBillShort=A facturar
StatusOrderApprovedShort=Aprobado 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_BILLING=Contacto proveedor facturación pedido
TypeContact_order_supplier_external_SHIPPING=Contacto proveedor entrega pedido TypeContact_order_supplier_external_SHIPPING=Contacto proveedor entrega pedido
TypeContact_order_supplier_external_CUSTOMER=Contacto proveedor seguimiento pedido TypeContact_order_supplier_external_CUSTOMER=Contacto proveedor seguimiento pedido
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON no definida Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON no definida
Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_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_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' Error_FailedToLoad_COMMANDE_ADDON_File=Error en la carga del archivo módulo '%s'
# Sources # Sources
OrderSource0=Presupuesto OrderSource0=Presupuesto
OrderSource1=Internet OrderSource1=Internet
@ -134,9 +137,11 @@ OrderSource6=Revistas
QtyOrdered=Cant. pedida QtyOrdered=Cant. pedida
AddDeliveryCostLine=Añadir una línea de gastos de portes indicando el peso del pedido AddDeliveryCostLine=Añadir una línea de gastos de portes indicando el peso del pedido
SetDemandReason=Indicar origen del pedido SetDemandReason=Indicar origen del pedido
# Document models # Document models
PDFEinsteinDescription=Modelo de pedido completo (logo...) PDFEinsteinDescription=Modelo de pedido completo (logo...)
PDFEdisonDescription=Modelo de pedido simple PDFEdisonDescription=Modelo de pedido simple
# Orders modes # Orders modes
OrderByMail=Correo OrderByMail=Correo
OrderByFax=Fax OrderByFax=Fax

View File

@ -36,6 +36,7 @@ ECMSearchByEntity=Recherche par objet
ECMSectionOfDocuments=Répertoires des documents ECMSectionOfDocuments=Répertoires des documents
ECMTypeManual=Manuel ECMTypeManual=Manuel
ECMTypeAuto=Automatique ECMTypeAuto=Automatique
ECMDocsBySocialContributions=Documents associés à des charges sociales
ECMDocsByThirdParties=Documents associés aux tiers ECMDocsByThirdParties=Documents associés aux tiers
ECMDocsByProposals=Documents associés aux propositions ECMDocsByProposals=Documents associés aux propositions
ECMDocsByOrders=Documents associés aux commandes ECMDocsByOrders=Documents associés aux commandes

View File

@ -29,6 +29,7 @@ StatusOrderDraftShort=Brouillon
StatusOrderValidatedShort=Validée StatusOrderValidatedShort=Validée
StatusOrderOnProcessShort=Réception StatusOrderOnProcessShort=Réception
StatusOrderSentShort=Envoi en cours StatusOrderSentShort=Envoi en cours
StatusOrderSent=Envoi en cours
StatusOrderProcessedShort=Traitée StatusOrderProcessedShort=Traitée
StatusOrderToBillShort=À facturer StatusOrderToBillShort=À facturer
StatusOrderApprovedShort=Approuvée StatusOrderApprovedShort=Approuvée

View File

@ -163,6 +163,13 @@ $sessiontimeout='DOLSESSTIMEOUT_'.$prefix;
if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]); if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]);
session_name($sessionname); session_name($sessionname);
session_start(); 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 // Init the 5 global objects
// This include will set: $conf, $db, $langs, $user, $mysoc 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'); dol_syslog('User not found, connexion refused');
session_destroy(); session_destroy();
session_name($sessionname); session_name($sessionname);
session_start(); session_start(); // Fixing the bug of register_globals here is useless since session is empty
if ($resultFetchUser == 0) 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); dol_syslog("Can't load user even if session logged. _SESSION['dol_login']=".$login, LOG_WARNING);
session_destroy(); session_destroy();
session_name($sessionname); session_name($sessionname);
session_start(); session_start(); // Fixing the bug of register_globals here is useless since session is empty
if ($resultFetchUser == 0) if ($resultFetchUser == 0)
{ {

View File

@ -22,8 +22,17 @@
* \brief Page with Paypal init var. * \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 // PayPal Express Checkout Module

View File

@ -736,7 +736,6 @@ class Project extends CommonObject
$this->id = 0; $this->id = 0;
$this->ref = 'SPECIMEN'; $this->ref = 'SPECIMEN';
$this->specimen = 1; $this->specimen = 1;
$socid = rand(1, $num_socs);
$this->socid = 1; $this->socid = 1;
$this->date_c = $now; $this->date_c = $now;
$this->date_m = $now; $this->date_m = $now;

View File

@ -248,8 +248,8 @@ if ($id > 0 || ! empty($ref))
print '</form>'; print '</form>';
// Line to add external contact. Only if project is linked to a third party. // Line to add external contact. Only if project is linked to a third party.
if ($project->societe->id) //if ($project->societe->id)
{ //{
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="addcontact">'; print '<input type="hidden" name="action" value="addcontact">';
@ -265,12 +265,12 @@ if ($id > 0 || ! empty($ref))
print '<td colspan="1">'; print '<td colspan="1">';
$selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id; $selectedCompany = isset($_GET["newcompany"])?$_GET["newcompany"]:$project->societe->id;
$selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany'); $selectedCompany = $formcompany->selectCompaniesForNewContact($project, 'id', $selectedCompany, 'newcompany', (empty($project->societe->id)?array():array($project->societe->id)));
print '</td>'; print '</td>';
print '<td colspan="1">'; print '<td colspan="1">';
$nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid'); $nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined"); //if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print '</td>'; print '</td>';
print '<td>'; print '<td>';
$formcompany->selectTypeContact($project, '', 'type','external','rowid'); $formcompany->selectTypeContact($project, '', 'type','external','rowid');
@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>'; print '</tr>';
print "</form>"; print "</form>";
} //}
print '<tr><td colspan="6">&nbsp;</td></tr>'; print '<tr><td colspan="6">&nbsp;</td></tr>';
} }

View File

@ -416,7 +416,9 @@ else
// Customer // Customer
print '<tr><td>'.$langs->trans("Company").'</td><td>'; print '<tr><td>'.$langs->trans("Company").'</td><td>';
print $form->select_company($project->societe->id,'socid','',1,1); $text=$form->select_company($project->societe->id,'socid','',1,1);
$texthelp=$langs->trans("IfNeedToUseOhterObjectKeepEmpty");
print $form->textwithtooltip($text.' '.img_help(),$texthelp,1);
print '</td></tr>'; print '</td></tr>';
// Visibility // Visibility

View File

@ -55,9 +55,6 @@ require_once(DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php');
// Security check // Security check
if (! $conf->agenda->enabled) accessforbidden('',1,1,1); 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 // Define format, type and filter
$format='ical'; $format='ical';
$type='event'; $type='event';

View File

@ -32,7 +32,7 @@ require("../../main.inc.php");
$id=GETPOST('tag'); $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');
/* /*

View File

@ -39,7 +39,7 @@ $langs->load("mails");
$id=GETPOST('tag'); $id=GETPOST('tag');
$unsuscrib=GETPOST('unsuscrib'); $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');
/* /*

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

View File

@ -403,7 +403,7 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active {
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
margin: 0px 1px 2px 1px; margin: 0px 1px 2px 1px;
white-space: nowrap; white-space: nowrap;
text-shadow: 1px 2px 4px #BFBFBF; text-shadow: 1px 1px 1px #BFBFBF;
} }
a.tmenu:link, a.tmenu:visited { a.tmenu:link, a.tmenu:visited {
color: #<?php echo $colortextmain; ?>; color: #<?php echo $colortextmain; ?>;
@ -416,7 +416,7 @@ a.tmenu:hover, a.tmenu:active {
border-top: 1px solid #D8D8D8; border-top: 1px solid #D8D8D8;
border-bottom: 2px solid #F4F4F4; border-bottom: 2px solid #F4F4F4;
background: #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 { 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-<?php print $left; ?>: 1px solid #D8D8D8; border-<?php print $left; ?>: 1px solid #D8D8D8;
border-bottom: 2px solid #F4F4F4; border-bottom: 2px solid #F4F4F4;
white-space: nowrap; white-space: nowrap;
text-shadow: 1px 2px 4px #BFBFBF; text-shadow: 1px 1px 1px #BFBFBF;
} }

View File

@ -938,12 +938,12 @@ class User extends CommonObject
// Positionne parametres // Positionne parametres
$this->admin = 0; $this->admin = 0;
$this->nom = $member->nom; $this->lastname = $member->lastname;
$this->prenom = $member->prenom; $this->firstname = $member->firstname;
$this->email = $member->email; $this->email = $member->email;
$this->pass = $member->pass; $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->login = $login;
$this->db->begin(); $this->db->begin();
@ -1047,8 +1047,8 @@ class User extends CommonObject
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
// Clean parameters // Clean parameters
$this->nom = trim($this->nom); // TODO deprecated $this->nom = trim($this->nom); // deprecated
$this->prenom = trim($this->prenom); // TODO deprecated $this->prenom = trim($this->prenom); // deprecated
$this->lastname = trim($this->lastname); $this->lastname = trim($this->lastname);
$this->firstname = trim($this->firstname); $this->firstname = trim($this->firstname);
$this->login = trim($this->login); $this->login = trim($this->login);
@ -1142,8 +1142,10 @@ class User extends CommonObject
if ($result >= 0) if ($result >= 0)
{ {
$adh->prenom=$this->firstname; $adh->prenom=$this->firstname; // deprecated
$adh->nom=$this->lastname; $adh->nom=$this->lastname; // deprecated
$adh->firstname=$this->firstname;
$adh->lastname=$this->lastname;
$adh->login=$this->login; $adh->login=$this->login;
$adh->pass=$this->pass; $adh->pass=$this->pass;
$adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe); $adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe);

View File

@ -70,8 +70,6 @@ if ($action == 'validatenewpassword' && $username && $passwordmd5)
{ {
$newpassword=$edituser->setPassword($user,$edituser->pass_temp,0); $newpassword=$edituser->setPassword($user,$edituser->pass_temp,0);
dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); 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.'/'); header("Location: ".DOL_URL_ROOT.'/');
exit; exit;
} }