Fix: bad loading of styles.css.php

This commit is contained in:
Laurent Destailleur
2012-01-15 23:48:25 +01:00
parent 9e06a742f0
commit 55ee0b08d8
2 changed files with 9 additions and 1 deletions

View File

@@ -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();

View File

@@ -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