diff --git a/htdocs/conf/conf.class.php3.sample b/htdocs/conf/conf.class.php3.sample index 3a6c1675ef6..ee03ea578c4 100644 --- a/htdocs/conf/conf.class.php3.sample +++ b/htdocs/conf/conf.class.php3.sample @@ -28,6 +28,8 @@ class Conf { $this->theme = "dolibarr"; + $this->css = "theme/".$this->theme."/".$this->theme.".css"; + $this->liste_limit = 10; $this->db = new DbConf(); @@ -52,7 +54,6 @@ class Conf { $this->password_encrypted = 1; - $this->css = "theme/".$this->theme."/".$this->theme.".css"; } } diff --git a/htdocs/main.inc.php3 b/htdocs/main.inc.php3 index d86fdd97883..5a4857b7e63 100644 --- a/htdocs/main.inc.php3 +++ b/htdocs/main.inc.php3 @@ -42,7 +42,7 @@ if ($user->limite_liste <> $conf->liste_limit) { $conf->liste_limit = $user->limite_liste; } /* - * + * Definition de toutes les Constantes globales d'envirronement * */ $sql = "SELECT name, value FROM llx_const"; @@ -65,6 +65,22 @@ if ($result) * */ $db->close(); + +// Modification de quelques variable de conf en fonction des Constantes +/* + * SIZE_LISTE_LIMIT : constante de taille maximale des listes + */ +if (defined("SIZE_LISTE_LIMIT")) +{ + $conf->liste_limit=SIZE_LISTE_LIMIT; +} + +if (defined("MAIN_THEME")) +{ + $conf->theme=MAIN_THEME; + $conf->css = "theme/".$conf->theme."/".$conf->theme.".css"; +} + /* */ if(!isset($application_lang)) @@ -91,19 +107,22 @@ function top_menu($head) print $rtplang->lang_header(); - print "
"; + // print ""; print $head; - print ''; + // print ''; print ''; print "\n"; - print '