@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | print (ini_get('allow_url_fopen') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning', 'class="pictofixedwidth nopaddingleft"') : img_picto('', 'tick', 'class="pictofixedwidth"'))."<strong>PHP allow_url_fopen</strong> = ".(ini_get('allow_url_fopen') ? ini_get('allow_url_fopen') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).", except if Yes is required by some external modules)</span><br>\n"; |
| 139 | 139 | |
| 140 | -print (ini_get('allow_url_include') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning', 'class="pictofixedwidth nopaddingleft"') : img_picto('', 'tick', 'class="pictofixedwidth"')). "<strong>PHP allow_url_include</strong> = ".(ini_get('allow_url_include') ? ini_get('allow_url_include') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")</span><br>\n"; |
|
| 140 | +print (ini_get('allow_url_include') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning', 'class="pictofixedwidth nopaddingleft"') : img_picto('', 'tick', 'class="pictofixedwidth"'))."<strong>PHP allow_url_include</strong> = ".(ini_get('allow_url_include') ? ini_get('allow_url_include') : yn(0)).' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")</span><br>\n"; |
|
| 141 | 141 | //print "<strong>PHP safe_mode</strong> = ".(ini_get('safe_mode') ? ini_get('safe_mode') : yn(0)).' <span class="opacitymedium">'.$langs->trans("Deprecated")." (removed in PHP 5.4)</span><br>\n"; |
| 142 | 142 | |
| 143 | 143 | if (getDolGlobalString('MAIN_SECURITY_SHOW_MORE_INFO')) { |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | print '<br>'; |
| 211 | 211 | |
| 212 | 212 | // JSON |
| 213 | -$loadedExtensions = array_map('strtolower', get_loaded_extensions(false)); |
|
| 213 | +$loadedExtensions = array_map('strtolower', get_loaded_extensions(false)); |
|
| 214 | 214 | $test = !in_array('json', $loadedExtensions); |
| 215 | 215 | if ($test || function_exists('dol_json_decode')) { |
| 216 | 216 | print img_picto('', 'error', 'class="pictofixedwidth nopaddingleft"'); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | print '<br>'; |
| 285 | 285 | print '<br>'; |
| 286 | 286 | |
| 287 | -print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: '; // $conffile is defined into filefunc.inc.php |
|
| 287 | +print '<strong>'.$langs->trans("PermissionsOnFile", $conffile).'</strong>: '; // $conffile is defined into filefunc.inc.php |
|
| 288 | 288 | $perms = fileperms($dolibarr_main_document_root.'/'.$conffile); |
| 289 | 289 | if ($perms) { |
| 290 | 290 | if (($perms & 0x0004) || ($perms & 0x0002)) { |
@@ -513,11 +513,11 @@ discard block |
||
| 513 | 513 | $umask = getDolGlobalString('MAIN_UMASK'); |
| 514 | 514 | |
| 515 | 515 | print '<strong>'.$langs->trans("UMask").'</strong>: '; |
| 516 | -if (! in_array($umask, array('600', '660', '0600', '0660'))) { |
|
| 516 | +if (!in_array($umask, array('600', '660', '0600', '0660'))) { |
|
| 517 | 517 | print img_warning().' '; |
| 518 | 518 | } |
| 519 | 519 | print $umask; |
| 520 | -if (! in_array($umask, array('600', '660', '0600', '0660'))) { |
|
| 520 | +if (!in_array($umask, array('600', '660', '0600', '0660'))) { |
|
| 521 | 521 | print ' <span class="opacitymedium">('.$langs->trans("Recommended").': 0600 | 0660)</span>'; |
| 522 | 522 | } |
| 523 | 523 | print '<br>'; |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | if (!getDolGlobalString('MAIN_ANTIVIRUS_UPLOAD_ON') || !getDolGlobalString('MAIN_ANTIVIRUS_COMMAND')) { |
| 563 | 563 | print ' - <span class="opacitymedium">'.$langs->trans("Recommended").': '.$langs->trans("DefinedAPathForAntivirusCommandIntoSetup", $langs->transnoentitiesnoconv("Home")." - ".$langs->transnoentitiesnoconv("Setup")." - ".$langs->transnoentitiesnoconv("Security")).'</span>'; |
| 564 | 564 | } else { |
| 565 | - print ' - ' . getDolGlobalString('MAIN_ANTIVIRUS_COMMAND'); |
|
| 565 | + print ' - '.getDolGlobalString('MAIN_ANTIVIRUS_COMMAND'); |
|
| 566 | 566 | if (defined('MAIN_ANTIVIRUS_COMMAND') && !defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) { |
| 567 | 567 | print ' - <span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>'; |
| 568 | 568 | } |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | $to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL); |
| 425 | 425 | $from = getDolGlobalString('ADHERENT_MAIL_FROM'); |
| 426 | 426 | $mailfile = new CMailFile( |
| 427 | - '['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), |
|
| 427 | + '['.$appli.'] '.getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'), |
|
| 428 | 428 | $to, |
| 429 | 429 | $from, |
| 430 | 430 | $adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL), |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | } |
| 605 | 605 | } else { |
| 606 | 606 | $adht->fetch(getDolGlobalInt('MEMBER_NEWFORM_FORCETYPE')); |
| 607 | - print '<input type="hidden" id="typeid" name="typeid" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">'; |
|
| 607 | + print '<input type="hidden" id="typeid" name="typeid" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">'; |
|
| 608 | 608 | } |
| 609 | 609 | print '</td></tr>'."\n"; |
| 610 | 610 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | $morphys["phy"] = $langs->trans("Physical"); |
| 614 | 614 | $morphys["mor"] = $langs->trans("Moral"); |
| 615 | 615 | $checkednature = GETPOST("morphy", 'alpha'); |
| 616 | - $listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type |
|
| 616 | + $listetype_natures = $adht->morphyByType(1); // Load the array of morphy per type |
|
| 617 | 617 | $listetype_natures_json = json_encode($listetype_natures); |
| 618 | 618 | |
| 619 | 619 | if (!getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY')) { |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | print '</td></tr>'."\n"; |
| 704 | 704 | } else { |
| 705 | 705 | //print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY]; |
| 706 | - print '<input type="hidden" id="morphy" name="morphy" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">'; |
|
| 706 | + print '<input type="hidden" id="morphy" name="morphy" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">'; |
|
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | // Company // TODO : optional hide |
@@ -800,7 +800,7 @@ discard block |
||
| 800 | 800 | } |
| 801 | 801 | |
| 802 | 802 | // Other attributes |
| 803 | - $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 803 | + $parameters['tpl_context'] = 'public'; // define template context to public |
|
| 804 | 804 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
| 805 | 805 | |
| 806 | 806 | // Comments |
@@ -861,9 +861,9 @@ discard block |
||
| 861 | 861 | $adht = new AdherentType($db); |
| 862 | 862 | $adht->fetch($typeid); |
| 863 | 863 | $caneditamount = $adht->caneditamount; |
| 864 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 864 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 865 | 865 | $amountbytype_json = json_encode($amountbytype); |
| 866 | - $caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type |
|
| 866 | + $caneditamountbytype = $adht->caneditamountByType(1); // Load the array of caneditamount per type |
|
| 867 | 867 | $caneditamountbytype_json = json_encode($caneditamountbytype); |
| 868 | 868 | |
| 869 | 869 | |
@@ -887,7 +887,7 @@ discard block |
||
| 887 | 887 | // $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe' |
| 888 | 888 | print '<tr><td>'.$langs->trans("Subscription"); |
| 889 | 889 | if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) { |
| 890 | - print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 890 | + print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 891 | 891 | } |
| 892 | 892 | print '</td><td class="nowrap">'; |
| 893 | 893 | |
@@ -1019,10 +1019,10 @@ discard block |
||
| 1019 | 1019 | |
| 1020 | 1020 | $i = 0; |
| 1021 | 1021 | while ($i < $num) { |
| 1022 | - $objp = $db->fetch_object($result); // Load the member type and information on it |
|
| 1022 | + $objp = $db->fetch_object($result); // Load the member type and information on it |
|
| 1023 | 1023 | |
| 1024 | 1024 | $caneditamount = $objp->caneditamount; |
| 1025 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 1025 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 1026 | 1026 | |
| 1027 | 1027 | print '<tr class="oddeven">'; |
| 1028 | 1028 | // Label |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | |
| 394 | 394 | $classname = ucfirst($subelement); |
| 395 | 395 | $srcobject = new $classname($db); |
| 396 | - '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Maybe other class but CommonObject is too generic |
|
| 396 | + '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Maybe other class but CommonObject is too generic |
|
| 397 | 397 | |
| 398 | 398 | dol_syslog("Try to find source object origin=".$object->origin_type." originid=".$object->origin_id." to add lines"); |
| 399 | 399 | $result = $srcobject->fetch($object->origin_id); |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | $idprod = GETPOSTINT('idprod'); |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 628 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
| 629 | 629 | |
| 630 | 630 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
| 631 | 631 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | // Get vat rate |
| 746 | 746 | $tva_npr = 0; |
| 747 | 747 | if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority) |
| 748 | - $tmpidprodfournprice = GETPOST('idprodfournprice', 'alpha'); // can be an id of price, or -1, -2, -99 or 'idprod_...' |
|
| 748 | + $tmpidprodfournprice = GETPOST('idprodfournprice', 'alpha'); // can be an id of price, or -1, -2, -99 or 'idprod_...' |
|
| 749 | 749 | if (is_numeric($tmpidprodfournprice) && (int) $tmpidprodfournprice > 0) { |
| 750 | 750 | $tmpidprodfournprice = (int) $tmpidprodfournprice; |
| 751 | 751 | } else { |
@@ -1010,8 +1010,8 @@ discard block |
||
| 1010 | 1010 | $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'CU', 2); |
| 1011 | 1011 | |
| 1012 | 1012 | // Add buying price |
| 1013 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOSTINT('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1014 | - $buyingprice = price2num((GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''), '', 2); // If buying_price is '0', we must keep this value |
|
| 1013 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOSTINT('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1014 | + $buyingprice = price2num((GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''), '', 2); // If buying_price is '0', we must keep this value |
|
| 1015 | 1015 | |
| 1016 | 1016 | // Extrafields Lines |
| 1017 | 1017 | $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | // Multicurrency rate |
| 1165 | 1165 | $result = $object->setMulticurrencyRate(GETPOSTFLOAT('multicurrency_tx'), GETPOSTINT('calculation_mode')); |
| 1166 | 1166 | } elseif ($action == 'update_extras' && $permissiontoeditextra) { |
| 1167 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1167 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1168 | 1168 | |
| 1169 | 1169 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 1170 | 1170 | |
@@ -1245,7 +1245,7 @@ discard block |
||
| 1245 | 1245 | |
| 1246 | 1246 | $classname = ucfirst($subelement); |
| 1247 | 1247 | $objectsrc = new $classname($db); |
| 1248 | - '@phan-var-force Commande|Propal|CommandeFournisseur|SupplierProposal $objectsrc'; // Could be other classes, but CommonObject is too generic |
|
| 1248 | + '@phan-var-force Commande|Propal|CommandeFournisseur|SupplierProposal $objectsrc'; // Could be other classes, but CommonObject is too generic |
|
| 1249 | 1249 | $objectsrc->fetch($originid); |
| 1250 | 1250 | if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { |
| 1251 | 1251 | $objectsrc->fetch_lines(); |
@@ -1815,40 +1815,40 @@ discard block |
||
| 1815 | 1815 | |
| 1816 | 1816 | print '<tr>'; |
| 1817 | 1817 | // Amount HT |
| 1818 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 1819 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1818 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 1819 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1820 | 1820 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1821 | 1821 | // Multicurrency Amount HT |
| 1822 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1822 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1823 | 1823 | } |
| 1824 | 1824 | print '</tr>'; |
| 1825 | 1825 | |
| 1826 | 1826 | print '<tr>'; |
| 1827 | 1827 | // Amount VAT |
| 1828 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 1829 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1828 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 1829 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1830 | 1830 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1831 | 1831 | // Multicurrency Amount VAT |
| 1832 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1832 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1833 | 1833 | } |
| 1834 | 1834 | print '</tr>'; |
| 1835 | 1835 | |
| 1836 | 1836 | // Amount Local Taxes |
| 1837 | 1837 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 1838 | 1838 | print '<tr>'; |
| 1839 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 1840 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1839 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 1840 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1841 | 1841 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1842 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1842 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1843 | 1843 | } |
| 1844 | 1844 | print '</tr>'; |
| 1845 | 1845 | |
| 1846 | 1846 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 1847 | 1847 | print '<tr>'; |
| 1848 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 1849 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1848 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 1849 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1850 | 1850 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1851 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1851 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1852 | 1852 | } |
| 1853 | 1853 | print '</tr>'; |
| 1854 | 1854 | } |
@@ -1856,11 +1856,11 @@ discard block |
||
| 1856 | 1856 | |
| 1857 | 1857 | print '<tr>'; |
| 1858 | 1858 | // Amount TTC |
| 1859 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 1860 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 1859 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 1860 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 1861 | 1861 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 1862 | 1862 | // Multicurrency Amount TTC |
| 1863 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 1863 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 1864 | 1864 | } |
| 1865 | 1865 | print '</tr>'; |
| 1866 | 1866 | |