Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-11-10 15:03:34 +01:00
commit 6591cdba75
4 changed files with 23 additions and 15 deletions

View File

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

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* 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

View File

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

View File

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