diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index 497d3abbf50..c34d9e2ffda 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -162,7 +162,7 @@ export res=$? # ---------------------------- 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" ] then echo cp -pr $mydir/documents_demo/* "$documentdir/" @@ -174,7 +174,7 @@ then echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images" 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 diff --git a/htdocs/commande/class/api_deprecated_commande.class.php b/htdocs/commande/class/api_deprecated_commande.class.php index 60c8c7f4aa8..4595bdbb287 100644 --- a/htdocs/commande/class/api_deprecated_commande.class.php +++ b/htdocs/commande/class/api_deprecated_commande.class.php @@ -194,7 +194,7 @@ class CommandeApi extends DolibarrApi * @return array Array of order objects */ function getListForSoc($socid = 0) { - return getList(0,"s.rowid","ASC",0,0,$socid); + return $this->getList(0,"s.rowid","ASC",0,0,$socid); } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index cd45378ba86..3b4fa942f81 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -131,6 +131,7 @@ class Contact extends CommonObject $clause = "AND"; } $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; $resql=$this->db->query($sql); diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 9e11001745c..22f4e45c25f 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -155,7 +155,7 @@ class CMailFile } if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html. - + // Detect images if ($this->msgishtml) { @@ -210,9 +210,10 @@ class CMailFile $this->addr_bcc = $addr_bcc; $this->deliveryreceipt = $deliveryreceipt; $this->trackid = $trackid; + $smtp_headers = $this->write_smtpheaders(); if (! empty($moreinheader)) $smtp_headers.=$moreinheader; // $moreinheader contains the \r\n - + // Define mime_headers $mime_headers = $this->write_mimeheaders($filename_list, $mimefilename_list); @@ -272,8 +273,9 @@ class CMailFile $smtps->setFrom($this->getValidAddress($from,0,1)); $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 + if (! empty($moreinheader)) $smtps->setMoreInHeader($moreinheader); - + if (! empty($this->html)) { if (!empty($css)) @@ -478,16 +480,16 @@ class CMailFile 'maildao' )); $reshook = $hookmanager->executeHooks('doactions', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if (! empty($reshook)) + if (! empty($reshook)) { $this->error = "Error in hook maildao doactions " . $reshook; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_ERR); - + return $reshook; } // 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); 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); 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); 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); 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); if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL) { @@ -509,14 +513,14 @@ class CMailFile dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); 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) { $this->error = 'Too much recipients in to:, cc:, bcc:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - - + // Action according to choosed sending method if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { @@ -558,6 +562,7 @@ class CMailFile { $additionnalparam .= ($additionnalparam?' ':'').'-ba'; } + 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); @@ -881,7 +886,7 @@ class CMailFile // Receiver 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 if (isset($this->deliveryreceipt) && $this->deliveryreceipt == 1) $out.= "Disposition-Notification-To: ".$this->getValidAddress($this->addr_from,2).$this->eol2; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ad968de506a..591402bbdea 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5876,7 +5876,7 @@ class Form */ global $dolibarr_main_url_root; $ret.=''; - $ret.='Gravatar avatar'; // gravatar need md5 hash + $ret.='Gravatar avatar'; // gravatar need md5 hash } else { diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index ae1118b4ce7..a9d7c73ae1a 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -89,7 +89,7 @@ $(document).ready(function () {
- +
">
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 706d92eda20..c99fa700e2d 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -460,6 +460,7 @@ DeletePicture=Picture delete ConfirmDeletePicture=Confirm picture deletion? Login=Login CurrentLogin=Current login +EnterLoginDetail=Enter login details January=January February=February March=March diff --git a/htdocs/societe/class/api_deprecated_contact.class.php b/htdocs/societe/class/api_deprecated_contact.class.php index e229dc5f79b..b9c991c7fa5 100644 --- a/htdocs/societe/class/api_deprecated_contact.class.php +++ b/htdocs/societe/class/api_deprecated_contact.class.php @@ -17,7 +17,7 @@ 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