@@ -360,7 +360,7 @@ |
||
| 360 | 360 | if (isModEnabled('contract')) { |
| 361 | 361 | $formcontract = new FormContract($db); |
| 362 | 362 | print "<tr><td>" . $langs->trans("Contract") . "</td><td>"; |
| 363 | - $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contrat) ? $object->fk_contrat : 0) ; |
|
| 363 | + $contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contrat) ? $object->fk_contrat : 0); |
|
| 364 | 364 | $numcontract = $formcontract->select_contract($object->thirdparty->id, $contractid, 'contracttid'); |
| 365 | 365 | print "</td></tr>"; |
| 366 | 366 | } |
@@ -1070,7 +1070,7 @@ |
||
| 1070 | 1070 | } else { |
| 1071 | 1071 | print '<form name="fichinter" action="' . $_SERVER['PHP_SELF'] . '" method="POST">'; |
| 1072 | 1072 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
| 1073 | - print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
| 1073 | + print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
| 1074 | 1074 | print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
| 1075 | 1075 | |
| 1076 | 1076 | print dol_get_fiche_head(''); |
@@ -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 = ''; |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | if ($sortorder) { |
| 420 | 420 | $backtopage .= '&sortorder=' . urlencode($sortorder); |
| 421 | 421 | } |
| 422 | -include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
| 422 | +include DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
| 423 | 423 | |
| 424 | 424 | $backtopage = $savbacktopage; |
| 425 | 425 | //var_dump($backtopage); |
@@ -1546,7 +1546,7 @@ discard block |
||
| 1546 | 1546 | $error++; |
| 1547 | 1547 | setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
| 1548 | 1548 | } |
| 1549 | - if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
| 1549 | + if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
| 1550 | 1550 | $error++; |
| 1551 | 1551 | setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
| 1552 | 1552 | } |
@@ -1558,7 +1558,7 @@ discard block |
||
| 1558 | 1558 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
| 1559 | 1559 | $action = 'preview'; |
| 1560 | 1560 | if ($backtopage) { |
| 1561 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1561 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1562 | 1562 | header("Location: " . $backtopage); |
| 1563 | 1563 | exit; |
| 1564 | 1564 | } |
@@ -1591,7 +1591,7 @@ discard block |
||
| 1591 | 1591 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1592 | 1592 | |
| 1593 | 1593 | // Security analysis |
| 1594 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1594 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1595 | 1595 | |
| 1596 | 1596 | if (!$errorphpcheck) { |
| 1597 | 1597 | $htmlheadercontent = ''; |
@@ -1629,7 +1629,7 @@ discard block |
||
| 1629 | 1629 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1630 | 1630 | |
| 1631 | 1631 | // Security analysis |
| 1632 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1632 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1633 | 1633 | |
| 1634 | 1634 | if (!$errorphpcheck) { |
| 1635 | 1635 | $csscontent = ''; |
@@ -1672,7 +1672,7 @@ discard block |
||
| 1672 | 1672 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1673 | 1673 | |
| 1674 | 1674 | // Security analysis |
| 1675 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1675 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1676 | 1676 | |
| 1677 | 1677 | if (!$errorphpcheck) { |
| 1678 | 1678 | $jscontent = ''; |
@@ -1710,7 +1710,7 @@ discard block |
||
| 1710 | 1710 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1711 | 1711 | |
| 1712 | 1712 | // Security analysis |
| 1713 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1713 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1714 | 1714 | |
| 1715 | 1715 | if (!$errorphpcheck) { |
| 1716 | 1716 | $robotcontent = ''; |
@@ -1748,7 +1748,7 @@ discard block |
||
| 1748 | 1748 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1749 | 1749 | |
| 1750 | 1750 | // Security analysis |
| 1751 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1751 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1752 | 1752 | |
| 1753 | 1753 | if (!$errorphpcheck) { |
| 1754 | 1754 | $htaccesscontent = ''; |
@@ -1772,7 +1772,7 @@ discard block |
||
| 1772 | 1772 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1773 | 1773 | |
| 1774 | 1774 | // Security analysis |
| 1775 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1775 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1776 | 1776 | |
| 1777 | 1777 | if (!$errorphpcheck) { |
| 1778 | 1778 | $manifestjsoncontent = ''; |
@@ -1810,7 +1810,7 @@ discard block |
||
| 1810 | 1810 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1811 | 1811 | |
| 1812 | 1812 | // Security analysis |
| 1813 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1813 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1814 | 1814 | |
| 1815 | 1815 | if (!$errorphpcheck) { |
| 1816 | 1816 | $readmecontent = ''; |
@@ -1848,7 +1848,7 @@ discard block |
||
| 1848 | 1848 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
| 1849 | 1849 | |
| 1850 | 1850 | // Security analysis |
| 1851 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1851 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
| 1852 | 1852 | |
| 1853 | 1853 | if (!$errorphpcheck) { |
| 1854 | 1854 | $licensecontent = ''; |
@@ -1890,7 +1890,7 @@ discard block |
||
| 1890 | 1890 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
| 1891 | 1891 | $action = 'preview'; |
| 1892 | 1892 | if ($backtopage) { |
| 1893 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1893 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
| 1894 | 1894 | header("Location: " . $backtopage); |
| 1895 | 1895 | exit; |
| 1896 | 1896 | } |
@@ -1909,7 +1909,7 @@ discard block |
||
| 1909 | 1909 | |
| 1910 | 1910 | $object->fk_default_home = $pageid; |
| 1911 | 1911 | $res = $object->update($user); |
| 1912 | - if (! ($res > 0)) { |
|
| 1912 | + if (!($res > 0)) { |
|
| 1913 | 1913 | $error++; |
| 1914 | 1914 | setEventMessages($object->error, $object->errors, 'errors'); |
| 1915 | 1915 | } |
@@ -2523,7 +2523,7 @@ discard block |
||
| 2523 | 2523 | $fileofzip = ''; |
| 2524 | 2524 | if (GETPOSTISSET('templateuserfile')) { |
| 2525 | 2525 | // Case we selected one template |
| 2526 | - $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
| 2526 | + $fileofzip = DOL_DATA_ROOT . '/doctemplates/websites/' . GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
| 2527 | 2527 | } elseif (!empty($_FILES) && is_array($_FILES['userfile'])) { |
| 2528 | 2528 | // Case we upload a new template |
| 2529 | 2529 | if (is_array($_FILES['userfile']['tmp_name'])) { |
@@ -2605,7 +2605,7 @@ discard block |
||
| 2605 | 2605 | if ($website->virtualhost) { |
| 2606 | 2606 | $domainname = $website->virtualhost; |
| 2607 | 2607 | } |
| 2608 | - if (! preg_match('/^http/i', $domainname)) { |
|
| 2608 | + if (!preg_match('/^http/i', $domainname)) { |
|
| 2609 | 2609 | $domainname = 'https://' . $domainname; |
| 2610 | 2610 | } |
| 2611 | 2611 | |
@@ -2671,7 +2671,7 @@ discard block |
||
| 2671 | 2671 | $url->appendChild($lastmod); |
| 2672 | 2672 | // Add suggested frequency for refresh |
| 2673 | 2673 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
| 2674 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2674 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2675 | 2675 | $url->appendChild($changefreq); |
| 2676 | 2676 | } |
| 2677 | 2677 | // Add higher priority for home page |
@@ -2776,7 +2776,7 @@ discard block |
||
| 2776 | 2776 | $url->appendChild($lastmod); |
| 2777 | 2777 | // Add suggested frequency for refresh |
| 2778 | 2778 | if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
| 2779 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2779 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
| 2780 | 2780 | $url->appendChild($changefreq); |
| 2781 | 2781 | } |
| 2782 | 2782 | |
@@ -3537,7 +3537,7 @@ discard block |
||
| 3537 | 3537 | } else { |
| 3538 | 3538 | $disabled = ''; |
| 3539 | 3539 | $title = ''; |
| 3540 | - $url = $_SERVER['PHP_SELF'] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
| 3540 | + $url = $_SERVER['PHP_SELF'] . '?action=delete&token=' . newToken() . '&pageid=' . ((int) $websitepage->id) . '&website=' . urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
| 3541 | 3541 | } |
| 3542 | 3542 | 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>'; |
| 3543 | 3543 | print '</span>'; |
@@ -3757,7 +3757,7 @@ discard block |
||
| 3757 | 3757 | // Clean the php htaccesscontent file to remove php code and get only html part |
| 3758 | 3758 | $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent); |
| 3759 | 3759 | } else { |
| 3760 | - $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
| 3760 | + $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
| 3761 | 3761 | } |
| 3762 | 3762 | if (!trim($htaccesscontent)) { |
| 3763 | 3763 | $htaccesscontent .= "# Order allow,deny\n"; |
@@ -3859,7 +3859,7 @@ discard block |
||
| 3859 | 3859 | $maxfilesizearray = getMaxFileSizeArray(); |
| 3860 | 3860 | $maxmin = $maxfilesizearray['maxmin']; |
| 3861 | 3861 | if ($maxmin > 0) { |
| 3862 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 3862 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 3863 | 3863 | } |
| 3864 | 3864 | print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
| 3865 | 3865 | |
@@ -4116,7 +4116,7 @@ discard block |
||
| 4116 | 4116 | $maxfilesizearray = getMaxFileSizeArray(); |
| 4117 | 4117 | $maxmin = $maxfilesizearray['maxmin']; |
| 4118 | 4118 | if ($maxmin > 0) { |
| 4119 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 4119 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 4120 | 4120 | } |
| 4121 | 4121 | print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
| 4122 | 4122 | print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="' . dol_escape_htmltag($langs->trans("Upload")) . '">'; |
@@ -4647,7 +4647,7 @@ discard block |
||
| 4647 | 4647 | |
| 4648 | 4648 | |
| 4649 | 4649 | $module = 'medias'; |
| 4650 | - $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php |
|
| 4650 | + $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php |
|
| 4651 | 4651 | if (empty($url)) { |
| 4652 | 4652 | $url = DOL_URL_ROOT . '/website/index.php'; // Must be an url without param |
| 4653 | 4653 | } |
@@ -4878,7 +4878,7 @@ discard block |
||
| 4878 | 4878 | print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']); |
| 4879 | 4879 | print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; |
| 4880 | 4880 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
| 4881 | - print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif |
|
| 4881 | + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n"; // Date last modif |
|
| 4882 | 4882 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
| 4883 | 4883 | print getTitleFieldOfList($selectedfields, 0, $_SERVER['PHP_SELF'], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ') . "\n"; |
| 4884 | 4884 | print '</tr>'; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public $fk_website; |
| 71 | 71 | |
| 72 | - public $fk_page; // If translation of another page |
|
| 72 | + public $fk_page; // If translation of another page |
|
| 73 | 73 | |
| 74 | 74 | public $pageurl; |
| 75 | 75 | public $aliasalt; |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public $fk_object; |
| 136 | 136 | |
| 137 | - const STATUS_DRAFT = 0; // offline |
|
| 138 | - const STATUS_VALIDATED = 1; // online |
|
| 137 | + const STATUS_DRAFT = 0; // offline |
|
| 138 | + const STATUS_VALIDATED = 1; // online |
|
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | /** |
@@ -1145,7 +1145,7 @@ discard block |
||
| 1145 | 1145 | $stringtoexport = str_replace('medias/image/' . $website->ref . '/', "medias/image/__WEBSITE_KEY__/", $stringtoexport); |
| 1146 | 1146 | $stringtoexport = str_replace('medias/js/' . $website->ref . '/', "medias/js/__WEBSITE_KEY__/", $stringtoexport); |
| 1147 | 1147 | $stringtoexport = str_replace('"image/' . $website->ref . '/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content |
| 1148 | - $stringtoexport = str_replace('"/image/' . $website->ref . '/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
| 1148 | + $stringtoexport = str_replace('"/image/' . $website->ref . '/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content |
|
| 1149 | 1149 | $stringtoexport = str_replace('"js/' . $website->ref . '/', '"js/__WEBSITE_KEY__/', $stringtoexport); |
| 1150 | 1150 | $stringtoexport = str_replace('"/js/' . $website->ref . '/', '"/js/__WEBSITE_KEY__/', $stringtoexport); |
| 1151 | 1151 | |
@@ -1464,7 +1464,7 @@ discard block |
||
| 1464 | 1464 | $filetpl = $pathofwebsite . '/page' . $object->fk_default_home . '.tpl.php'; |
| 1465 | 1465 | } |
| 1466 | 1466 | $filewrapper = $pathofwebsite . '/wrapper.php'; |
| 1467 | - dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
| 1467 | + dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories |
|
| 1468 | 1468 | } |
| 1469 | 1469 | |
| 1470 | 1470 | if ($error) { |
@@ -1867,7 +1867,7 @@ discard block |
||
| 1867 | 1867 | $destContent = file_get_contents($fileNeeded['fullname']); |
| 1868 | 1868 | |
| 1869 | 1869 | $numOfPageDest = $this->extractNumberFromFilename($fileNeeded['name']); |
| 1870 | - $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest,$numOfPageSource)); |
|
| 1870 | + $differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest, $numOfPageSource)); |
|
| 1871 | 1871 | $differences['file_destination'] = $fileNeeded; |
| 1872 | 1872 | } |
| 1873 | 1873 | return $differences; |
@@ -1908,7 +1908,7 @@ discard block |
||
| 1908 | 1908 | $linefound = array(); |
| 1909 | 1909 | $countNumPage = count($exceptNumPge); |
| 1910 | 1910 | |
| 1911 | - for ($i = 0;$i < $countNumPage; $i++) { |
|
| 1911 | + for ($i = 0; $i < $countNumPage; $i++) { |
|
| 1912 | 1912 | $linefound[$i] = array(); |
| 1913 | 1913 | $linefound[$i]['meta'] = '/content="' . preg_quote($exceptNumPge[$i], '/') . '" \/>/'; |
| 1914 | 1914 | $linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", ' . preg_quote($exceptNumPge[$i], '/') . '\);/'; |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha'); |
| 85 | 85 | $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha'); |
| 86 | 86 | $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); |
| 87 | -$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric |
|
| 87 | +$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric |
|
| 88 | 88 | $search_paymentmode = GETPOSTINT('search_paymentmode'); |
| 89 | 89 | $search_paymentcond = GETPOSTINT('search_paymentcond'); |
| 90 | 90 | $search_town = GETPOST('search_town', 'alpha'); |
@@ -312,14 +312,14 @@ discard block |
||
| 312 | 312 | |
| 313 | 313 | // Creation of payment line |
| 314 | 314 | $paiement = new PaiementFourn($db); |
| 315 | - $paiement->datepaye = $datepaye; |
|
| 315 | + $paiement->datepaye = $datepaye; |
|
| 316 | 316 | |
| 317 | 317 | $correctedAmounts = []; |
| 318 | 318 | foreach ($amounts as $key => $value) { |
| 319 | 319 | $correctedAmounts[$key] = (float) $value; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | - $paiement->amounts = $correctedAmounts; // Array of amounts |
|
| 322 | + $paiement->amounts = $correctedAmounts; // Array of amounts |
|
| 323 | 323 | $paiement->multicurrency_amounts = $multicurrency_amounts; |
| 324 | 324 | $paiement->multicurrency_code = $multicurrency_code; // Array with all currency of payments dispatching |
| 325 | 325 | $paiement->multicurrency_tx = $multicurrency_tx; // Array with all currency tx of payments dispatching |
@@ -610,8 +610,8 @@ discard block |
||
| 610 | 610 | $total = 0; |
| 611 | 611 | $total_ttc = 0; |
| 612 | 612 | $totalrecu = 0; |
| 613 | - $totalrecucreditnote = 0; // PHP Warning: Undefined variable $totalrecucreditnote |
|
| 614 | - $totalrecudeposits = 0; // PHP Warning: Undefined variable $totalrecudeposits |
|
| 613 | + $totalrecucreditnote = 0; // PHP Warning: Undefined variable $totalrecucreditnote |
|
| 614 | + $totalrecudeposits = 0; // PHP Warning: Undefined variable $totalrecudeposits |
|
| 615 | 615 | while ($i < $num) { |
| 616 | 616 | $objp = $db->fetch_object($resql); |
| 617 | 617 | |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | $page = 0; |
| 85 | 85 | } // If $page is not defined, or '' or -1 |
| 86 | 86 | $offset = $limit * $page; |
| 87 | -if (! $sortorder) { |
|
| 87 | +if (!$sortorder) { |
|
| 88 | 88 | $sortorder = 'DESC'; |
| 89 | 89 | } |
| 90 | -if (! $sortfield) { |
|
| 90 | +if (!$sortfield) { |
|
| 91 | 91 | $sortfield = 'f.titre'; |
| 92 | 92 | } |
| 93 | 93 | $pageprev = $page - 1; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $object = new FactureFournisseurRec($db); |
| 97 | 97 | if (($id > 0 || $title) && $action != 'create' && $action != 'add') { |
| 98 | 98 | $ret = $object->fetch($id, $title); |
| 99 | - if (! $ret) { |
|
| 99 | + if (!$ret) { |
|
| 100 | 100 | setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors'); |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $action = 'list'; |
| 141 | 141 | $massaction = ''; |
| 142 | 142 | } |
| 143 | -if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { |
|
| 143 | +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { |
|
| 144 | 144 | $massaction = ''; |
| 145 | 145 | } |
| 146 | 146 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | // Create predefined invoice |
| 169 | 169 | if ($action == 'add') { |
| 170 | - if (! GETPOST('title', 'alphanohtml')) { |
|
| 170 | + if (!GETPOST('title', 'alphanohtml')) { |
|
| 171 | 171 | setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Title")), null, 'errors'); |
| 172 | 172 | $action = "create"; |
| 173 | 173 | $error++; |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - if (! $error) { |
|
| 193 | + if (!$error) { |
|
| 194 | 194 | $object->titre = GETPOST('title', 'alphanohtml'); // deprecated |
| 195 | 195 | $object->title = GETPOST('title', 'alphanohtml'); |
| 196 | 196 | $object->libelle = GETPOST('libelle', 'alpha'); // deprecated |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $action = "create"; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | - if (! $error) { |
|
| 242 | + if (!$error) { |
|
| 243 | 243 | $db->commit(); |
| 244 | 244 | |
| 245 | 245 | header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id); |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $result = $object->setValueFrom('titre', $title, '', null, 'text', '', $user); |
| 290 | 290 | |
| 291 | 291 | if ($result > 0) { |
| 292 | - $object->titre = $title; // deprecated |
|
| 292 | + $object->titre = $title; // deprecated |
|
| 293 | 293 | $object->title = $title; |
| 294 | 294 | $object->ref = $object->title; |
| 295 | 295 | } else { |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $error++; |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | - if (! $error) { |
|
| 339 | + if (!$error) { |
|
| 340 | 340 | $db->commit(); |
| 341 | 341 | } else { |
| 342 | 342 | $db->rollback(); |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | $error++; |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | - if (! $error) { |
|
| 356 | + if (!$error) { |
|
| 357 | 357 | $db->commit(); |
| 358 | 358 | } else { |
| 359 | 359 | $db->rollback(); |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | $error++; |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | - if (! $error) { |
|
| 415 | + if (!$error) { |
|
| 416 | 416 | $result = $object->insertExtraFields('BILLREC_MODIFY'); |
| 417 | 417 | if ($result < 0) { |
| 418 | 418 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); |
| 464 | 464 | $error++; |
| 465 | 465 | } |
| 466 | - if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (! ($price_ht >= 0) || $price_ht == '')) { // Unit price can be 0 but not '' |
|
| 466 | + if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (!($price_ht >= 0) || $price_ht == '')) { // Unit price can be 0 but not '' |
|
| 467 | 467 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); |
| 468 | 468 | $error++; |
| 469 | 469 | } |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | } |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | - if (! $error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) { |
|
| 515 | + if (!$error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) { |
|
| 516 | 516 | $ret = $object->fetch($id); |
| 517 | 517 | if ($ret < 0) { |
| 518 | 518 | dol_print_error($db, $object->error); |
@@ -728,8 +728,8 @@ discard block |
||
| 728 | 728 | $action = ''; |
| 729 | 729 | } |
| 730 | 730 | } |
| 731 | - } elseif ($action == 'updateline' && $usercancreate && ! GETPOST('cancel', 'alpha')) { |
|
| 732 | - if (! $object->fetch($id) > 0) { |
|
| 731 | + } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { |
|
| 732 | + if (!$object->fetch($id) > 0) { |
|
| 733 | 733 | dol_print_error($db); |
| 734 | 734 | } |
| 735 | 735 | $object->fetch_thirdparty(); |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | |
| 781 | 781 | // Define special_code for special lines |
| 782 | 782 | $special_code = GETPOSTINT('special_code'); |
| 783 | - if (! GETPOST('qty', 'alpha')) { |
|
| 783 | + if (!GETPOST('qty', 'alpha')) { |
|
| 784 | 784 | $special_code = 3; |
| 785 | 785 | } |
| 786 | 786 | |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | $date_end_fill = !empty(GETPOSTINT('date_end_fill')) ? GETPOSTINT('date_end_fill') : 'NULL'; |
| 827 | 827 | |
| 828 | 828 | // Update line |
| 829 | - if (! $error) { |
|
| 829 | + if (!$error) { |
|
| 830 | 830 | $result = $object->updateline(GETPOSTINT('lineid'), GETPOSTINT('productid'), $ref_fourn, $label, $description, $pu_ht, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax1_rate, 'HT', $type, $date_start_fill, $date_end_fill, $info_bits, $special_code, -1); |
| 831 | 831 | if ($result >= 0) { |
| 832 | 832 | $object->fetch($object->id); // Reload lines |
@@ -1456,8 +1456,8 @@ discard block |
||
| 1456 | 1456 | print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $usercancreate, 'day', $object->date_when, null, '', '', 0, 'strikeIfMaxNbGenReached'); |
| 1457 | 1457 | } |
| 1458 | 1458 | //var_dump(dol_print_date($object->date_when+60, 'dayhour').' - '.dol_print_date($now, 'dayhour')); |
| 1459 | - if (! $object->isMaxNbGenReached()) { |
|
| 1460 | - if (! $object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) { |
|
| 1459 | + if (!$object->isMaxNbGenReached()) { |
|
| 1460 | + if (!$object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) { |
|
| 1461 | 1461 | print img_warning($langs->trans("Late")); |
| 1462 | 1462 | } |
| 1463 | 1463 | } else { |