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: 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.

View File

@ -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))
{

View File

@ -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)
{

View File

@ -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"))
{

View File

@ -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();

View File

@ -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 '<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"));
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 '</table></form>';
$db->close();
llxFooter();
$db->close();
?>

View File

@ -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)

View File

@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='<div class="error">'.$_GET["msg"].'</div>';
$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").'<br>';
print '</form>';
llxFooter();
?>
?>

View File

@ -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 '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
print '__ID__ = '.$langs->trans("IdRecord").'<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 '__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['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 '<td>';
print $companystatic->getNomUrl(1,'customer');
print '</td>';
// Customer ref
print '<td nowrap="nowrap">';
print $objp->ref_client;

View File

@ -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');
}

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* 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
* 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');
/**

View File

@ -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 = '<font class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$code_pays).'</font>';
$this->error = '<font class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry",$country_code).'</font>';
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='<select id="'.$htmlname.'" '.($disabled?'disabled="disabled" ':'').'class="flat" name="'.$htmlname.'" '.($option != ''?$option:'').'>';
@ -3413,7 +3413,7 @@ class Form
}
$out.='>';
$newval=($translate?$langs->trans(ucfirst($value)):$value);
if ($key_in_label)
{
@ -3434,7 +3434,7 @@ class Form
$out.="</select>";
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.= '</select>'."\n";
return $out;
}

View File

@ -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 ?

View File

@ -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...)

View File

@ -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)
{

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

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 ($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__/','<br>',$libelleproduitservice);
else $libelleproduitservice=preg_replace('/__N__/',"\n",$libelleproduitservice);
$libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1);
return $libelleproduitservice;

View File

@ -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);

View File

@ -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');
}
}

View File

@ -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;

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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');
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

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

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 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;

View File

@ -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

View File

@ -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

View File

@ -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
OrderByPhone=Phone

View File

@ -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

View File

@ -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

View File

@ -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
OrderByPhone=Téléphone

View File

@ -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)
{

View File

@ -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

View File

@ -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;

View File

@ -248,8 +248,8 @@ if ($id > 0 || ! empty($ref))
print '</form>';
// 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 '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="addcontact">';
@ -265,12 +265,12 @@ if ($id > 0 || ! empty($ref))
print '<td colspan="1">';
$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 colspan="1">';
$nbofcontacts=$form->select_contacts($selectedCompany, '', 'contactid');
if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
//if ($nbofcontacts == 0) print $langs->trans("NoContactDefined");
print '</td>';
print '<td>';
$formcompany->selectTypeContact($project, '', 'type','external','rowid');
@ -287,7 +287,7 @@ if ($id > 0 || ! empty($ref))
print '</tr>';
print "</form>";
}
//}
print '<tr><td colspan="6">&nbsp;</td></tr>';
}

View File

@ -416,7 +416,9 @@ else
// Customer
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>';
// Visibility
@ -449,7 +451,7 @@ else
print '<div align="center"><br>';
print '<input name="update" class="button" type="submit" value="'.$langs->trans("Modify").'"> &nbsp; ';
print '<input type="submit" class="button" name="cancel" Value="'.$langs->trans("Cancel").'"></div>';
print '</form>';
}
else

View File

@ -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';

View File

@ -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');
/*

View File

@ -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');
/*

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;
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: #<?php echo $colortextmain; ?>;
@ -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-<?php print $left; ?>: 1px solid #D8D8D8;
border-bottom: 2px solid #F4F4F4;
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
$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);

View File

@ -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;
}