@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | } |
344 | 344 | |
345 | 345 | $usercanedit = $user->rights->website->write; |
346 | -$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
346 | +$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
347 | 347 | $permissiontodelete = $user->hasRight('website', 'delete'); |
348 | 348 | |
349 | 349 | |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | if ($sortorder) { |
410 | 410 | $backtopage .= '&sortorder='.urlencode($sortorder); |
411 | 411 | } |
412 | -include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
412 | +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
413 | 413 | |
414 | 414 | $backtopage = $savbacktopage; |
415 | 415 | //var_dump($backtopage); |
@@ -1488,7 +1488,7 @@ discard block |
||
1488 | 1488 | $error++; |
1489 | 1489 | setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
1490 | 1490 | } |
1491 | - if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1491 | + if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1492 | 1492 | $error++; |
1493 | 1493 | setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
1494 | 1494 | } |
@@ -1500,7 +1500,7 @@ discard block |
||
1500 | 1500 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1501 | 1501 | $action = 'preview'; |
1502 | 1502 | if ($backtopage) { |
1503 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1503 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1504 | 1504 | header("Location: ".$backtopage); |
1505 | 1505 | exit; |
1506 | 1506 | } |
@@ -1533,7 +1533,7 @@ discard block |
||
1533 | 1533 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1534 | 1534 | |
1535 | 1535 | // Security analysis |
1536 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1536 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1537 | 1537 | |
1538 | 1538 | if (!$errorphpcheck) { |
1539 | 1539 | $htmlheadercontent = ''; |
@@ -1571,7 +1571,7 @@ discard block |
||
1571 | 1571 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1572 | 1572 | |
1573 | 1573 | // Security analysis |
1574 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1574 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1575 | 1575 | |
1576 | 1576 | if (!$errorphpcheck) { |
1577 | 1577 | $csscontent = ''; |
@@ -1614,7 +1614,7 @@ discard block |
||
1614 | 1614 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1615 | 1615 | |
1616 | 1616 | // Security analysis |
1617 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1617 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1618 | 1618 | |
1619 | 1619 | if (!$errorphpcheck) { |
1620 | 1620 | $jscontent = ''; |
@@ -1652,7 +1652,7 @@ discard block |
||
1652 | 1652 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1653 | 1653 | |
1654 | 1654 | // Security analysis |
1655 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1655 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1656 | 1656 | |
1657 | 1657 | if (!$errorphpcheck) { |
1658 | 1658 | $robotcontent = ''; |
@@ -1690,7 +1690,7 @@ discard block |
||
1690 | 1690 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1691 | 1691 | |
1692 | 1692 | // Security analysis |
1693 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1693 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1694 | 1694 | |
1695 | 1695 | if (!$errorphpcheck) { |
1696 | 1696 | $htaccesscontent = ''; |
@@ -1714,7 +1714,7 @@ discard block |
||
1714 | 1714 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1715 | 1715 | |
1716 | 1716 | // Security analysis |
1717 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1717 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1718 | 1718 | |
1719 | 1719 | if (!$errorphpcheck) { |
1720 | 1720 | $manifestjsoncontent = ''; |
@@ -1752,7 +1752,7 @@ discard block |
||
1752 | 1752 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1753 | 1753 | |
1754 | 1754 | // Security analysis |
1755 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1755 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1756 | 1756 | |
1757 | 1757 | if (!$errorphpcheck) { |
1758 | 1758 | $readmecontent = ''; |
@@ -1790,7 +1790,7 @@ discard block |
||
1790 | 1790 | $phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
1791 | 1791 | |
1792 | 1792 | // Security analysis |
1793 | - $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1793 | + $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1794 | 1794 | |
1795 | 1795 | if (!$errorphpcheck) { |
1796 | 1796 | $licensecontent = ''; |
@@ -1832,7 +1832,7 @@ discard block |
||
1832 | 1832 | if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
1833 | 1833 | $action = 'preview'; |
1834 | 1834 | if ($backtopage) { |
1835 | - $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1835 | + $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1836 | 1836 | header("Location: ".$backtopage); |
1837 | 1837 | exit; |
1838 | 1838 | } |
@@ -1851,7 +1851,7 @@ discard block |
||
1851 | 1851 | |
1852 | 1852 | $object->fk_default_home = $pageid; |
1853 | 1853 | $res = $object->update($user); |
1854 | - if (! ($res > 0)) { |
|
1854 | + if (!($res > 0)) { |
|
1855 | 1855 | $error++; |
1856 | 1856 | setEventMessages($object->error, $object->errors, 'errors'); |
1857 | 1857 | } |
@@ -2238,7 +2238,7 @@ discard block |
||
2238 | 2238 | |
2239 | 2239 | $phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content); |
2240 | 2240 | |
2241 | - $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
2241 | + $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
2242 | 2242 | |
2243 | 2243 | $phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content); |
2244 | 2244 | |
@@ -2432,7 +2432,7 @@ discard block |
||
2432 | 2432 | $fileofzip = ''; |
2433 | 2433 | if (GETPOSTISSET('templateuserfile')) { |
2434 | 2434 | // Case we selected one template |
2435 | - $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2435 | + $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2436 | 2436 | } elseif (!empty($_FILES)) { |
2437 | 2437 | // Case we upload a new template |
2438 | 2438 | if (is_array($_FILES['userfile']['tmp_name'])) { |
@@ -2511,7 +2511,7 @@ discard block |
||
2511 | 2511 | if ($website->virtualhost) { |
2512 | 2512 | $domainname = $website->virtualhost; |
2513 | 2513 | } |
2514 | - if (! preg_match('/^http/i', $domainname)) { |
|
2514 | + if (!preg_match('/^http/i', $domainname)) { |
|
2515 | 2515 | $domainname = 'https://'.$domainname; |
2516 | 2516 | } |
2517 | 2517 | |
@@ -2577,7 +2577,7 @@ discard block |
||
2577 | 2577 | $url->appendChild($lastmod); |
2578 | 2578 | // Add suggested frequency for refresh |
2579 | 2579 | if (!empty($conf->global->WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ)) { |
2580 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2580 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2581 | 2581 | $url->appendChild($changefreq); |
2582 | 2582 | } |
2583 | 2583 | // Add higher priority for home page |
@@ -2682,7 +2682,7 @@ discard block |
||
2682 | 2682 | $url->appendChild($lastmod); |
2683 | 2683 | // Add suggested frequency for refresh |
2684 | 2684 | if (!empty($conf->global->WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ)) { |
2685 | - $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2685 | + $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2686 | 2686 | $url->appendChild($changefreq); |
2687 | 2687 | } |
2688 | 2688 | |
@@ -2764,7 +2764,7 @@ discard block |
||
2764 | 2764 | |
2765 | 2765 | print "\n"; |
2766 | 2766 | print '<!-- Open form for all page -->'."\n"; |
2767 | -print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1': '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">'; |
|
2767 | +print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1' : '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">'; |
|
2768 | 2768 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
2769 | 2769 | print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
2770 | 2770 | print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">'; |
@@ -3266,7 +3266,7 @@ discard block |
||
3266 | 3266 | $formquestion[] = array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0, 'morecss'=>'margintoponly'); |
3267 | 3267 | } |
3268 | 3268 | |
3269 | - $value= $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1); |
|
3269 | + $value = $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1); |
|
3270 | 3270 | $formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value); |
3271 | 3271 | |
3272 | 3272 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550); |
@@ -3294,7 +3294,7 @@ discard block |
||
3294 | 3294 | print '<!-- button EditInLine and ShowSubcontainers -->'."\n"; |
3295 | 3295 | print '<div class="websiteselectionsection inline-block">'; |
3296 | 3296 | |
3297 | - print '<div class="inline-block marginrightonly">'; // Button include dynamic contant |
|
3297 | + print '<div class="inline-block marginrightonly">'; // Button include dynamic contant |
|
3298 | 3298 | print $langs->trans("ShowSubcontainers"); |
3299 | 3299 | if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) { |
3300 | 3300 | print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>'; |
@@ -3303,7 +3303,7 @@ discard block |
||
3303 | 3303 | } |
3304 | 3304 | print '</div>'; |
3305 | 3305 | |
3306 | - print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
3306 | + print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
3307 | 3307 | |
3308 | 3308 | print '<span id="switchckeditorinline">'."\n"; |
3309 | 3309 | // Enable CKEditor inline with js on section and div with conteneditable=true |
@@ -3421,7 +3421,7 @@ discard block |
||
3421 | 3421 | } else { |
3422 | 3422 | $disabled = ''; |
3423 | 3423 | $title = ''; |
3424 | - $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3424 | + $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3425 | 3425 | } |
3426 | 3426 | 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>'; |
3427 | 3427 | print '</span>'; |
@@ -3626,7 +3626,7 @@ discard block |
||
3626 | 3626 | // Clean the php htaccesscontent file to remove php code and get only html part |
3627 | 3627 | $htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent); |
3628 | 3628 | } else { |
3629 | - $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3629 | + $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3630 | 3630 | } |
3631 | 3631 | if (!trim($htaccesscontent)) { |
3632 | 3632 | $htaccesscontent .= "# Order allow,deny\n"; |
@@ -3728,7 +3728,7 @@ discard block |
||
3728 | 3728 | $maxfilesizearray = getMaxFileSizeArray(); |
3729 | 3729 | $maxmin = $maxfilesizearray['maxmin']; |
3730 | 3730 | if ($maxmin > 0) { |
3731 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3731 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3732 | 3732 | } |
3733 | 3733 | print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
3734 | 3734 | |
@@ -3984,7 +3984,7 @@ discard block |
||
3984 | 3984 | $maxfilesizearray = getMaxFileSizeArray(); |
3985 | 3985 | $maxmin = $maxfilesizearray['maxmin']; |
3986 | 3986 | if ($maxmin > 0) { |
3987 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3987 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3988 | 3988 | } |
3989 | 3989 | print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
3990 | 3990 | print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">'; |
@@ -4503,7 +4503,7 @@ discard block |
||
4503 | 4503 | |
4504 | 4504 | |
4505 | 4505 | $module = 'medias'; |
4506 | - $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php |
|
4506 | + $formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php |
|
4507 | 4507 | if (empty($url)) { |
4508 | 4508 | $url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param |
4509 | 4509 | } |
@@ -4556,7 +4556,7 @@ discard block |
||
4556 | 4556 | |
4557 | 4557 | require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
4558 | 4558 | $poscursor = array('x'=>GETPOST('PAGE_CONTENT_x'), 'y'=>GETPOST('PAGE_CONTENT_y')); |
4559 | - $doleditor=new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor); |
|
4559 | + $doleditor = new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor); |
|
4560 | 4560 | $doleditor->Create(0, '', false); |
4561 | 4561 | } |
4562 | 4562 | |
@@ -4734,7 +4734,7 @@ discard block |
||
4734 | 4734 | print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']); |
4735 | 4735 | print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
4736 | 4736 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
4737 | - print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
4737 | + print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
4738 | 4738 | print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
4739 | 4739 | print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; |
4740 | 4740 | print '</tr>'; |