PEAR FunctionCallSignature

This commit is contained in:
Frédéric FRANCE
2019-02-10 10:45:49 +01:00
parent 580e5c42d2
commit 1e43f8e54a
129 changed files with 321 additions and 332 deletions

View File

@@ -13,7 +13,7 @@
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@@ -843,7 +843,7 @@ function dol_string_unaccent($str)
else
{
// See http://www.ascii-code.com/
$string = strtr(
$string = strtr(
$str,
"\xC0\xC1\xC2\xC3\xC4\xC5\xC7
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
@@ -2969,12 +2969,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$picto .= '.png';
}
$fullpathpicto = $picto;
}
else {
} else {
$pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithoutext, array(
if (empty($srconly) && in_array($pictowithoutext, array(
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
'note', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
'jabber','skype','twitter','facebook'
@@ -5247,7 +5246,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
// We will enhance here a common way of forging path for document storage
// Here, object->id, object->ref and modulepart are required.
//var_dump($modulepart);
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
'supplier_order','supplier_proposal','shipment','contract','expensereport')))
{
$path=($object->ref?$object->ref:$object->id);
@@ -5306,7 +5305,7 @@ function dol_mkdir($dir, $dataroot = '', $newmask = null)
umask(0);
$dirmaskdec=octdec($newmask);
if (empty($newmask)) {
$dirmaskdec = empty( $conf->global->MAIN_UMASK ) ? octdec( '0755' ) : octdec( $conf->global->MAIN_UMASK );
$dirmaskdec = empty($conf->global->MAIN_UMASK) ? octdec('0755') : octdec($conf->global->MAIN_UMASK);
}
$dirmaskdec |= octdec('0111'); // Set x bit required for directories
if (! @mkdir($ccdir_osencoded, $dirmaskdec))
@@ -5792,7 +5791,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
// Add SIGNATURE into substitutionarray first, so, when we will make the substitution,
// this will include signature content first and then replace var found into content of signature
$signature = $user->signature;
$substitutionarray=array_merge($substitutionarray, array(
$substitutionarray=array_merge($substitutionarray, array(
'__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '')
)
);
@@ -5802,7 +5801,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '');
}
$substitutionarray=array_merge($substitutionarray, array(
$substitutionarray=array_merge($substitutionarray, array(
'__USER_ID__' => (string) $user->id,
'__USER_LOGIN__' => (string) $user->login,
'__USER_LASTNAME__' => (string) $user->lastname,
@@ -5815,7 +5814,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
}
if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc))
{
$substitutionarray=array_merge($substitutionarray, array(
$substitutionarray=array_merge($substitutionarray, array(
'__MYCOMPANY_NAME__' => $mysoc->name,
'__MYCOMPANY_EMAIL__' => $mysoc->email,
'__MYCOMPANY_PROFID1__' => $mysoc->idprof1,
@@ -6072,7 +6071,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
$tmp5=dol_get_next_month($tmp['mon'], $tmp['year']);
$substitutionarray=array_merge($substitutionarray, array(
$substitutionarray=array_merge($substitutionarray, array(
'__DAY__' => (string) $tmp['mday'],
'__DAY_TEXT__' => $outputlangs->trans('Day'.$tmp['wday']), // Monday
'__DAY_TEXT_SHORT__' => $outputlangs->trans($tmp['weekday'].'Min'), // Mon