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

@ -279,6 +279,10 @@ MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication)
MAIN_MAIL_SMTPS_PW=SMTP Password (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_TLS=Use TLS (SSL) encryption
MAIN_MAIL_EMAIL_STARTTLS=Use TLS (STARTTLS) 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_DISABLE_ALL_SMS=Disable all SMS sending (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for SMS sending MAIN_MAIL_SMS_FROM=Default sender phone number for SMS sending

View File

@ -1,5 +1,6 @@
<?php <?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--- * Copyright (C) ---Put here your own copyright and developer email---
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -198,9 +199,10 @@ class mymodulewidget1 extends ModeleBoxes
* *
* @param array $head Array with properties of box title * @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines * @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return void * @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… // You may make your own code here…
// … or use the parent's class function using the provided head and contents templates // … or use the parent's class function using the provided head and contents templates

View File

@ -129,11 +129,12 @@ class Products extends DolibarrApi
$sql.= " AND c.fk_categorie = ".$db->escape($category); $sql.= " AND c.fk_categorie = ".$db->escape($category);
$sql.= " AND c.fk_product = t.rowid "; $sql.= " AND c.fk_product = t.rowid ";
} }
// Show products if ($mode == 1) {
if ($mode == 1) { $sql.= " AND t.fk_product_type = 0"; // Show only products
} $sql.= " AND t.fk_product_type = 0";
// Show services } elseif ($mode == 2) {
if ($mode == 2) { $sql.= " AND t.fk_product_type = 1"; // Show only services
$sql.= " AND t.fk_product_type = 1";
} }
// Add sql filters // Add sql filters
if ($sqlfilters) { if ($sqlfilters) {
@ -158,6 +159,7 @@ class Products extends DolibarrApi
if ($result) { if ($result) {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$min = min($num, ($limit <= 0 ? $num : $limit)); $min = min($num, ($limit <= 0 ? $num : $limit));
$i = 0;
while ($i < $min) while ($i < $min)
{ {
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);

View File

@ -845,11 +845,11 @@ class ActionsTicket
} }
if (!$error) { if (!$error) {
$object->message = GETPOST("message"); $object->message = (string) GETPOST("message");
$id = $object->createTicketMessage($user); $id = $object->createTicketMessage($user);
if ($id <= 0) { if ($id <= 0) {
$error++; $error++;
$this->errors = $object->error; $this->error = $object->error;
$this->errors = $object->errors; $this->errors = $object->errors;
$action = 'add_message'; $action = 'add_message';
} }