diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 86815ca70c2..df20e274451 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -277,8 +277,12 @@ MAIN_MAIL_ENABLED_USER_DEST_SELECT=Add employee users with email into allowed re MAIN_MAIL_SENDMODE=Email sending method MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication) MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication) -MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encryption -MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encryption +MAIN_MAIL_EMAIL_TLS=Use TLS (SSL) encryption +MAIN_MAIL_EMAIL_STARTTLS=Use TLS (STARTTLS) encryption +MAIN_MAIL_EMAIL_DKIM_ENABLED=Use DKIM to generate email signature +MAIN_MAIL_EMAIL_DKIM_DOMAIN=Email Domain for use with dkim +MAIN_MAIL_EMAIL_DKIM_SELECTOR=Name of dkim selector +MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Private key for dkim signing MAIN_DISABLE_ALL_SMS=Disable all SMS sending (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for SMS sending @@ -1816,7 +1820,7 @@ VATIsUsedIsOff=Note: The option to use sales Tax or VAT has been set to SwapSenderAndRecipientOnPDF=Swap sender and recipient address on PDF FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only EmailCollector=Email collector -EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some record automatically (like leads). +EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some record automatically (like leads). NewEmailCollector=New Email Collector EMailHost=Host of email IMAP server MailboxSourceDirectory=Mailbox source directory diff --git a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php index 85592006a14..edd2f627bb5 100644 --- a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php +++ b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2018 Frédéric France * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software: you can redistribute it and/or modify @@ -196,11 +197,12 @@ class mymodulewidget1 extends ModeleBoxes /** * Method to show box. Called by Dolibarr eatch time it wants to display the box. * - * @param array $head Array with properties of box title - * @param array $contents Array with properties of box lines + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @param int $nooutput No print, only return string * @return void */ - public function showBox($head = null, $contents = null) + public function showBox($head = null, $contents = null, $nooutput = 0) { // You may make your own code here… // … or use the parent's class function using the provided head and contents templates diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 30940c95509..afacbb158b5 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -110,7 +110,7 @@ class Products extends DolibarrApi * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.tobuy:=:0) and (t.tosell:=:1)" * @return array Array of product objects */ - function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode=0, $category=0, $sqlfilters = '') + function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $category = 0, $sqlfilters = '') { global $db, $conf; @@ -129,11 +129,12 @@ class Products extends DolibarrApi $sql.= " AND c.fk_categorie = ".$db->escape($category); $sql.= " AND c.fk_product = t.rowid "; } - // Show products - if ($mode == 1) { $sql.= " AND t.fk_product_type = 0"; - } - // Show services - if ($mode == 2) { $sql.= " AND t.fk_product_type = 1"; + if ($mode == 1) { + // Show only products + $sql.= " AND t.fk_product_type = 0"; + } elseif ($mode == 2) { + // Show only services + $sql.= " AND t.fk_product_type = 1"; } // Add sql filters if ($sqlfilters) { @@ -158,6 +159,7 @@ class Products extends DolibarrApi if ($result) { $num = $db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); + $i = 0; while ($i < $min) { $obj = $db->fetch_object($result); diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index bf1e73404f1..8f3c6985ac3 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -845,11 +845,11 @@ class ActionsTicket } if (!$error) { - $object->message = GETPOST("message"); + $object->message = (string) GETPOST("message"); $id = $object->createTicketMessage($user); if ($id <= 0) { $error++; - $this->errors = $object->error; + $this->error = $object->error; $this->errors = $object->errors; $action = 'add_message'; }