Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/tpl/login.tpl.php
This commit is contained in:
commit
2c6672d17a
@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
|||||||
# Misc dependencies
|
# Misc dependencies
|
||||||
# fonts-dejavu-core | ttf-dejavu-core,
|
# fonts-dejavu-core | ttf-dejavu-core,
|
||||||
xdg-utils,
|
xdg-utils,
|
||||||
virtual-mysql-client,
|
mariadb-client | virtual-mysql-client,
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${perl:Depends}
|
${perl:Depends}
|
||||||
Recommends: apache2 | lighttpd | httpd,
|
Recommends: apache2 | lighttpd | httpd,
|
||||||
virtual-mysql-server
|
mariadb-server | virtual-mysql-server
|
||||||
Suggests: www-browser, php5-geoip
|
Suggests: www-browser, php5-geoip
|
||||||
Description: Web based software to manage a company or foundation
|
Description: Web based software to manage a company or foundation
|
||||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||||
|
|||||||
@ -162,7 +162,7 @@ export res=$?
|
|||||||
|
|
||||||
|
|
||||||
# ---------------------------- copy demo files
|
# ---------------------------- copy demo files
|
||||||
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
|
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
|
||||||
if [ "x$documentdir" != "x" ]
|
if [ "x$documentdir" != "x" ]
|
||||||
then
|
then
|
||||||
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||||
@ -174,7 +174,7 @@ then
|
|||||||
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
else
|
else
|
||||||
echo Detection of documents directory failed so demo files were not copied.
|
echo Detection of documents directory $documentdir failed so demo files were not copied.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -194,7 +194,7 @@ class CommandeApi extends DolibarrApi
|
|||||||
* @return array Array of order objects
|
* @return array Array of order objects
|
||||||
*/
|
*/
|
||||||
function getListForSoc($socid = 0) {
|
function getListForSoc($socid = 0) {
|
||||||
return getList(0,"s.rowid","ASC",0,0,$socid);
|
return $this->getList(0,"s.rowid","ASC",0,0,$socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -54,6 +54,7 @@ $langs->load("loan");
|
|||||||
$langs->load("donations");
|
$langs->load("donations");
|
||||||
$langs->load("trips");
|
$langs->load("trips");
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
$langs->load("compta");
|
||||||
|
|
||||||
$id = GETPOST('id','int');
|
$id = GETPOST('id','int');
|
||||||
$ref = GETPOST('ref','alpha');
|
$ref = GETPOST('ref','alpha');
|
||||||
|
|||||||
@ -449,7 +449,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Ref
|
// Ref
|
||||||
if (! empty($arrayfields['b.ref']['checked']))
|
if (! empty($arrayfields['b.ref']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="titlefield">'.$acc->getNomUrl(1).'</td>';
|
print '<td>'.$acc->getNomUrl(1).'</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -131,6 +131,7 @@ class Contact extends CommonObject
|
|||||||
$clause = "AND";
|
$clause = "AND";
|
||||||
}
|
}
|
||||||
$sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')';
|
$sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')';
|
||||||
|
$sql.= " AND (sp.priv='0' OR (sp.priv='1' AND sp.fk_user_creat=".$user->id."))";
|
||||||
if ($user->societe_id > 0) $sql.=" AND sp.fk_soc = ".$user->societe_id;
|
if ($user->societe_id > 0) $sql.=" AND sp.fk_soc = ".$user->societe_id;
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@ -210,6 +210,7 @@ class CMailFile
|
|||||||
$this->addr_bcc = $addr_bcc;
|
$this->addr_bcc = $addr_bcc;
|
||||||
$this->deliveryreceipt = $deliveryreceipt;
|
$this->deliveryreceipt = $deliveryreceipt;
|
||||||
$this->trackid = $trackid;
|
$this->trackid = $trackid;
|
||||||
|
|
||||||
$smtp_headers = $this->write_smtpheaders();
|
$smtp_headers = $this->write_smtpheaders();
|
||||||
if (! empty($moreinheader)) $smtp_headers.=$moreinheader; // $moreinheader contains the \r\n
|
if (! empty($moreinheader)) $smtp_headers.=$moreinheader; // $moreinheader contains the \r\n
|
||||||
|
|
||||||
@ -272,6 +273,7 @@ class CMailFile
|
|||||||
$smtps->setFrom($this->getValidAddress($from,0,1));
|
$smtps->setFrom($this->getValidAddress($from,0,1));
|
||||||
$smtps->setTrackId($trackid);
|
$smtps->setTrackId($trackid);
|
||||||
$smtps->setReplyTo($this->getValidAddress($from,0,1)); // Set property with this->smtps->setReplyTo after constructor if you want to use another value than the From
|
$smtps->setReplyTo($this->getValidAddress($from,0,1)); // Set property with this->smtps->setReplyTo after constructor if you want to use another value than the From
|
||||||
|
|
||||||
if (! empty($moreinheader)) $smtps->setMoreInHeader($moreinheader);
|
if (! empty($moreinheader)) $smtps->setMoreInHeader($moreinheader);
|
||||||
|
|
||||||
if (! empty($this->html))
|
if (! empty($this->html))
|
||||||
@ -487,7 +489,7 @@ class CMailFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL
|
// Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL
|
||||||
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10;
|
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL=10;
|
||||||
$tmparray1 = explode(',', $this->addr_to);
|
$tmparray1 = explode(',', $this->addr_to);
|
||||||
if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)
|
if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL)
|
||||||
{
|
{
|
||||||
@ -495,6 +497,7 @@ class CMailFile
|
|||||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL=10;
|
||||||
$tmparray2 = explode(',', $this->addr_cc);
|
$tmparray2 = explode(',', $this->addr_cc);
|
||||||
if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)
|
if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL)
|
||||||
{
|
{
|
||||||
@ -502,6 +505,7 @@ class CMailFile
|
|||||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL=10;
|
||||||
$tmparray3 = explode(',', $this->addr_bcc);
|
$tmparray3 = explode(',', $this->addr_bcc);
|
||||||
if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)
|
if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL)
|
||||||
{
|
{
|
||||||
@ -509,6 +513,7 @@ class CMailFile
|
|||||||
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10;
|
||||||
if ((count($tmparray1)+count($tmparray2)+count($tmparray3)) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
if ((count($tmparray1)+count($tmparray2)+count($tmparray3)) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)
|
||||||
{
|
{
|
||||||
$this->error = 'Too much recipients in to:, cc:, bcc:';
|
$this->error = 'Too much recipients in to:, cc:, bcc:';
|
||||||
@ -516,7 +521,6 @@ class CMailFile
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Action according to choosed sending method
|
// Action according to choosed sending method
|
||||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||||
{
|
{
|
||||||
@ -558,6 +562,7 @@ class CMailFile
|
|||||||
{
|
{
|
||||||
$additionnalparam .= ($additionnalparam?' ':'').'-ba';
|
$additionnalparam .= ($additionnalparam?' ':'').'-ba';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_ADDPARAM)) $additionnalparam .= ($additionnalparam?' ':'').'-U '.$additionnalparam; // Use -U to add additionnal params
|
if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_ADDPARAM)) $additionnalparam .= ($additionnalparam?' ':'').'-U '.$additionnalparam; // Use -U to add additionnal params
|
||||||
|
|
||||||
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$additionnalparam, LOG_DEBUG);
|
dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$additionnalparam, LOG_DEBUG);
|
||||||
@ -881,7 +886,7 @@ class CMailFile
|
|||||||
|
|
||||||
// Receiver
|
// Receiver
|
||||||
if (isset($this->addr_cc) && $this->addr_cc) $out.= "Cc: ".$this->getValidAddress($this->addr_cc,2).$this->eol2;
|
if (isset($this->addr_cc) && $this->addr_cc) $out.= "Cc: ".$this->getValidAddress($this->addr_cc,2).$this->eol2;
|
||||||
if (isset($this->addr_bcc) && $this->addr_bcc) $out.= "Bcc: ".$this->getValidAddress($this->addr_bcc,2).$this->eol2; // Question: bcc must not be into header, only into SMTP command "RCPT TO". Does php mail support this ?
|
if (isset($this->addr_bcc) && $this->addr_bcc) $out.= "Bcc: ".$this->getValidAddress($this->addr_bcc,2).$this->eol2; // TODO Question: bcc must not be into header, only into SMTP command "RCPT TO". Does php mail support this ?
|
||||||
|
|
||||||
// Delivery receipt
|
// Delivery receipt
|
||||||
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $out.= "Disposition-Notification-To: ".$this->getValidAddress($this->addr_from,2).$this->eol2;
|
if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $out.= "Disposition-Notification-To: ".$this->getValidAddress($this->addr_from,2).$this->eol2;
|
||||||
|
|||||||
@ -2448,9 +2448,10 @@ abstract class CommonObject
|
|||||||
* Fetch array of objects linked to current object. Links are loaded into this->linkedObjects array and this->linkedObjectsIds
|
* Fetch array of objects linked to current object. Links are loaded into this->linkedObjects array and this->linkedObjectsIds
|
||||||
* Possible usage for parameters:
|
* Possible usage for parameters:
|
||||||
* - all parameters empty -> we look all link to current object (current object can be source or target)
|
* - all parameters empty -> we look all link to current object (current object can be source or target)
|
||||||
* - one couple id+type is provided -> this will set $justsource or $justtarget
|
* - source id+type -> will get target list linked to source
|
||||||
* - one couple id+type is provided and other type is provided -> this will set $justsource or $justtarget + criteria on other type
|
* - target id+type -> will get source list linked to target
|
||||||
*
|
* - source id+type + target type -> will get target list of the type
|
||||||
|
* - target id+type + target source -> will get source list of the type
|
||||||
*
|
*
|
||||||
* @param int $sourceid Object source id (if not defined, id of object)
|
* @param int $sourceid Object source id (if not defined, id of object)
|
||||||
* @param string $sourcetype Object source type (if not defined, element name of object)
|
* @param string $sourcetype Object source type (if not defined, element name of object)
|
||||||
|
|||||||
@ -5876,7 +5876,7 @@ class Form
|
|||||||
*/
|
*/
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
$ret.='<!-- Put link to gravatar -->';
|
$ret.='<!-- Put link to gravatar -->';
|
||||||
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)),3).'?s='.$width.'&d='.urlencode(dol_buildpath($nophoto,2)).'">'; // gravatar need md5 hash
|
$ret.='<img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="Gravatar avatar" title="'.$email.' Gravatar avatar" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="https://www.gravatar.com/avatar/'.dol_hash(strtolower(trim($email)),3).'?s='.$width.'&d='.urlencode(dol_buildpath($nophoto,3)).'">'; // gravatar need md5 hash
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -135,10 +135,13 @@ class modDeplacement extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('deplacement',1).')';
|
$this->export_sql_end[$r] .=' AND d.entity IN ('.getEntity('deplacement',1).')';
|
||||||
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR d.fk_soc IS NULL)';
|
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND (sc.fk_user = '.(empty($user)?0:$user->id).' OR d.fk_soc IS NULL)';
|
||||||
|
|
||||||
$childids = $user->getAllChildIds();
|
if (! empty($user)) // Not defined during migration process
|
||||||
$childids[]=$user->id;
|
{
|
||||||
|
$childids = $user->getAllChildIds();
|
||||||
|
$childids[]=$user->id;
|
||||||
|
|
||||||
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
|
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
<div id="login_right">
|
<div id="login_right">
|
||||||
|
|
||||||
<table class="left centpercent" title="Enter login details">
|
<table class="left centpercent" title="<?php echo $langs->trans("EnterLoginDetail"); ?>">
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="nowrap center valignmiddle">
|
<td class="nowrap center valignmiddle">
|
||||||
|
|||||||
@ -191,7 +191,7 @@ if (constant('DOL_DATA_ROOT') === null) {
|
|||||||
}
|
}
|
||||||
if (@file_exists($lockfile))
|
if (@file_exists($lockfile))
|
||||||
{
|
{
|
||||||
print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).<br>';
|
print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr documents directory).<br>';
|
||||||
if (! empty($dolibarr_main_url_root))
|
if (! empty($dolibarr_main_url_root))
|
||||||
{
|
{
|
||||||
print 'Click on following link. ';
|
print 'Click on following link. ';
|
||||||
|
|||||||
@ -460,6 +460,7 @@ DeletePicture=Picture delete
|
|||||||
ConfirmDeletePicture=Confirm picture deletion?
|
ConfirmDeletePicture=Confirm picture deletion?
|
||||||
Login=Login
|
Login=Login
|
||||||
CurrentLogin=Current login
|
CurrentLogin=Current login
|
||||||
|
EnterLoginDetail=Enter login details
|
||||||
January=January
|
January=January
|
||||||
February=February
|
February=February
|
||||||
March=March
|
March=March
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class Entrepot extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (entity, datec, fk_user_author, label, fk_parent)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (entity, datec, fk_user_author, label, fk_parent)";
|
||||||
$sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."', ".($this->fk_parent > 0 ? $this->fk_parent : 'NULL').")";
|
$sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."', ".($this->fk_parent > 0 ? $this->fk_parent : "NULL").")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||||
$result=$this->db->query($sql);
|
$result=$this->db->query($sql);
|
||||||
@ -186,7 +186,7 @@ class Entrepot extends CommonObject
|
|||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."entrepot ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."entrepot ";
|
||||||
$sql .= " SET label = '" . $this->db->escape($this->libelle) ."'";
|
$sql .= " SET label = '" . $this->db->escape($this->libelle) ."'";
|
||||||
$sql .= ", fk_parent = " . (($this->fk_parent > 0) ? $this->fk_parent : 'NULL');
|
$sql .= ", fk_parent = " . (($this->fk_parent > 0) ? $this->fk_parent : "NULL");
|
||||||
$sql .= ", description = '" . $this->db->escape($this->description) ."'";
|
$sql .= ", description = '" . $this->db->escape($this->description) ."'";
|
||||||
$sql .= ", statut = " . $this->statut;
|
$sql .= ", statut = " . $this->statut;
|
||||||
$sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'";
|
$sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'";
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
use Luracast\Restler\RestException;
|
use Luracast\Restler\RestException;
|
||||||
|
|
||||||
//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API class for contact object
|
* API class for contact object
|
||||||
|
|||||||
@ -64,9 +64,10 @@ class CompanyBankAccount extends Account
|
|||||||
* Create bank information record
|
* Create bank information record
|
||||||
*
|
*
|
||||||
* @param User $user User
|
* @param User $user User
|
||||||
|
* @param int $notrigger 1=Disable triggers
|
||||||
* @return int <0 if KO, >= 0 if OK
|
* @return int <0 if KO, >= 0 if OK
|
||||||
*/
|
*/
|
||||||
function create(User $user = null)
|
function create(User $user = null, $notrigger=0)
|
||||||
{
|
{
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user