|
@@ -356,7 +356,7 @@ discard block |
|
|
block discarded – undo |
|
356
|
356
|
} |
|
357
|
357
|
|
|
358
|
358
|
$usercanedit = $user->hasRight('website', 'write'); |
|
359
|
|
-$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
|
359
|
+$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
360
|
360
|
$permissiontodelete = $user->hasRight('website', 'delete'); |
|
361
|
361
|
|
|
362
|
362
|
|
|
@@ -423,7 +423,7 @@ discard block |
|
|
block discarded – undo |
|
423
|
423
|
if ($sortorder) { |
|
424
|
424
|
$backtopage .= '&sortorder='.urlencode($sortorder); |
|
425
|
425
|
} |
|
426
|
|
-include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
|
426
|
+include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
427
|
427
|
|
|
428
|
428
|
$backtopage = $savbacktopage; |
|
429
|
429
|
//var_dump($backtopage); |
|
@@ -1152,7 +1152,7 @@ discard block |
|
|
block discarded – undo |
|
1152
|
1152
|
$objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); |
|
1153
|
1153
|
$objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); |
|
1154
|
1154
|
$objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09'); |
|
1155
|
|
- $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>' |
|
|
1155
|
+ $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>' |
|
1156
|
1156
|
$objectpage->author_alias = GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml'); |
|
1157
|
1157
|
$objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS'); |
|
1158
|
1158
|
$objectpage->fk_object = GETPOST('WEBSITE_OBJECTID'); |
|
@@ -1185,7 +1185,7 @@ discard block |
|
|
block discarded – undo |
|
1185
|
1185
|
$content = ''; |
|
1186
|
1186
|
if (GETPOSTISSET('content')) { |
|
1187
|
1187
|
//$content = GETPOST('content', 'restricthtmlallowunvalid'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1188
|
|
- $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
|
1188
|
+ $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1189
|
1189
|
|
|
1190
|
1190
|
$objectpage->content = make_substitutions($content, $substitutionarray); |
|
1191
|
1191
|
} else { |
|
@@ -1558,7 +1558,7 @@ discard block |
|
|
block discarded – undo |
|
1558
|
1558
|
$error++; |
|
1559
|
1559
|
setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
|
1560
|
1560
|
} |
|
1561
|
|
- if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
|
1561
|
+ if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1562
|
1562
|
$error++; |
|
1563
|
1563
|
setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
|
1564
|
1564
|
} |
|
@@ -1570,7 +1570,7 @@ discard block |
|
|
block discarded – undo |
|
1570
|
1570
|
if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
|
1571
|
1571
|
$action = 'preview'; |
|
1572
|
1572
|
if ($backtopage) { |
|
1573
|
|
- $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
|
1573
|
+ $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1574
|
1574
|
header("Location: ".$backtopage); |
|
1575
|
1575
|
exit; |
|
1576
|
1576
|
} |
|
@@ -1594,7 +1594,7 @@ discard block |
|
|
block discarded – undo |
|
1594
|
1594
|
} |
|
1595
|
1595
|
|
|
1596
|
1596
|
|
|
1597
|
|
- $dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
|
1597
|
+ $dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
1598
|
1598
|
$dataposted = preg_replace(array('/<html>\n*/ims', '/<\/html>\n*/ims'), array('', ''), $dataposted); |
|
1599
|
1599
|
$dataposted = str_replace('<?=', '<?php', $dataposted); |
|
1600
|
1600
|
|
|
@@ -1603,7 +1603,7 @@ discard block |
|
|
block discarded – undo |
|
1603
|
1603
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1604
|
1604
|
|
|
1605
|
1605
|
// Security analysis |
|
1606
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1606
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1607
|
1607
|
|
|
1608
|
1608
|
if (!$errorphpcheck) { |
|
1609
|
1609
|
$htmlheadercontent = ''; |
|
@@ -1641,7 +1641,7 @@ discard block |
|
|
block discarded – undo |
|
1641
|
1641
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1642
|
1642
|
|
|
1643
|
1643
|
// Security analysis |
|
1644
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1644
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1645
|
1645
|
|
|
1646
|
1646
|
if (!$errorphpcheck) { |
|
1647
|
1647
|
$csscontent = ''; |
|
@@ -1684,7 +1684,7 @@ discard block |
|
|
block discarded – undo |
|
1684
|
1684
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1685
|
1685
|
|
|
1686
|
1686
|
// Security analysis |
|
1687
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1687
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1688
|
1688
|
|
|
1689
|
1689
|
if (!$errorphpcheck) { |
|
1690
|
1690
|
$jscontent = ''; |
|
@@ -1722,7 +1722,7 @@ discard block |
|
|
block discarded – undo |
|
1722
|
1722
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1723
|
1723
|
|
|
1724
|
1724
|
// Security analysis |
|
1725
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1725
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1726
|
1726
|
|
|
1727
|
1727
|
if (!$errorphpcheck) { |
|
1728
|
1728
|
$robotcontent = ''; |
|
@@ -1760,7 +1760,7 @@ discard block |
|
|
block discarded – undo |
|
1760
|
1760
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1761
|
1761
|
|
|
1762
|
1762
|
// Security analysis |
|
1763
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1763
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1764
|
1764
|
|
|
1765
|
1765
|
if (!$errorphpcheck) { |
|
1766
|
1766
|
$htaccesscontent = ''; |
|
@@ -1784,7 +1784,7 @@ discard block |
|
|
block discarded – undo |
|
1784
|
1784
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1785
|
1785
|
|
|
1786
|
1786
|
// Security analysis |
|
1787
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1787
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1788
|
1788
|
|
|
1789
|
1789
|
if (!$errorphpcheck) { |
|
1790
|
1790
|
$manifestjsoncontent = ''; |
|
@@ -1823,7 +1823,7 @@ discard block |
|
|
block discarded – undo |
|
1823
|
1823
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1824
|
1824
|
|
|
1825
|
1825
|
// Security analysis |
|
1826
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1826
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1827
|
1827
|
|
|
1828
|
1828
|
if (!$errorphpcheck) { |
|
1829
|
1829
|
$readmecontent = ''; |
|
@@ -1862,7 +1862,7 @@ discard block |
|
|
block discarded – undo |
|
1862
|
1862
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1863
|
1863
|
|
|
1864
|
1864
|
// Security analysis |
|
1865
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1865
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1866
|
1866
|
|
|
1867
|
1867
|
if (!$errorphpcheck) { |
|
1868
|
1868
|
$licensecontent = ''; |
|
@@ -1904,7 +1904,7 @@ discard block |
|
|
block discarded – undo |
|
1904
|
1904
|
if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
|
1905
|
1905
|
$action = 'preview'; |
|
1906
|
1906
|
if ($backtopage) { |
|
1907
|
|
- $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
|
1907
|
+ $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1908
|
1908
|
header("Location: ".$backtopage); |
|
1909
|
1909
|
exit; |
|
1910
|
1910
|
} |
|
@@ -1923,7 +1923,7 @@ discard block |
|
|
block discarded – undo |
|
1923
|
1923
|
|
|
1924
|
1924
|
$object->fk_default_home = $pageid; |
|
1925
|
1925
|
$res = $object->update($user); |
|
1926
|
|
- if (! ($res > 0)) { |
|
|
1926
|
+ if (!($res > 0)) { |
|
1927
|
1927
|
$error++; |
|
1928
|
1928
|
setEventMessages($object->error, $object->errors, 'errors'); |
|
1929
|
1929
|
} |
|
@@ -2038,7 +2038,7 @@ discard block |
|
|
block discarded – undo |
|
2038
|
2038
|
$objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); |
|
2039
|
2039
|
$objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); |
|
2040
|
2040
|
$objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09'); |
|
2041
|
|
- $objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
|
2041
|
+ $objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
2042
|
2042
|
$objectpage->fk_page = (GETPOSTINT('pageidfortranslation') > 0 ? GETPOSTINT('pageidfortranslation') : 0); |
|
2043
|
2043
|
$objectpage->author_alias = trim(GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml')); |
|
2044
|
2044
|
$objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS', 'alpha'); |
|
@@ -2314,7 +2314,7 @@ discard block |
|
|
block discarded – undo |
|
2314
|
2314
|
|
|
2315
|
2315
|
$phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content); |
|
2316
|
2316
|
|
|
2317
|
|
- $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
|
2317
|
+ $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
2318
|
2318
|
|
|
2319
|
2319
|
$phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content); |
|
2320
|
2320
|
|
|
@@ -2535,7 +2535,7 @@ discard block |
|
|
block discarded – undo |
|
2535
|
2535
|
$fileofzip = ''; |
|
2536
|
2536
|
if (GETPOSTISSET('templateuserfile')) { |
|
2537
|
2537
|
// Case we selected one template |
|
2538
|
|
- $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
|
2538
|
+ $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2539
|
2539
|
} elseif (!empty($_FILES) && is_array($_FILES['userfile'])) { |
|
2540
|
2540
|
// Case we upload a new template |
|
2541
|
2541
|
if (is_array($_FILES['userfile']['tmp_name'])) { |
|
@@ -2617,7 +2617,7 @@ discard block |
|
|
block discarded – undo |
|
2617
|
2617
|
if ($website->virtualhost) { |
|
2618
|
2618
|
$domainname = $website->virtualhost; |
|
2619
|
2619
|
} |
|
2620
|
|
- if (! preg_match('/^http/i', $domainname)) { |
|
|
2620
|
+ if (!preg_match('/^http/i', $domainname)) { |
|
2621
|
2621
|
$domainname = 'https://'.$domainname; |
|
2622
|
2622
|
} |
|
2623
|
2623
|
|
|
@@ -2683,7 +2683,7 @@ discard block |
|
|
block discarded – undo |
|
2683
|
2683
|
$url->appendChild($lastmod); |
|
2684
|
2684
|
// Add suggested frequency for refresh |
|
2685
|
2685
|
if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
|
2686
|
|
- $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
|
2686
|
+ $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2687
|
2687
|
$url->appendChild($changefreq); |
|
2688
|
2688
|
} |
|
2689
|
2689
|
// Add higher priority for home page |
|
@@ -2788,7 +2788,7 @@ discard block |
|
|
block discarded – undo |
|
2788
|
2788
|
$url->appendChild($lastmod); |
|
2789
|
2789
|
// Add suggested frequency for refresh |
|
2790
|
2790
|
if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
|
2791
|
|
- $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
|
2791
|
+ $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2792
|
2792
|
$url->appendChild($changefreq); |
|
2793
|
2793
|
} |
|
2794
|
2794
|
|
|
@@ -3076,11 +3076,11 @@ discard block |
|
|
block discarded – undo |
|
3076
|
3076
|
|
|
3077
|
3077
|
// // Export web site |
|
3078
|
3078
|
$extraCssClass = getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE') ? 'hideobject' : ''; |
|
3079
|
|
- print '<input type="submit" class="button bordertransp ' . $extraCssClass . '" ' . $disabledexport . ' value="' . dol_escape_htmltag($exportlabel) . '" name="exportsite">'; |
|
|
3079
|
+ print '<input type="submit" class="button bordertransp '.$extraCssClass.'" '.$disabledexport.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">'; |
|
3080
|
3080
|
|
|
3081
|
3081
|
if (getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')) { |
|
3082
|
3082
|
// Overwrite template in sources |
|
3083
|
|
- $overwriteGitUrl = $_SERVER["PHP_SELF"] . '?action=overwritesite&website=' . urlencode($website->ref); |
|
|
3083
|
+ $overwriteGitUrl = $_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref); |
|
3084
|
3084
|
print dolButtonToOpenExportDialog('exportpopup', $langs->trans('ExportOptions'), $langs->trans('ExportSite'), 'exportsite', $overwriteGitUrl, $website); |
|
3085
|
3085
|
//print '<a href="'.$_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref).'" class="button bordertransp hideobject" title="'.dol_escape_htmltag($langs->trans("ExportIntoGIT").". Directory ".getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')).'">'.dol_escape_htmltag($langs->trans("ExportIntoGIT")).'</a>'; |
|
3086
|
3086
|
} |
|
@@ -3441,7 +3441,7 @@ discard block |
|
|
block discarded – undo |
|
3441
|
3441
|
print '<!-- button EditInLine and ShowSubcontainers -->'."\n"; |
|
3442
|
3442
|
print '<div class="websiteselectionsection inline-block">'; |
|
3443
|
3443
|
|
|
3444
|
|
- print '<div class="inline-block marginrightonly">'; // Button includes dynamic content |
|
|
3444
|
+ print '<div class="inline-block marginrightonly">'; // Button includes dynamic content |
|
3445
|
3445
|
print $langs->trans("ShowSubcontainers"); |
|
3446
|
3446
|
if (!getDolGlobalString('WEBSITE_SUBCONTAINERSINLINE')) { |
|
3447
|
3447
|
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>'; |
|
@@ -3450,7 +3450,7 @@ discard block |
|
|
block discarded – undo |
|
3450
|
3450
|
} |
|
3451
|
3451
|
print '</div>'; |
|
3452
|
3452
|
|
|
3453
|
|
- print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
|
3453
|
+ print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
3454
|
3454
|
|
|
3455
|
3455
|
print '<span id="switchckeditorinline">'."\n"; |
|
3456
|
3456
|
// Enable CKEditor inline with js on section and div with conteneditable=true |
|
@@ -3542,15 +3542,15 @@ discard block |
|
|
block discarded – undo |
|
3542
|
3542
|
// Sending data via AJAX |
|
3543
|
3543
|
$.ajax({ |
|
3544
|
3544
|
type: \'POST\', |
|
3545
|
|
- url: \'' . DOL_URL_ROOT . '/core/ajax/editinline.php\', |
|
|
3545
|
+ url: \'' . DOL_URL_ROOT.'/core/ajax/editinline.php\', |
|
3546
|
3546
|
data: { |
|
3547
|
3547
|
website_ref: \''.$website->ref.'\', |
|
3548
|
|
- page_id: \'' . $websitepage->id . '\', |
|
|
3548
|
+ page_id: \'' . $websitepage->id.'\', |
|
3549
|
3549
|
content: content, |
|
3550
|
3550
|
element_id: elementId, |
|
3551
|
3551
|
element_type: elementType, |
|
3552
|
3552
|
action: \'updatedElementContent\', |
|
3553
|
|
- token: \'' . newToken() . '\' |
|
|
3553
|
+ token: \'' . newToken().'\' |
|
3554
|
3554
|
}, |
|
3555
|
3555
|
success: function(response) { |
|
3556
|
3556
|
console.log(response); |
|
@@ -3636,7 +3636,7 @@ discard block |
|
|
block discarded – undo |
|
3636
|
3636
|
} else { |
|
3637
|
3637
|
$disabled = ''; |
|
3638
|
3638
|
$title = ''; |
|
3639
|
|
- $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
|
3639
|
+ $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3640
|
3640
|
} |
|
3641
|
3641
|
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>'; |
|
3642
|
3642
|
print '</span>'; |
|
@@ -3825,7 +3825,7 @@ discard block |
|
|
block discarded – undo |
|
3825
|
3825
|
// Clean the php htmlheader file to remove php code and get only html part |
|
3826
|
3826
|
$htmlheadercontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htmlheadercontent); |
|
3827
|
3827
|
} else { |
|
3828
|
|
- $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>' |
|
|
3828
|
+ $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>' |
|
3829
|
3829
|
} |
|
3830
|
3830
|
if (!trim($htmlheadercontent)) { |
|
3831
|
3831
|
$htmlheadercontent = "<html>\n"; |
|
@@ -3856,7 +3856,7 @@ discard block |
|
|
block discarded – undo |
|
3856
|
3856
|
// Clean the php htaccesscontent file to remove php code and get only html part |
|
3857
|
3857
|
$htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent); |
|
3858
|
3858
|
} else { |
|
3859
|
|
- $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
|
3859
|
+ $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3860
|
3860
|
} |
|
3861
|
3861
|
if (!trim($htaccesscontent)) { |
|
3862
|
3862
|
$htaccesscontent .= "# Order allow,deny\n"; |
|
@@ -3957,7 +3957,7 @@ discard block |
|
|
block discarded – undo |
|
3957
|
3957
|
$maxfilesizearray = getMaxFileSizeArray(); |
|
3958
|
3958
|
$maxmin = $maxfilesizearray['maxmin']; |
|
3959
|
3959
|
if ($maxmin > 0) { |
|
3960
|
|
- print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
|
3960
|
+ print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3961
|
3961
|
} |
|
3962
|
3962
|
print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
|
3963
|
3963
|
|
|
@@ -3999,7 +3999,7 @@ discard block |
|
|
block discarded – undo |
|
3999
|
3999
|
print '<tr><td class="tdtop">'; |
|
4000
|
4000
|
print $langs->trans('WEBSITE_HTML_HEADER'); |
|
4001
|
4001
|
$htmlhelp = $langs->trans("Example").' :<br>'; |
|
4002
|
|
- $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
|
4002
|
+ $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
4003
|
4003
|
$textwithhelp = $form->textwithpicto('', $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); |
|
4004
|
4004
|
$htmlhelp2 = $langs->trans("LinkAndScriptsHereAreNotLoadedInEditor").'<br>'; |
|
4005
|
4005
|
print $form->textwithpicto($textwithhelp, $htmlhelp2, 1, 'warning', '', 0, 2, 'htmlheadertooltip2'); |
|
@@ -4214,7 +4214,7 @@ discard block |
|
|
block discarded – undo |
|
4214
|
4214
|
$maxfilesizearray = getMaxFileSizeArray(); |
|
4215
|
4215
|
$maxmin = $maxfilesizearray['maxmin']; |
|
4216
|
4216
|
if ($maxmin > 0) { |
|
4217
|
|
- print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
|
4217
|
+ print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
4218
|
4218
|
} |
|
4219
|
4219
|
print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
|
4220
|
4220
|
print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">'; |
|
@@ -4734,7 +4734,7 @@ discard block |
|
|
block discarded – undo |
|
4734
|
4734
|
print '<tr><td class="tdhtmlheader tdtop">'; |
|
4735
|
4735
|
$htmlhelp = $langs->trans("EditTheWebSiteForACommonHeader").'<br><br>'; |
|
4736
|
4736
|
$htmlhelp .= $langs->trans("Example").' :<br>'; |
|
4737
|
|
- $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
|
4737
|
+ $htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction. |
|
4738
|
4738
|
print $form->textwithpicto($langs->transnoentitiesnoconv('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); |
|
4739
|
4739
|
print '</td><td>'; |
|
4740
|
4740
|
$poscursor = array('x' => GETPOST('htmlheader_x'), 'y' => GETPOST('htmlheader_y')); |
|
@@ -4873,7 +4873,7 @@ discard block |
|
|
block discarded – undo |
|
4873
|
4873
|
|
|
4874
|
4874
|
|
|
4875
|
4875
|
$module = 'medias'; |
|
4876
|
|
- $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
|
4876
|
+ $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
4877
|
4877
|
if (empty($url)) { |
|
4878
|
4878
|
$url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param |
|
4879
|
4879
|
} |
|
@@ -5110,8 +5110,8 @@ discard block |
|
|
block discarded – undo |
|
5110
|
5110
|
print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
|
5111
|
5111
|
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
|
5112
|
5112
|
print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '')."\n"; |
|
5113
|
|
- print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation |
|
5114
|
|
- print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
|
5113
|
+ print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation |
|
|
5114
|
+ print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
5115
|
5115
|
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
|
5116
|
5116
|
// Action column |
|
5117
|
5117
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |