|
@@ -154,7 +154,7 @@ discard block |
|
|
block discarded – undo |
154
|
154
|
$os = 'unknown'; |
155
|
155
|
$phone = ''; |
156
|
156
|
|
157
|
|
- $user_agent = substr($user_agent, 0, 512); // Avoid to process too large user agent |
|
157
|
+ $user_agent = substr($user_agent, 0, 512); // Avoid to process too large user agent |
158
|
158
|
|
159
|
159
|
$detectmobile = new Mobile_Detect(null, $user_agent); |
160
|
160
|
$tablet = $detectmobile->isTablet(); |
|
@@ -730,7 +730,7 @@ discard block |
|
|
block discarded – undo |
730
|
730
|
} |
731
|
731
|
|
732
|
732
|
// If prefix is for session (no need to have $conf loaded) |
733
|
|
- global $dolibarr_main_instance_unique_id, $dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php |
|
733
|
+ global $dolibarr_main_instance_unique_id, $dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php |
734
|
734
|
$tmp_instance_unique_id = empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; // Unique id of instance |
735
|
735
|
|
736
|
736
|
// The recommended value (may be not defined for old versions) |
|
@@ -1889,7 +1889,7 @@ discard block |
|
|
block discarded – undo |
1889
|
1889
|
if (isset($object->country_code) && in_array($object->country_code, array('AU', 'CA', 'US')) || !empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) { // US: title firstname name \n address lines \n town, state, zip \n country |
1890
|
1890
|
$town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : $object->town); |
1891
|
1891
|
$ret .= ($ret ? $sep : '').$town; |
1892
|
|
- if (!empty($object->state)) { |
|
1892
|
+ if (!empty($object->state)) { |
1893
|
1893
|
$ret .= ($ret ? ", " : '').$object->state; |
1894
|
1894
|
} |
1895
|
1895
|
if ($object->zip) $ret .= ($ret ? ", " : '').$object->zip; |
|
@@ -3272,7 +3272,7 @@ discard block |
|
|
block discarded – undo |
3272
|
3272
|
'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice', |
3273
|
3273
|
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', |
3274
|
3274
|
'other'=>'square', |
3275
|
|
- 'playdisabled'=>'play', 'pdf'=>'file-pdf', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', |
|
3275
|
+ 'playdisabled'=>'play', 'pdf'=>'file-pdf', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', |
3276
|
3276
|
'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', |
3277
|
3277
|
'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', |
3278
|
3278
|
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', |
|
@@ -6516,8 +6516,8 @@ discard block |
|
|
block discarded – undo |
6516
|
6516
|
$substitutionarray['__AMOUNT_TEXTCURRENCY__'] = is_object($object) ? dol_convertToWord($object->total_ttc, $outputlangs, $conf->currency, true) : ''; |
6517
|
6517
|
$substitutionarray['__AMOUNT_EXCL_TAX__'] = is_object($object) ? $object->total_ht : ''; |
6518
|
6518
|
$substitutionarray['__AMOUNT_VAT__'] = is_object($object) ? (isset($object->total_vat) ? $object->total_vat : $object->total_tva) : ''; |
6519
|
|
- $substitutionarray['__AMOUNT_VAT_TEXT__'] = is_object($object) ? (isset($object->total_vat) ? dol_convertToWord($object->total_vat, $outputlangs, '', true) : dol_convertToWord($object->total_tva, $outputlangs, '', true)) : ''; |
6520
|
|
- $substitutionarray['__AMOUNT_VAT_TEXTCURRENCY__'] = is_object($object) ? (isset($object->total_vat) ? dol_convertToWord($object->total_vat, $outputlangs, $conf->currency, true) : dol_convertToWord($object->total_tva, $outputlangs, $conf->currency, true)) : ''; |
|
6519
|
+ $substitutionarray['__AMOUNT_VAT_TEXT__'] = is_object($object) ? (isset($object->total_vat) ? dol_convertToWord($object->total_vat, $outputlangs, '', true) : dol_convertToWord($object->total_tva, $outputlangs, '', true)) : ''; |
|
6520
|
+ $substitutionarray['__AMOUNT_VAT_TEXTCURRENCY__'] = is_object($object) ? (isset($object->total_vat) ? dol_convertToWord($object->total_vat, $outputlangs, $conf->currency, true) : dol_convertToWord($object->total_tva, $outputlangs, $conf->currency, true)) : ''; |
6521
|
6521
|
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2__'] = is_object($object) ? $object->total_localtax1 : ''; |
6522
|
6522
|
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3__'] = is_object($object) ? $object->total_localtax2 : ''; |
6523
|
6523
|
|
|
@@ -7127,7 +7127,7 @@ discard block |
|
|
block discarded – undo |
7127
|
7127
|
*/ |
7128
|
7128
|
function utf8_check($str) |
7129
|
7129
|
{ |
7130
|
|
- $str = (string) $str; // Sometimes string is an int. |
|
7130
|
+ $str = (string) $str; // Sometimes string is an int. |
7131
|
7131
|
|
7132
|
7132
|
// We must use here a binary strlen function (so not dol_strlen) |
7133
|
7133
|
$strLength = dol_strlen($str); |