mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-27 03:41:31 +01:00
Fix: bad loading of styles.css.php
This commit is contained in:
@@ -954,6 +954,10 @@ function dol_set_user_param($db, $conf, &$user, $tab)
|
||||
$user->conf->$key = $value;
|
||||
//print "key=".$key." user->conf->key=".$user->conf->$key;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($user->conf->$key);
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
|
||||
@@ -29,7 +29,7 @@ if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
|
||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
|
||||
//if (! defined('NOLOGIN')) define('NOLOGIN',1); // Not disabled because need to load user to know its personal theme choices
|
||||
if (! defined('NOLOGIN')) define('NOLOGIN',1); // File must be accessed by logon page so without login
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
@@ -38,6 +38,10 @@ session_cache_limiter(FALSE);
|
||||
|
||||
require_once("../../main.inc.php");
|
||||
|
||||
// Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined)
|
||||
if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSION['dol_login']);
|
||||
|
||||
|
||||
// Define css type
|
||||
header('Content-type: text/css');
|
||||
// Important: Following code is to avoid page request by browser and PHP CPU at
|
||||
|
||||
Reference in New Issue
Block a user