Merge branch 'develop' into dev_importproduct_measuringunit

This commit is contained in:
Laurent Destailleur 2019-02-13 16:35:46 +01:00 committed by GitHub
commit 2311912d8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 56 deletions

View File

@ -3,6 +3,7 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -96,7 +97,7 @@ class ICal
* Translate Calendar * Translate Calendar
* *
* @param string $uri Url * @param string $uri Url
* @return array * @return array|string
*/ */
function parse($uri) function parse($uri)
{ {
@ -363,9 +364,9 @@ class ICal
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return sorted eventlist as array or false if calenar is empty * Return sorted eventlist as array or false if calendar is empty
* *
* @return array * @return array|false
*/ */
function get_sort_event_list() function get_sort_event_list()
{ {
@ -398,7 +399,7 @@ class ICal
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return eventlist array (not sort eventlist array) * Return eventlist array (not sorted eventlist array)
* *
* @return array * @return array
*/ */
@ -422,7 +423,7 @@ class ICal
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return to do array (not sort to do array) * Return to do array (not sorted todo array)
* *
* @return array * @return array
*/ */

View File

@ -50,8 +50,8 @@ class RssParser
private $_rssarray=array(); private $_rssarray=array();
// For parsing with xmlparser // For parsing with xmlparser
var $stack = array(); // parser stack public $stack = array(); // parser stack
var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); private $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
/** /**
@ -246,7 +246,7 @@ class RssParser
$str = file_get_contents($this->_urlRSS, false, $context); $str = file_get_contents($this->_urlRSS, false, $context);
} }
catch (Exception $e) { catch (Exception $e) {
print 'Error retrieving URL '.$this->urlRSS.' - '.$e->getMessage(); print 'Error retrieving URL '.$this->_urlRSS.' - '.$e->getMessage();
} }
} }

View File

@ -104,7 +104,7 @@ function dol_getImageSize($file, $url = false)
* @param int $newHeight Hauteur maximum que dois faire l'image destination (0=keep ratio) * @param int $newHeight Hauteur maximum que dois faire l'image destination (0=keep ratio)
* @param int $src_x Position of croping image in source image (not use if mode=0) * @param int $src_x Position of croping image in source image (not use if mode=0)
* @param int $src_y Position of croping image in source image (not use if mode=0) * @param int $src_y Position of croping image in source image (not use if mode=0)
* @return int File name if OK, error message if KO * @return string File name if OK, error message if KO
*/ */
function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0) function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0)
{ {

View File

@ -86,7 +86,7 @@ function tax_prepare_head(ChargeSociales $object)
* @param string $direction 'sell' or 'buy' * @param string $direction 'sell' or 'buy'
* @param int $m Month * @param int $m Month
* @param int $q Quarter * @param int $q Quarter
* @return array Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error * @return array|int Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developped, -3 if error
*/ */
function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m = 0, $q = 0) function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m = 0, $q = 0)
{ {
@ -111,7 +111,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$paymentfacturetable='paiement_facture'; $paymentfacturetable='paiement_facture';
$invoicefieldref='ref'; $invoicefieldref='ref';
} }
if ($direction == 'buy') elseif ($direction == 'buy')
{ {
$invoicetable='facture_fourn'; $invoicetable='facture_fourn';
$invoicedettable='facture_fourn_det'; $invoicedettable='facture_fourn_det';
@ -554,7 +554,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
* @param int $modetax Not used * @param int $modetax Not used
* @param int $direction 'sell' (customer invoice) or 'buy' (supplier invoices) * @param int $direction 'sell' (customer invoice) or 'buy' (supplier invoices)
* @param int $m Month * @param int $m Month
* @return array Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error * @return array|int Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developped, -3 if error
*/ */
function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0) function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0)
{ {

View File

@ -221,11 +221,14 @@ if ($action == "correct_stock")
$origin_id $origin_id
); // We do not change value of stock for a correction ); // We do not change value of stock for a correction
} }
if ($result > 0) if ($result > 0)
{ {
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
exit(); exit;
} else { }
else
{
$error++; $error++;
setEventMessages($product->error, $product->errors, 'errors'); setEventMessages($product->error, $product->errors, 'errors');
$action='correction'; $action='correction';
@ -943,18 +946,11 @@ if ($resql)
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields // Hook fields
$parameters = array( $parameters=array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder
);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint; print $hookmanager->resPrint;
if (! empty($arrayfields['m.datec']['checked'])) if (! empty($arrayfields['m.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['m.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['m.tms']['checked']))
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n"; print "</tr>\n";