@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public $reception; |
46 | 46 | |
47 | 47 | /** |
48 | - * Constructor |
|
48 | + * Constructor |
|
49 | 49 | */ |
50 | 50 | public function __construct() |
51 | 51 | { |
@@ -623,15 +623,15 @@ discard block |
||
623 | 623 | */ |
624 | 624 | |
625 | 625 | /** |
626 | - * Close a reception (Classify it as "Delivered") |
|
627 | - * |
|
628 | - * @param int $id Reception ID |
|
629 | - * @param int $notrigger Disabled triggers |
|
630 | - * |
|
631 | - * @url POST {id}/close |
|
632 | - * |
|
633 | - * @return Object |
|
634 | - */ |
|
626 | + * Close a reception (Classify it as "Delivered") |
|
627 | + * |
|
628 | + * @param int $id Reception ID |
|
629 | + * @param int $notrigger Disabled triggers |
|
630 | + * |
|
631 | + * @url POST {id}/close |
|
632 | + * |
|
633 | + * @return Object |
|
634 | + */ |
|
635 | 635 | public function close($id, $notrigger = 0) |
636 | 636 | { |
637 | 637 | if (!DolibarrApiAccess::$user->hasRight('reception', 'creer')) { |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | return $this->_cleanObjectDatas($this->reception); |
664 | 664 | } |
665 | 665 | |
666 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
666 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
667 | 667 | /** |
668 | 668 | * Clean sensible object datas |
669 | 669 | * |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | */ |
673 | 673 | protected function _cleanObjectDatas($object) |
674 | 674 | { |
675 | - // phpcs:enable |
|
675 | + // phpcs:enable |
|
676 | 676 | $object = parent::_cleanObjectDatas($object); |
677 | 677 | |
678 | 678 | unset($object->thirdparty); // id already returned |
@@ -204,11 +204,11 @@ |
||
204 | 204 | |
205 | 205 | $receptionline->fk_product = $line['fk_product']; |
206 | 206 | $receptionline->fk_entrepot = $line['fk_entrepot']; |
207 | - $receptionline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: purchase order id. this->origin is 'supplier_order' |
|
207 | + $receptionline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: purchase order id. this->origin is 'supplier_order' |
|
208 | 208 | $receptionline->origin_line_id = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: purchase order id |
209 | - $receptionline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: purchase order line id |
|
210 | - $receptionline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
211 | - $receptionline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
209 | + $receptionline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: purchase order line id |
|
210 | + $receptionline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
211 | + $receptionline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
212 | 212 | $receptionline->qty = $line['qty']; |
213 | 213 | //$receptionline->rang = $line['rang']; |
214 | 214 | $receptionline->array_options = $line['array_options']; |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | } |
1182 | 1182 | } |
1183 | 1183 | |
1184 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1184 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1185 | 1185 | /** |
1186 | 1186 | * Load lines |
1187 | 1187 | * |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | */ |
1190 | 1190 | public function fetch_lines() |
1191 | 1191 | { |
1192 | - // phpcs:enable |
|
1192 | + // phpcs:enable |
|
1193 | 1193 | $this->lines = array(); |
1194 | 1194 | |
1195 | 1195 | require_once constant('DOL_DOCUMENT_ROOT') . '/fourn/class/fournisseur.commande.dispatch.class.php'; |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | return $this->LibStatut($this->statut, $mode); |
1335 | 1335 | } |
1336 | 1336 | |
1337 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1337 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1338 | 1338 | /** |
1339 | 1339 | * Return label of a status |
1340 | 1340 | * |
@@ -1344,7 +1344,7 @@ discard block |
||
1344 | 1344 | */ |
1345 | 1345 | public function LibStatut($status, $mode) |
1346 | 1346 | { |
1347 | - // phpcs:enable |
|
1347 | + // phpcs:enable |
|
1348 | 1348 | global $langs; |
1349 | 1349 | |
1350 | 1350 | // List of long language codes for status |
@@ -1510,7 +1510,7 @@ discard block |
||
1510 | 1510 | } |
1511 | 1511 | } |
1512 | 1512 | |
1513 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1513 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1514 | 1514 | /** |
1515 | 1515 | * Fetch deliveries method and return an array. Load array this->meths(rowid=>label). |
1516 | 1516 | * |
@@ -1518,7 +1518,7 @@ discard block |
||
1518 | 1518 | */ |
1519 | 1519 | public function fetch_delivery_methods() |
1520 | 1520 | { |
1521 | - // phpcs:enable |
|
1521 | + // phpcs:enable |
|
1522 | 1522 | global $langs; |
1523 | 1523 | $this->meths = array(); |
1524 | 1524 | |
@@ -1536,7 +1536,7 @@ discard block |
||
1536 | 1536 | } |
1537 | 1537 | } |
1538 | 1538 | |
1539 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1539 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1540 | 1540 | /** |
1541 | 1541 | * Fetch all deliveries method and return an array. Load array this->listmeths. |
1542 | 1542 | * |
@@ -1545,7 +1545,7 @@ discard block |
||
1545 | 1545 | */ |
1546 | 1546 | public function list_delivery_methods($id = 0) |
1547 | 1547 | { |
1548 | - // phpcs:enable |
|
1548 | + // phpcs:enable |
|
1549 | 1549 | global $langs; |
1550 | 1550 | |
1551 | 1551 | $this->listmeths = array(); |
@@ -734,9 +734,9 @@ discard block |
||
734 | 734 | if ($this->origin_object instanceof CommonObject && empty($this->origin_object->lines)) { |
735 | 735 | $res = $this->origin_object->fetch_lines(); |
736 | 736 | if ($this->origin_object instanceof CommandeFournisseur) { |
737 | - $this->commandeFournisseur = $this->origin_object; // deprecated |
|
737 | + $this->commandeFournisseur = $this->origin_object; // deprecated |
|
738 | 738 | } else { |
739 | - $this->commandeFournisseur = null; // deprecated |
|
739 | + $this->commandeFournisseur = null; // deprecated |
|
740 | 740 | } |
741 | 741 | if ($res < 0) { |
742 | 742 | return $res; |
@@ -1358,7 +1358,7 @@ discard block |
||
1358 | 1358 | if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) { |
1359 | 1359 | $this->labelStatus[1] = 'StatusReceptionValidatedToReceive'; |
1360 | 1360 | } |
1361 | - $this->labelStatus[2] = 'StatusReceptionProcessed'; |
|
1361 | + $this->labelStatus[2] = 'StatusReceptionProcessed'; |
|
1362 | 1362 | |
1363 | 1363 | // List of short language codes for status |
1364 | 1364 | $this->labelStatusShort[-1] = 'StatusReceptionCanceledShort'; |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | while ($xnbp < $nbp) { |
1469 | 1469 | $line = new CommandeFournisseurDispatch($this->db); |
1470 | 1470 | $line->desc = $langs->trans("Description") . " " . $xnbp; |
1471 | - $line->libelle = $langs->trans("Description") . " " . $xnbp; // deprecated |
|
1471 | + $line->libelle = $langs->trans("Description") . " " . $xnbp; // deprecated |
|
1472 | 1472 | $line->label = $langs->trans("Description") . " " . $xnbp; |
1473 | 1473 | $line->qty = 10; |
1474 | 1474 |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | return $this->LibStatut($this->status, $mode); |
569 | 569 | } |
570 | 570 | |
571 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
571 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
572 | 572 | /** |
573 | 573 | * Return label of a status |
574 | 574 | * |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | */ |
579 | 579 | public function LibStatut($status, $mode = 0) |
580 | 580 | { |
581 | - // phpcs:enable |
|
581 | + // phpcs:enable |
|
582 | 582 | global $langs; |
583 | 583 | $langs->load('orders'); |
584 | 584 |
@@ -91,9 +91,9 @@ |
||
91 | 91 | } else { |
92 | 92 | $permissiontocreate = isModEnabled('website') && $user->hasRight('website', 'write') || isModEnabled('webportal') && $user->hasRight('webportal', 'write'); |
93 | 93 | } |
94 | -$permissionnote = $permissiontocreate; // Used by the include of actions_setnotes.inc.php |
|
95 | -$permissiondellink = $permissiontocreate; // Used by the include of actions_dellink.inc.php |
|
96 | -$permissiontoadd = $permissiontocreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
94 | +$permissionnote = $permissiontocreate; // Used by the include of actions_setnotes.inc.php |
|
95 | +$permissiondellink = $permissiontocreate; // Used by the include of actions_dellink.inc.php |
|
96 | +$permissiontoadd = $permissiontocreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
97 | 97 | |
98 | 98 | // check access from type of site on create, edit, delete (other than view) |
99 | 99 | $site_type_js = ''; |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | return $this->LibStatut($this->status, $mode); |
827 | 827 | } |
828 | 828 | |
829 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
829 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
830 | 830 | /** |
831 | 831 | * Return the label of a given status |
832 | 832 | * |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | */ |
837 | 837 | public function LibStatut($status, $mode = 0) |
838 | 838 | { |
839 | - // phpcs:enable |
|
839 | + // phpcs:enable |
|
840 | 840 | global $langs; |
841 | 841 | |
842 | 842 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -1126,7 +1126,7 @@ discard block |
||
1126 | 1126 | $stringtoexport = str_replace('medias/image/' . $website->ref . '/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); |
1127 | 1127 | $stringtoexport = str_replace('medias/js/' . $website->ref . '/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); |
1128 | 1128 | $stringtoexport = str_replace('"image/' . $website->ref . '/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
1129 | - $stringtoexport = str_replace('"/image/' . $website->ref . '/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
1129 | + $stringtoexport = str_replace('"/image/' . $website->ref . '/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
1130 | 1130 | $stringtoexport = str_replace('"js/' . $website->ref . '/', '"js/__WEBSITE_KEY__/', $stringtoexport); |
1131 | 1131 | $stringtoexport = str_replace('"/js/' . $website->ref . '/', '"/js/__WEBSITE_KEY__/', $stringtoexport); |
1132 | 1132 | |
@@ -1455,7 +1455,7 @@ discard block |
||
1455 | 1455 | $filetpl = $pathofwebsite . '/page' . $object->fk_default_home . '.tpl.php'; |
1456 | 1456 | } |
1457 | 1457 | $filewrapper = $pathofwebsite . '/wrapper.php'; |
1458 | - dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
1458 | + dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
1459 | 1459 | } |
1460 | 1460 | |
1461 | 1461 | if ($error) { |
@@ -1901,7 +1901,7 @@ discard block |
||
1901 | 1901 | $destContent = file_get_contents($fileNeeded['fullname']); |
1902 | 1902 | |
1903 | 1903 | $numOfPageDest = $this->extractNumberFromFilename($fileNeeded['name']); |
1904 | - $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest,$numOfPageSource)); |
|
1904 | + $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest, $numOfPageSource)); |
|
1905 | 1905 | $differences['file_destination'] = $fileNeeded; |
1906 | 1906 | } else { |
1907 | 1907 | $differences = array(); |
@@ -1944,7 +1944,7 @@ discard block |
||
1944 | 1944 | $linefound = array(); |
1945 | 1945 | $countNumPage = count($exceptNumPge); |
1946 | 1946 | |
1947 | - for ($i = 0;$i < $countNumPage; $i++) { |
|
1947 | + for ($i = 0; $i < $countNumPage; $i++) { |
|
1948 | 1948 | $linefound[$i] = array(); |
1949 | 1949 | $linefound[$i]['meta'] = '/content="' . preg_quote($exceptNumPge[$i], '/') . '" \/>/'; |
1950 | 1950 | $linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", ' . preg_quote($exceptNumPge[$i], '/') . '\);/'; |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | return $this->LibStatut($this->status, $mode); |
827 | 827 | } |
828 | 828 | |
829 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
829 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
830 | 830 | /** |
831 | 831 | * Return the label of a given status |
832 | 832 | * |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | */ |
837 | 837 | public function LibStatut($status, $mode = 0) |
838 | 838 | { |
839 | - // phpcs:enable |
|
839 | + // phpcs:enable |
|
840 | 840 | global $langs; |
841 | 841 | |
842 | 842 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public $fk_website; |
72 | 72 | |
73 | - public $fk_page; // If translation of another page |
|
73 | + public $fk_page; // If translation of another page |
|
74 | 74 | |
75 | 75 | public $pageurl; |
76 | 76 | public $aliasalt; |
@@ -141,8 +141,8 @@ discard block |
||
141 | 141 | public $newid; |
142 | 142 | |
143 | 143 | |
144 | - const STATUS_DRAFT = 0; // offline |
|
145 | - const STATUS_VALIDATED = 1; // online |
|
144 | + const STATUS_DRAFT = 0; // offline |
|
145 | + const STATUS_VALIDATED = 1; // online |
|
146 | 146 | |
147 | 147 | |
148 | 148 | /** |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | if ($sortorder) { |
426 | 426 | $backtopage .= '&sortorder=' . urlencode($sortorder); |
427 | 427 | } |
428 | -include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
428 | +include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
429 | 429 | |
430 | 430 | $backtopage = $savbacktopage; |
431 | 431 | //var_dump($backtopage); |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | $content = ''; |
1189 | 1189 | if (GETPOSTISSET('content')) { |
1190 | 1190 | //$content = GETPOST('content', 'restricthtmlallowunvalid'); // @TODO Use a restricthtmlallowunvalidwithphp |
1191 | - $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1191 | + $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1192 | 1192 | |
1193 | 1193 | $objectpage->content = make_substitutions($content, $substitutionarray); |
1194 | 1194 | } else { |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | $error++; |
1562 | 1562 | setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
1563 | 1563 | } |
1564 | - if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1564 | + if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1565 | 1565 | $error++; |
1566 | 1566 | setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
1567 | 1567 | } |
@@ -1573,7 +1573,7 @@ discard block |
||
1573 | 1573 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1574 | 1574 | $action = 'preview'; |
1575 | 1575 | if ($backtopage) { |
1576 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1576 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1577 | 1577 | header("Location: " . $backtopage); |
1578 | 1578 | exit; |
1579 | 1579 | } |
@@ -1606,7 +1606,7 @@ discard block |
||
1606 | 1606 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1607 | 1607 | |
1608 | 1608 | // Security analysis |
1609 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1609 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1610 | 1610 | |
1611 | 1611 | if (!$errorphpcheck) { |
1612 | 1612 | $htmlheadercontent = ''; |
@@ -1644,7 +1644,7 @@ discard block |
||
1644 | 1644 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1645 | 1645 | |
1646 | 1646 | // Security analysis |
1647 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1647 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1648 | 1648 | |
1649 | 1649 | if (!$errorphpcheck) { |
1650 | 1650 | $csscontent = ''; |
@@ -1687,7 +1687,7 @@ discard block |
||
1687 | 1687 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1688 | 1688 | |
1689 | 1689 | // Security analysis |
1690 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1690 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1691 | 1691 | |
1692 | 1692 | if (!$errorphpcheck) { |
1693 | 1693 | $jscontent = ''; |
@@ -1725,7 +1725,7 @@ discard block |
||
1725 | 1725 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1726 | 1726 | |
1727 | 1727 | // Security analysis |
1728 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1728 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1729 | 1729 | |
1730 | 1730 | if (!$errorphpcheck) { |
1731 | 1731 | $robotcontent = ''; |
@@ -1763,7 +1763,7 @@ discard block |
||
1763 | 1763 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1764 | 1764 | |
1765 | 1765 | // Security analysis |
1766 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1766 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1767 | 1767 | |
1768 | 1768 | if (!$errorphpcheck) { |
1769 | 1769 | $htaccesscontent = ''; |
@@ -1787,7 +1787,7 @@ discard block |
||
1787 | 1787 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1788 | 1788 | |
1789 | 1789 | // Security analysis |
1790 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1790 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1791 | 1791 | |
1792 | 1792 | if (!$errorphpcheck) { |
1793 | 1793 | $manifestjsoncontent = ''; |
@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1827 | 1827 | |
1828 | 1828 | // Security analysis |
1829 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1829 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1830 | 1830 | |
1831 | 1831 | if (!$errorphpcheck) { |
1832 | 1832 | $readmecontent = ''; |
@@ -1865,7 +1865,7 @@ discard block |
||
1865 | 1865 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1866 | 1866 | |
1867 | 1867 | // Security analysis |
1868 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1868 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1869 | 1869 | |
1870 | 1870 | if (!$errorphpcheck) { |
1871 | 1871 | $licensecontent = ''; |
@@ -1907,7 +1907,7 @@ discard block |
||
1907 | 1907 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1908 | 1908 | $action = 'preview'; |
1909 | 1909 | if ($backtopage) { |
1910 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1910 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1911 | 1911 | header("Location: " . $backtopage); |
1912 | 1912 | exit; |
1913 | 1913 | } |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | |
1927 | 1927 | $object->fk_default_home = $pageid; |
1928 | 1928 | $res = $object->update($user); |
1929 | - if (! ($res > 0)) { |
|
1929 | + if (!($res > 0)) { |
|
1930 | 1930 | $error++; |
1931 | 1931 | setEventMessages($object->error, $object->errors, 'errors'); |
1932 | 1932 | } |
@@ -2540,7 +2540,7 @@ discard block |
||
2540 | 2540 | $fileofzip = ''; |
2541 | 2541 | if (GETPOSTISSET('templateuserfile')) { |
2542 | 2542 | // Case we selected one template |
2543 | - $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2543 | + $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2544 | 2544 | } elseif (!empty($_FILES) && is_array($_FILES['userfile'])) { |
2545 | 2545 | // Case we upload a new template |
2546 | 2546 | if (is_array($_FILES['userfile']['tmp_name'])) { |
@@ -2622,7 +2622,7 @@ discard block |
||
2622 | 2622 | if ($website->virtualhost) { |
2623 | 2623 | $domainname = $website->virtualhost; |
2624 | 2624 | } |
2625 | - if (! preg_match('/^http/i', $domainname)) { |
|
2625 | + if (!preg_match('/^http/i', $domainname)) { |
|
2626 | 2626 | $domainname = 'https://' . $domainname; |
2627 | 2627 | } |
2628 | 2628 | |
@@ -2688,7 +2688,7 @@ discard block |
||
2688 | 2688 | $url->appendChild($lastmod); |
2689 | 2689 | // Add suggested frequency for refresh |
2690 | 2690 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
2691 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2691 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2692 | 2692 | $url->appendChild($changefreq); |
2693 | 2693 | } |
2694 | 2694 | // Add higher priority for home page |
@@ -2793,7 +2793,7 @@ discard block |
||
2793 | 2793 | $url->appendChild($lastmod); |
2794 | 2794 | // Add suggested frequency for refresh |
2795 | 2795 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
2796 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2796 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2797 | 2797 | $url->appendChild($changefreq); |
2798 | 2798 | } |
2799 | 2799 | |
@@ -3618,7 +3618,7 @@ discard block |
||
3618 | 3618 | } else { |
3619 | 3619 | $disabled = ''; |
3620 | 3620 | $title = ''; |
3621 | - $url = $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3621 | + $url = $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3622 | 3622 | } |
3623 | 3623 | print '<a href="' . $url . '" class="button buttonDelete bordertransp' . ($disabled ? ' disabled' : '') . '"' . $disabled . ' title="' . dol_escape_htmltag($title) . '">' . img_picto('', 'delete', 'class=""') . '<span class="hideonsmartphone paddingleft">' . $langs->trans("Delete") . '</span></a>'; |
3624 | 3624 | print '</span>'; |
@@ -3838,7 +3838,7 @@ discard block |
||
3838 | 3838 | // Clean the php htaccesscontent file to remove php code and get only html part |
3839 | 3839 | $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent); |
3840 | 3840 | } else { |
3841 | - $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3841 | + $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3842 | 3842 | } |
3843 | 3843 | if (!trim($htaccesscontent)) { |
3844 | 3844 | $htaccesscontent .= "# Order allow,deny\n"; |
@@ -3939,7 +3939,7 @@ discard block |
||
3939 | 3939 | $maxfilesizearray = getMaxFileSizeArray(); |
3940 | 3940 | $maxmin = $maxfilesizearray['maxmin']; |
3941 | 3941 | if ($maxmin > 0) { |
3942 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
3942 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
3943 | 3943 | } |
3944 | 3944 | print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
3945 | 3945 | |
@@ -4196,7 +4196,7 @@ discard block |
||
4196 | 4196 | $maxfilesizearray = getMaxFileSizeArray(); |
4197 | 4197 | $maxmin = $maxfilesizearray['maxmin']; |
4198 | 4198 | if ($maxmin > 0) { |
4199 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
4199 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
4200 | 4200 | } |
4201 | 4201 | print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
4202 | 4202 | print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="' . dol_escape_htmltag($langs->trans("Upload")) . '">'; |
@@ -4854,7 +4854,7 @@ discard block |
||
4854 | 4854 | |
4855 | 4855 | |
4856 | 4856 | $module = 'medias'; |
4857 | - $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
4857 | + $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
4858 | 4858 | if (empty($url)) { |
4859 | 4859 | $url = constant('BASE_URL') . '/website/index.php'; // Must be an url without param |
4860 | 4860 | } |
@@ -5089,8 +5089,8 @@ discard block |
||
5089 | 5089 | print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
5090 | 5090 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
5091 | 5091 | print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '') . "\n"; |
5092 | - print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date creation |
|
5093 | - print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif |
|
5092 | + print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date creation |
|
5093 | + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif |
|
5094 | 5094 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
5095 | 5095 | // Action column |
5096 | 5096 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * @param string $password Password to validate for $username |
101 | 101 | * @return bool True if login ok, false if not |
102 | 102 | */ |
103 | - static function ($username, $password) { |
|
103 | + static function($username, $password) { |
|
104 | 104 | global $user, $conf; |
105 | 105 | global $dolibarr_main_authentication, $dolibarr_auto_user; |
106 | 106 |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | return $this->LibStatut($this->status, $mode); |
577 | 577 | } |
578 | 578 | |
579 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
579 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
580 | 580 | /** |
581 | 581 | * Return the status |
582 | 582 | * |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | */ |
588 | 588 | public function LibStatut($status, $mode = 0) |
589 | 589 | { |
590 | - // phpcs:enable |
|
590 | + // phpcs:enable |
|
591 | 591 | global $langs; |
592 | 592 | |
593 | 593 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |