|
@@ -350,7 +350,7 @@ discard block |
|
|
block discarded – undo |
|
350
|
350
|
} |
|
351
|
351
|
} |
|
352
|
352
|
|
|
353
|
|
-$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
|
353
|
+$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
354
|
354
|
|
|
355
|
355
|
if ($action == 'replacesite' || $mode == 'replacesite') { // Test on permission not required |
|
356
|
356
|
$containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : ''; |
|
@@ -364,7 +364,7 @@ discard block |
|
|
block discarded – undo |
|
364
|
364
|
} |
|
365
|
365
|
|
|
366
|
366
|
$usercanedit = $user->hasRight('website', 'write'); |
|
367
|
|
-$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
|
367
|
+$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles |
|
368
|
368
|
$permissiontodelete = $user->hasRight('website', 'delete'); |
|
369
|
369
|
|
|
370
|
370
|
|
|
@@ -431,7 +431,7 @@ discard block |
|
|
block discarded – undo |
|
431
|
431
|
if ($sortorder) { |
|
432
|
432
|
$backtopage .= '&sortorder='.urlencode($sortorder); |
|
433
|
433
|
} |
|
434
|
|
-include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
|
434
|
+include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file. |
|
435
|
435
|
|
|
436
|
436
|
$backtopage = $savbacktopage; |
|
437
|
437
|
//var_dump($backtopage); |
|
@@ -591,7 +591,7 @@ discard block |
|
|
block discarded – undo |
|
591
|
591
|
|
|
592
|
592
|
// Replacement of string into pages |
|
593
|
593
|
if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) { |
|
594
|
|
- $replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
|
594
|
+ $replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring |
|
595
|
595
|
|
|
596
|
596
|
$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); |
|
597
|
597
|
$allowimportsite = true; |
|
@@ -1161,7 +1161,7 @@ discard block |
|
|
block discarded – undo |
|
1161
|
1161
|
$objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); |
|
1162
|
1162
|
$objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); |
|
1163
|
1163
|
$objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0; |
|
1164
|
|
- $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>' |
|
|
1164
|
+ $objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>' |
|
1165
|
1165
|
$objectpage->author_alias = GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml'); |
|
1166
|
1166
|
$objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS'); |
|
1167
|
1167
|
$objectpage->fk_object = GETPOST('WEBSITE_OBJECTID'); |
|
@@ -1194,7 +1194,7 @@ discard block |
|
|
block discarded – undo |
|
1194
|
1194
|
$content = ''; |
|
1195
|
1195
|
if (GETPOSTISSET('content')) { |
|
1196
|
1196
|
//$content = GETPOST('content', 'restricthtmlallowunvalid'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1197
|
|
- $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
|
1197
|
+ $content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp |
|
1198
|
1198
|
|
|
1199
|
1199
|
$objectpage->content = make_substitutions($content, $substitutionarray); |
|
1200
|
1200
|
} else { |
|
@@ -1567,7 +1567,7 @@ discard block |
|
|
block discarded – undo |
|
1567
|
1567
|
$error++; |
|
1568
|
1568
|
setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors'); |
|
1569
|
1569
|
} |
|
1570
|
|
- if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
|
1570
|
+ if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) { |
|
1571
|
1571
|
$error++; |
|
1572
|
1572
|
setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors'); |
|
1573
|
1573
|
} |
|
@@ -1579,7 +1579,7 @@ discard block |
|
|
block discarded – undo |
|
1579
|
1579
|
if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
|
1580
|
1580
|
$action = 'preview'; |
|
1581
|
1581
|
if ($backtopage) { |
|
1582
|
|
- $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
|
1582
|
+ $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1583
|
1583
|
header("Location: ".$backtopage); |
|
1584
|
1584
|
exit; |
|
1585
|
1585
|
} |
|
@@ -1603,7 +1603,7 @@ discard block |
|
|
block discarded – undo |
|
1603
|
1603
|
} |
|
1604
|
1604
|
|
|
1605
|
1605
|
|
|
1606
|
|
- $dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
|
1606
|
+ $dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
1607
|
1607
|
$dataposted = preg_replace(array('/<html>\n*/ims', '/<\/html>\n*/ims'), array('', ''), $dataposted); |
|
1608
|
1608
|
$dataposted = str_replace('<?=', '<?php', $dataposted); |
|
1609
|
1609
|
|
|
@@ -1612,7 +1612,7 @@ discard block |
|
|
block discarded – undo |
|
1612
|
1612
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1613
|
1613
|
|
|
1614
|
1614
|
// Security analysis |
|
1615
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1615
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1616
|
1616
|
|
|
1617
|
1617
|
if (!$errorphpcheck) { |
|
1618
|
1618
|
$htmlheadercontent = ''; |
|
@@ -1650,7 +1650,7 @@ discard block |
|
|
block discarded – undo |
|
1650
|
1650
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1651
|
1651
|
|
|
1652
|
1652
|
// Security analysis |
|
1653
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1653
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1654
|
1654
|
|
|
1655
|
1655
|
if (!$errorphpcheck) { |
|
1656
|
1656
|
$csscontent = ''; |
|
@@ -1693,7 +1693,7 @@ discard block |
|
|
block discarded – undo |
|
1693
|
1693
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1694
|
1694
|
|
|
1695
|
1695
|
// Security analysis |
|
1696
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1696
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1697
|
1697
|
|
|
1698
|
1698
|
if (!$errorphpcheck) { |
|
1699
|
1699
|
$jscontent = ''; |
|
@@ -1731,7 +1731,7 @@ discard block |
|
|
block discarded – undo |
|
1731
|
1731
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1732
|
1732
|
|
|
1733
|
1733
|
// Security analysis |
|
1734
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1734
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1735
|
1735
|
|
|
1736
|
1736
|
if (!$errorphpcheck) { |
|
1737
|
1737
|
$robotcontent = ''; |
|
@@ -1769,7 +1769,7 @@ discard block |
|
|
block discarded – undo |
|
1769
|
1769
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1770
|
1770
|
|
|
1771
|
1771
|
// Security analysis |
|
1772
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1772
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1773
|
1773
|
|
|
1774
|
1774
|
if (!$errorphpcheck) { |
|
1775
|
1775
|
if ($dataposted) { |
|
@@ -1797,7 +1797,7 @@ discard block |
|
|
block discarded – undo |
|
1797
|
1797
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1798
|
1798
|
|
|
1799
|
1799
|
// Security analysis |
|
1800
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1800
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1801
|
1801
|
|
|
1802
|
1802
|
if (!$errorphpcheck) { |
|
1803
|
1803
|
$manifestjsoncontent = ''; |
|
@@ -1836,7 +1836,7 @@ discard block |
|
|
block discarded – undo |
|
1836
|
1836
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1837
|
1837
|
|
|
1838
|
1838
|
// Security analysis |
|
1839
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1839
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1840
|
1840
|
|
|
1841
|
1841
|
if (!$errorphpcheck) { |
|
1842
|
1842
|
$readmecontent = ''; |
|
@@ -1875,7 +1875,7 @@ discard block |
|
|
block discarded – undo |
|
1875
|
1875
|
$phpfullcodestring = dolKeepOnlyPhpCode($dataposted); |
|
1876
|
1876
|
|
|
1877
|
1877
|
// Security analysis |
|
1878
|
|
- $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
|
1878
|
+ $errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages |
|
1879
|
1879
|
|
|
1880
|
1880
|
if (!$errorphpcheck) { |
|
1881
|
1881
|
$licensecontent = ''; |
|
@@ -1917,7 +1917,7 @@ discard block |
|
|
block discarded – undo |
|
1917
|
1917
|
if (!GETPOSTISSET('updateandstay')) { // If we click on "Save And Stay", we don not make the redirect |
|
1918
|
1918
|
$action = 'preview'; |
|
1919
|
1919
|
if ($backtopage) { |
|
1920
|
|
- $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
|
1920
|
+ $backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url |
|
1921
|
1921
|
header("Location: ".$backtopage); |
|
1922
|
1922
|
exit; |
|
1923
|
1923
|
} |
|
@@ -1936,7 +1936,7 @@ discard block |
|
|
block discarded – undo |
|
1936
|
1936
|
|
|
1937
|
1937
|
$object->fk_default_home = $pageid; |
|
1938
|
1938
|
$res = $object->update($user); |
|
1939
|
|
- if (! ($res > 0)) { |
|
|
1939
|
+ if (!($res > 0)) { |
|
1940
|
1940
|
$error++; |
|
1941
|
1941
|
setEventMessages($object->error, $object->errors, 'errors'); |
|
1942
|
1942
|
} |
|
@@ -2051,7 +2051,7 @@ discard block |
|
|
block discarded – undo |
|
2051
|
2051
|
$objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha'); |
|
2052
|
2052
|
$objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml')); |
|
2053
|
2053
|
$objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0; |
|
2054
|
|
- $objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
|
2054
|
+ $objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>' |
|
2055
|
2055
|
$objectpage->fk_page = (GETPOSTINT('pageidfortranslation') > 0 ? GETPOSTINT('pageidfortranslation') : 0); |
|
2056
|
2056
|
$objectpage->author_alias = trim(GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml')); |
|
2057
|
2057
|
$objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS', 'alpha'); |
|
@@ -2327,7 +2327,7 @@ discard block |
|
|
block discarded – undo |
|
2327
|
2327
|
|
|
2328
|
2328
|
$phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content); |
|
2329
|
2329
|
|
|
2330
|
|
- $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
|
2330
|
+ $objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed |
|
2331
|
2331
|
|
|
2332
|
2332
|
$phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content); |
|
2333
|
2333
|
|
|
@@ -2548,7 +2548,7 @@ discard block |
|
|
block discarded – undo |
|
2548
|
2548
|
$fileofzip = ''; |
|
2549
|
2549
|
if (GETPOSTISSET('templateuserfile')) { |
|
2550
|
2550
|
// Case we selected one template |
|
2551
|
|
- $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
|
2551
|
+ $fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite() |
|
2552
|
2552
|
} elseif (!empty($_FILES) && is_array($_FILES['userfile'])) { |
|
2553
|
2553
|
// Case we upload a new template |
|
2554
|
2554
|
if (is_array($_FILES['userfile']['tmp_name'])) { |
|
@@ -2630,7 +2630,7 @@ discard block |
|
|
block discarded – undo |
|
2630
|
2630
|
if ($website->virtualhost) { |
|
2631
|
2631
|
$domainname = $website->virtualhost; |
|
2632
|
2632
|
} |
|
2633
|
|
- if (! preg_match('/^http/i', $domainname)) { |
|
|
2633
|
+ if (!preg_match('/^http/i', $domainname)) { |
|
2634
|
2634
|
$domainname = 'https://'.$domainname; |
|
2635
|
2635
|
} |
|
2636
|
2636
|
|
|
@@ -2696,7 +2696,7 @@ discard block |
|
|
block discarded – undo |
|
2696
|
2696
|
$url->appendChild($lastmod); |
|
2697
|
2697
|
// Add suggested frequency for refresh |
|
2698
|
2698
|
if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
|
2699
|
|
- $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
|
2699
|
+ $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2700
|
2700
|
$url->appendChild($changefreq); |
|
2701
|
2701
|
} |
|
2702
|
2702
|
// Add higher priority for home page |
|
@@ -2801,7 +2801,7 @@ discard block |
|
|
block discarded – undo |
|
2801
|
2801
|
$url->appendChild($lastmod); |
|
2802
|
2802
|
// Add suggested frequency for refresh |
|
2803
|
2803
|
if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) { |
|
2804
|
|
- $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
|
2804
|
+ $changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values |
|
2805
|
2805
|
$url->appendChild($changefreq); |
|
2806
|
2806
|
} |
|
2807
|
2807
|
|
|
@@ -3092,11 +3092,11 @@ discard block |
|
|
block discarded – undo |
|
3092
|
3092
|
|
|
3093
|
3093
|
// // Export web site |
|
3094
|
3094
|
$extraCssClass = getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE') ? 'hideobject' : ''; |
|
3095
|
|
- print '<input type="submit" class="button bordertransp ' . $extraCssClass . '" ' . $disabledexport . ' value="' . dol_escape_htmltag($exportlabel) . '" name="exportsite">'; |
|
|
3095
|
+ print '<input type="submit" class="button bordertransp '.$extraCssClass.'" '.$disabledexport.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">'; |
|
3096
|
3096
|
|
|
3097
|
3097
|
if (getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')) { |
|
3098
|
3098
|
// Overwrite template in sources |
|
3099
|
|
- $overwriteGitUrl = $_SERVER["PHP_SELF"] . '?action=overwritesite&website=' . urlencode($website->ref); |
|
|
3099
|
+ $overwriteGitUrl = $_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref); |
|
3100
|
3100
|
print dolButtonToOpenExportDialog('exportpopup', $langs->trans('ExportOptions'), $langs->trans('ExportSite'), 'exportsite', $overwriteGitUrl, $website); |
|
3101
|
3101
|
//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>'; |
|
3102
|
3102
|
} |
|
@@ -3463,7 +3463,7 @@ discard block |
|
|
block discarded – undo |
|
3463
|
3463
|
print '<!-- button EditInLine and ShowSubcontainers -->'."\n"; |
|
3464
|
3464
|
print '<div class="websiteselectionsection inline-block">'; |
|
3465
|
3465
|
|
|
3466
|
|
- print '<div class="inline-block marginrightonly">'; // Button includes dynamic content |
|
|
3466
|
+ print '<div class="inline-block marginrightonly">'; // Button includes dynamic content |
|
3467
|
3467
|
print $langs->trans("ShowSubcontainers"); |
|
3468
|
3468
|
if (!getDolGlobalString('WEBSITE_SUBCONTAINERSINLINE')) { |
|
3469
|
3469
|
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', '', 0, 0, 0, '', 'nomarginleft').'</a>'; |
|
@@ -3472,7 +3472,7 @@ discard block |
|
|
block discarded – undo |
|
3472
|
3472
|
} |
|
3473
|
3473
|
print '</div>'; |
|
3474
|
3474
|
|
|
3475
|
|
- print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
|
3475
|
+ print '<div class="inline-block marginrightonly">'; // Button edit inline |
|
3476
|
3476
|
|
|
3477
|
3477
|
print '<span id="switchckeditorinline">'."\n"; |
|
3478
|
3478
|
// Enable CKEditor inline with js on section and div with conteneditable=true |
|
@@ -3564,15 +3564,15 @@ discard block |
|
|
block discarded – undo |
|
3564
|
3564
|
// Sending data via AJAX |
|
3565
|
3565
|
$.ajax({ |
|
3566
|
3566
|
type: \'POST\', |
|
3567
|
|
- url: \'' . DOL_URL_ROOT . '/core/ajax/editinline.php\', |
|
|
3567
|
+ url: \'' . DOL_URL_ROOT.'/core/ajax/editinline.php\', |
|
3568
|
3568
|
data: { |
|
3569
|
3569
|
website_ref: \''.$website->ref.'\', |
|
3570
|
|
- page_id: \'' . $websitepage->id . '\', |
|
|
3570
|
+ page_id: \'' . $websitepage->id.'\', |
|
3571
|
3571
|
content: content, |
|
3572
|
3572
|
element_id: elementId, |
|
3573
|
3573
|
element_type: elementType, |
|
3574
|
3574
|
action: \'updatedElementContent\', |
|
3575
|
|
- token: \'' . newToken() . '\' |
|
|
3575
|
+ token: \'' . newToken().'\' |
|
3576
|
3576
|
}, |
|
3577
|
3577
|
success: function(response) { |
|
3578
|
3578
|
console.log(response); |
|
@@ -3658,7 +3658,7 @@ discard block |
|
|
block discarded – undo |
|
3658
|
3658
|
} else { |
|
3659
|
3659
|
$disabled = ''; |
|
3660
|
3660
|
$title = ''; |
|
3661
|
|
- $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
|
3661
|
+ $url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website |
|
3662
|
3662
|
} |
|
3663
|
3663
|
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>'; |
|
3664
|
3664
|
print '</span>'; |
|
@@ -3848,7 +3848,7 @@ discard block |
|
|
block discarded – undo |
|
3848
|
3848
|
// Clean the php htmlheader file to remove php code and get only html part |
|
3849
|
3849
|
$htmlheadercontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htmlheadercontent); |
|
3850
|
3850
|
} else { |
|
3851
|
|
- $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>' |
|
|
3851
|
+ $htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>' |
|
3852
|
3852
|
} |
|
3853
|
3853
|
if (!trim($htmlheadercontent)) { |
|
3854
|
3854
|
$htmlheadercontent = "<html>\n"; |
|
@@ -3879,7 +3879,7 @@ discard block |
|
|
block discarded – undo |
|
3879
|
3879
|
// Clean the php htaccesscontent file to remove php code and get only html part |
|
3880
|
3880
|
$htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent); |
|
3881
|
3881
|
} else { |
|
3882
|
|
- $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
|
3882
|
+ $htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
3883
|
3883
|
} |
|
3884
|
3884
|
|
|
3885
|
3885
|
if (!GETPOSTISSET('WEBSITE_MANIFEST_JSON')) { |
|
@@ -3976,7 +3976,7 @@ discard block |
|
|
block discarded – undo |
|
3976
|
3976
|
$maxfilesizearray = getMaxFileSizeArray(); |
|
3977
|
3977
|
$maxmin = $maxfilesizearray['maxmin']; |
|
3978
|
3978
|
if ($maxmin > 0) { |
|
3979
|
|
- print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
|
3979
|
+ print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
3980
|
3980
|
} |
|
3981
|
3981
|
print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>'; |
|
3982
|
3982
|
|
|
@@ -4018,7 +4018,7 @@ discard block |
|
|
block discarded – undo |
|
4018
|
4018
|
print '<tr><td class="tdtop">'; |
|
4019
|
4019
|
print $langs->trans('WEBSITE_HTML_HEADER'); |
|
4020
|
4020
|
$htmlhelp = $langs->trans("Example").' :<br>'; |
|
4021
|
|
- $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. |
|
|
4021
|
+ $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. |
|
4022
|
4022
|
$textwithhelp = $form->textwithpicto('', $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); |
|
4023
|
4023
|
$htmlhelp2 = $langs->trans("LinkAndScriptsHereAreNotLoadedInEditor").'<br>'; |
|
4024
|
4024
|
print $form->textwithpicto($textwithhelp, $htmlhelp2, 1, 'warning', '', 0, 2, 'htmlheadertooltip2'); |
|
@@ -4239,7 +4239,7 @@ discard block |
|
|
block discarded – undo |
|
4239
|
4239
|
$maxfilesizearray = getMaxFileSizeArray(); |
|
4240
|
4240
|
$maxmin = $maxfilesizearray['maxmin']; |
|
4241
|
4241
|
if ($maxmin > 0) { |
|
4242
|
|
- print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
|
4242
|
+ print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
4243
|
4243
|
} |
|
4244
|
4244
|
print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">'; |
|
4245
|
4245
|
print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">'; |
|
@@ -4760,7 +4760,7 @@ discard block |
|
|
block discarded – undo |
|
4760
|
4760
|
print '<tr><td class="tdhtmlheader tdtop">'; |
|
4761
|
4761
|
$htmlhelp = $langs->trans("EditTheWebSiteForACommonHeader").'<br><br>'; |
|
4762
|
4762
|
$htmlhelp .= $langs->trans("Example").' :<br>'; |
|
4763
|
|
- $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. |
|
|
4763
|
+ $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. |
|
4764
|
4764
|
print $form->textwithpicto($langs->transnoentitiesnoconv('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); |
|
4765
|
4765
|
print '</td><td>'; |
|
4766
|
4766
|
$poscursor = array('x' => GETPOST('htmlheader_x'), 'y' => GETPOST('htmlheader_y')); |
|
@@ -4899,7 +4899,7 @@ discard block |
|
|
block discarded – undo |
|
4899
|
4899
|
|
|
4900
|
4900
|
|
|
4901
|
4901
|
$module = 'medias'; |
|
4902
|
|
- $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
|
4902
|
+ $formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php |
|
4903
|
4903
|
if (empty($url)) { |
|
4904
|
4904
|
$url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param |
|
4905
|
4905
|
} |
|
@@ -5136,8 +5136,8 @@ discard block |
|
|
block discarded – undo |
|
5136
|
5136
|
print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; |
|
5137
|
5137
|
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
|
5138
|
5138
|
print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '')."\n"; |
|
5139
|
|
- print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation |
|
5140
|
|
- print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
|
5139
|
+ print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation |
|
|
5140
|
+ print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif |
|
5141
|
5141
|
print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']); |
|
5142
|
5142
|
// Action column |
|
5143
|
5143
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |