2
0
forked from Wavyzz/dolibarr

Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW/add_real_payments_on_vat_objects

This commit is contained in:
Gauthier PC portable 024
2021-01-28 10:28:36 +01:00
965 changed files with 19425 additions and 16760 deletions

View File

@@ -687,7 +687,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
$out = dol_string_nohtmltag($out, 0);
}
break;
case 'alphawithlgt': // No " and no ../ but we keep < > tags. Can be used for email string like "Name <email>"
case 'alphawithlgt': // No " and no ../ but we keep balanced < > tags with no special chars inside. Can be used for email string like "Name <email>"
if (!is_array($out)) {
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
// '../' is dangerous because it allows dir transversals
@@ -3269,7 +3269,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'lot',
'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
@@ -3280,7 +3280,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'object_recruitmentjobposition', 'object_recruitmentcandidature',
'object_shipment', 'object_share-alt', 'object_supplier_invoice', 'object_supplier_invoicea', 'object_supplier_invoiced', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock',
'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member',
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website',
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'object_movement',
'off', 'on', 'order',
'paiment', 'play', 'pdf', 'playdisabled', 'previous', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip',
'setup', 'share-alt', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
@@ -3317,7 +3317,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group',
'member'=>'users', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right',
'trip'=>'wallet', 'group'=>'users',
'trip'=>'wallet', 'group'=>'users', 'movement'=>'people-carry',
'sign-out'=>'sign-out-alt',
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star',
'bank'=>'university', 'close_title'=>'times', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter',
@@ -3406,7 +3406,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'dynamicprice'=>'#a69944',
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999',
'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944',
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944',
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
'other'=>'#ddd',
'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba',
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa',
@@ -5763,7 +5763,7 @@ function picto_required()
* @param string $stringtoclean String to clean
* @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=Ending new lines are removed but others are kept with a same number of \n than nb of <br> when there is both "...<br>\n..."
* @param string $pagecodeto Encoding of input/output string
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag)
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag or when tags is not closed like '<img onload=aaa')
* @param integer $removedoublespaces Replace double space into one space
* @return string String cleaned
*
@@ -5784,10 +5784,10 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto =
} else {
$pattern = "/<[^<>]+>/";
// Example of $temp: <a href="/myurl" title="<u>A title</u>">0000-021</a>
$temp = preg_replace($pattern, "", $temp); // pass 1
// $temp after pass 1: <a href="/myurl" title="A title">0000-021
$temp = preg_replace($pattern, "", $temp); // pass 2
// $temp after pass 2: 0000-021
$temp = preg_replace($pattern, "", $temp); // pass 1 - $temp after pass 1: <a href="/myurl" title="A title">0000-021
$temp = preg_replace($pattern, "", $temp); // pass 2 - $temp after pass 2: 0000-021
// removed '<' into non closing html tags like '<a'
$temp = preg_replace('/<(\w+)/', '\1', $temp);
}
$temp = dol_html_entity_decode($temp, ENT_COMPAT, $pagecodeto);
@@ -7145,7 +7145,7 @@ function dol_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembe
* @param array $array Array to sort (array of array('key1'=>val1,'key2'=>val2,'key3'...) or array of objects)
* @param string $index Key in array to use for sorting criteria
* @param int $order Sort order ('asc' or 'desc')
* @param int $natsort 1=use "natural" sort (natsort), 0=use "standard" sort (asort)
* @param int $natsort 1=use "natural" sort (natsort) for a search criteria thats is strings or unknown, 0=use "standard" sort (asort) for numbers
* @param int $case_sensitive 1=sort is case sensitive, 0=not case sensitive
* @param int $keepindex If 0 and index key of array to sort is a numeric, than index will be rewrote. If 1 or index key is not numeric, key for index is kept after sorting.
* @return array Sorted array
@@ -7171,9 +7171,17 @@ function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sen
}
if (!$natsort) {
($order == 'asc') ? asort($temp) : arsort($temp);
if ($order == 'asc') {
asort($temp);
} else {
arsort($temp);
}
} else {
($case_sensitive) ? natsort($temp) : natcasesort($temp);
if ($case_sensitive) {
natsort($temp);
} else {
natcasesort($temp); // natecasesort is not sensible to case
}
if ($order != 'asc') $temp = array_reverse($temp, true);
}