Skip to content
Snippets Groups Projects
Commit c71488e5 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Removed deprecated code

parent ae6c58fb
No related branches found
No related tags found
No related merge requests found
...@@ -156,7 +156,6 @@ function dol_loginfunction($langs,$conf,$mysoc) ...@@ -156,7 +156,6 @@ function dol_loginfunction($langs,$conf,$mysoc)
// Note: $conf->css looks like '/theme/eldy/style.css.php' // Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php"; $conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
$themepath=dol_buildpath($conf->css,1); $themepath=dol_buildpath($conf->css,1);
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{ {
......
...@@ -326,7 +326,6 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) ...@@ -326,7 +326,6 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
$formother = new FormOther($db); $formother = new FormOther($db);
//$dirthemes=array(empty($conf->global->MAIN_FORCETHEMEDIR)?'/theme':$conf->global->MAIN_FORCETHEMEDIR.'/theme');
$dirthemes=array('/theme'); $dirthemes=array('/theme');
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{ {
......
...@@ -1005,8 +1005,10 @@ function top_httphead($contenttype='text/html') ...@@ -1005,8 +1005,10 @@ function top_httphead($contenttype='text/html')
if ($contenttype == 'text/html' ) header("Content-Type: text/html; charset=".$conf->file->character_set_client); if ($contenttype == 'text/html' ) header("Content-Type: text/html; charset=".$conf->file->character_set_client);
else header("Content-Type: ".$contenttype); else header("Content-Type: ".$contenttype);
header("X-Content-Type-Options: nosniff"); // Security options
header("X-Frame-Options: SAMEORIGIN"); header("X-Content-Type-Options: nosniff"); // With the nosniff option, if the server says the content is text/html, the browser will render it as text/html (note that most browsers now force this option to on)
header("X-Frame-Options: SAMEORIGIN"); // Frames allowed only if on same domain (stop some XSS attacks)
// TODO Content-Security-Policy
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1. // On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
/*if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { /*if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) {
...@@ -1121,7 +1123,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs ...@@ -1121,7 +1123,6 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
print '<!-- Includes CSS for Dolibarr theme -->'."\n"; print '<!-- Includes CSS for Dolibarr theme -->'."\n";
// Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php'
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
$themepath=dol_buildpath($conf->css,1); $themepath=dol_buildpath($conf->css,1);
$themesubdir=''; $themesubdir='';
if (! empty($conf->modules_parts['theme'])) // This slow down if (! empty($conf->modules_parts['theme'])) // This slow down
......
...@@ -173,7 +173,6 @@ else ...@@ -173,7 +173,6 @@ else
// Note: $conf->css looks like '/theme/eldy/style.css.php' // Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php"; $conf->css = "/theme/".(GETPOST('theme','alpha')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
//$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
$themepath=dol_buildpath($conf->css,1); $themepath=dol_buildpath($conf->css,1);
if (! empty($conf->modules_parts['theme'])) // This slow down if (! empty($conf->modules_parts['theme'])) // This slow down
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment