PageRenderTime 54ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/core/class/conf.class.php

https://github.com/asterix14/dolibarr
PHP | 428 lines | 268 code | 56 blank | 104 comment | 69 complexity | 53fd582275e818f382b9c67a7789c25d MD5 | raw file
Possible License(s): LGPL-2.0
  1. <?php
  2. /* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com>
  4. * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  5. * Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
  6. * Copyright (C) 2006 Jean Heimburger <jean@tiaris.info>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. /**
  22. * \file htdocs/core/class/conf.class.php
  23. * \ingroup core
  24. * \brief File of class to manage storage of current setup
  25. * Config is stored into file conf.php
  26. */
  27. /**
  28. * \class Conf
  29. * \brief Class to stock current configuration
  30. */
  31. class Conf
  32. {
  33. /** \public */
  34. //! Object with database handler
  35. var $db;
  36. //! To store properties found in conf file
  37. var $file;
  38. //! To store properties found into database
  39. var $global;
  40. //! To store if javascript/ajax is enabked
  41. var $use_javascript_ajax;
  42. //! Used to store current currency
  43. var $monnaie;
  44. //! Used to store current css (from theme)
  45. var $theme; // Contains current theme ("eldy", "auguria", ...)
  46. var $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...)
  47. //! Used to store current menu handlers
  48. var $top_menu;
  49. var $smart_menu;
  50. //! To store properties of multi-company
  51. var $multicompany;
  52. //! Used to store instance for multi-company (default 1)
  53. var $entity=1;
  54. var $css_modules = array();
  55. var $tabs_modules = array();
  56. var $triggers_modules = array();
  57. var $hooks_modules = array();
  58. public $login_method_modules = array();
  59. var $modules = array();
  60. var $entities = array();
  61. var $logbuffer = array();
  62. var $filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"');
  63. /**
  64. * Constructor
  65. *
  66. * @return Conf
  67. */
  68. function Conf()
  69. {
  70. // Avoid warnings when filling this->xxx
  71. $this->file=(object) array();
  72. $this->db=(object) array();
  73. $this->global=(object) array();
  74. $this->mycompany=(object) array();
  75. $this->admin=(object) array();
  76. $this->user=(object) array();
  77. //! Charset for HTML output and for storing data in memory
  78. $this->file->character_set_client='UTF-8'; // UTF-8, ISO-8859-1
  79. }
  80. /**
  81. * Load setup values into conf object (read llx_const)
  82. *
  83. * @param DoliDB $db Handler d'acces base
  84. * @return int < 0 if KO, >= 0 if OK
  85. */
  86. function setValues($db)
  87. {
  88. dol_syslog("Conf::setValues");
  89. // Directory of core triggers
  90. $this->triggers_modules[] = "/core/triggers"; // Default relative path to triggers file
  91. // Avoid warning if not defined
  92. if (empty($this->db->dolibarr_main_db_encryption)) $this->db->dolibarr_main_db_encryption=0;
  93. if (empty($this->db->dolibarr_main_db_cryptkey)) $this->db->dolibarr_main_db_cryptkey='';
  94. /*
  95. * Definition de toutes les constantes globales d'environnement
  96. * - En constante php (TODO a virer)
  97. * - En $this->global->key=value
  98. */
  99. $sql = "SELECT ".$db->decrypt('name')." as name,";
  100. $sql.= " ".$db->decrypt('value')." as value, entity";
  101. $sql.= " FROM ".MAIN_DB_PREFIX."const";
  102. if (! empty($this->multicompany->transverse_mode))
  103. {
  104. $sql.= " WHERE entity IN (0,1,".$this->entity.")";
  105. }
  106. else
  107. {
  108. $sql.= " WHERE entity IN (0,".$this->entity.")";
  109. }
  110. $sql.= " ORDER BY entity"; // This is to have entity 0 first, then entity 1 that overwrite.
  111. $result = $db->query($sql);
  112. if ($result)
  113. {
  114. $numr = $db->num_rows($result);
  115. $multicompany_sharing=array();
  116. $i = 0;
  117. while ($i < $numr)
  118. {
  119. $objp = $db->fetch_object($result);
  120. $key=$objp->name;
  121. $value=$objp->value;
  122. if ($key)
  123. {
  124. if (! defined("$key")) define ("$key", $value); // In some cases, the constant might be already forced (Example: SYSLOG_FILE_ON and SYSLOG_FILE during install)
  125. $this->global->$key=$value;
  126. if ($value && preg_match('/^MAIN_MODULE_/',$key))
  127. {
  128. // If this is constant for a css file activated by a module
  129. if (preg_match('/^MAIN_MODULE_([A-Z_]+)_CSS$/i',$key))
  130. {
  131. $this->css_modules[]=$value;
  132. }
  133. // If this is constant for a new tab page activated by a module
  134. elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_TABS_/i',$key))
  135. {
  136. $params=explode(':',$value,2);
  137. $this->tabs_modules[$params[0]][]=$value;
  138. //print 'xxx'.$params[0].'-'.$value;
  139. }
  140. // If this is constant for triggers activated by a module
  141. elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_TRIGGERS$/i',$key,$reg))
  142. {
  143. $modulename = strtolower($reg[1]);
  144. $this->triggers_modules[] = '/'.$modulename.'/core/triggers/';
  145. }
  146. // If this is constant for login method activated by a module
  147. elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_LOGIN_METHOD$/i',$key,$reg))
  148. {
  149. $modulename = strtolower($reg[1]);
  150. $this->login_method_modules[] = dol_buildpath('/'.$modulename.'/core/login/');
  151. }
  152. // If this is constant for hook activated by a module. Value is list of hooked tabs separated with :
  153. elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg))
  154. {
  155. $modulename = strtolower($reg[1]);
  156. $params=explode(':',$value);
  157. foreach($params as $value)
  158. {
  159. $this->hooks_modules[$modulename][]=$value;
  160. }
  161. }
  162. // If this is constant for a sms engine
  163. elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_SMS$/i',$key,$reg))
  164. {
  165. $module=strtolower($reg[1]);
  166. // Add this module in list of modules that provide SMS
  167. $this->sms_engine[$module]=$module;
  168. }
  169. // If this is a module constant
  170. elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg))
  171. {
  172. $module=strtolower($reg[1]);
  173. //print "Module ".$module." is enabled<br>\n";
  174. $this->$module=(object) array();
  175. $this->$module->enabled=true;
  176. // Add this module in list of enabled modules
  177. $this->modules[]=$module;
  178. }
  179. }
  180. // Sharings between entities
  181. else if ($value && preg_match('/^MULTICOMPANY_([A-Z_]+)_SHARING$/',$key,$reg))
  182. {
  183. $module=strtolower($reg[1]);
  184. $multicompany_sharing[$module]=$value;
  185. }
  186. }
  187. $i++;
  188. }
  189. // Sharings between entities
  190. if (isset($this->multicompany->enabled) && $this->multicompany->enabled && ! empty($multicompany_sharing))
  191. {
  192. $ret = @dol_include_once('/multicompany/class/actions_multicompany.class.php');
  193. if ($ret)
  194. {
  195. $mc = new ActionsMulticompany($db);
  196. foreach($multicompany_sharing as $key => $value)
  197. {
  198. $this->entities[$key]=$mc->check_entity($value);
  199. }
  200. }
  201. }
  202. }
  203. $db->free($result);
  204. //var_dump($this->modules);
  205. // Clean some variables
  206. if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php";
  207. if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_frontoffice.php";
  208. if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="eldy_backoffice.php"; // Use eldy by default because smartphone does not work on all phones
  209. if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="eldy_frontoffice.php"; // Ue eldy by default because smartphone does not work on all phones
  210. // Variable globales LDAP
  211. if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME='';
  212. if (! isset($this->global->LDAP_KEY_USERS)) $this->global->LDAP_KEY_USERS=$this->global->LDAP_FIELD_FULLNAME;
  213. if (! isset($this->global->LDAP_KEY_GROUPS)) $this->global->LDAP_KEY_GROUPS=$this->global->LDAP_FIELD_FULLNAME;
  214. if (! isset($this->global->LDAP_KEY_CONTACTS)) $this->global->LDAP_KEY_CONTACTS=$this->global->LDAP_FIELD_FULLNAME;
  215. if (! isset($this->global->LDAP_KEY_MEMBERS)) $this->global->LDAP_KEY_MEMBERS=$this->global->LDAP_FIELD_FULLNAME;
  216. // Load translation object with current language
  217. if (empty($this->global->MAIN_LANG_DEFAULT)) $this->global->MAIN_LANG_DEFAULT="en_US";
  218. // By default, we repeat info on all tabs
  219. if (! isset($this->global->MAIN_REPEATCONTACTONEACHTAB)) $this->global->MAIN_REPEATCONTACTONEACHTAB=1;
  220. $rootfordata = DOL_DATA_ROOT;
  221. $rootforuser = DOL_DATA_ROOT;
  222. // If multicompany module is enabled, we redefine the root of data
  223. if (! empty($this->global->MAIN_MODULE_MULTICOMPANY) && ! empty($this->entity) && $this->entity > 1) $rootfordata.='/'.$this->entity;
  224. // For backward compatibility
  225. // TODO Replace this->xxx->enabled by this->modulename->enabled to remove this code
  226. if (isset($this->propale->enabled)) $this->propal->enabled=$this->propale->enabled;
  227. // Define default dir_output and dir_temp for directories of modules
  228. foreach($this->modules as $module)
  229. {
  230. $this->$module->dir_output=$rootfordata."/".$module;
  231. $this->$module->dir_temp=$rootfordata."/".$module."/temp";
  232. }
  233. // For mycompany setup
  234. $this->mycompany->dir_output=$rootfordata."/mycompany";
  235. $this->mycompany->dir_temp=$rootfordata."/mycompany/temp";
  236. // For admin features
  237. $this->admin->dir_output=$rootfordata.'/admin';
  238. $this->admin->dir_temp=$rootfordata.'/admin/temp';
  239. // Module user
  240. $this->user->dir_output=$rootforuser."/users";
  241. $this->user->dir_temp=$rootforuser."/users/temp";
  242. // Exception: Some dir are not the name of module. So we keep exception here
  243. // for backward compatibility.
  244. // Sous module bons d'expedition
  245. $this->expedition_bon->enabled=defined("MAIN_SUBMODULE_EXPEDITION")?MAIN_SUBMODULE_EXPEDITION:0;
  246. // Sous module bons de livraison
  247. $this->livraison_bon->enabled=defined("MAIN_SUBMODULE_LIVRAISON")?MAIN_SUBMODULE_LIVRAISON:0;
  248. // Module fournisseur
  249. $this->fournisseur->commande->dir_output=$rootfordata."/fournisseur/commande";
  250. $this->fournisseur->commande->dir_temp =$rootfordata."/fournisseur/commande/temp";
  251. $this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture";
  252. $this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp";
  253. // Module product/service
  254. $this->product->dir_output=$rootfordata."/produit";
  255. $this->product->dir_temp =$rootfordata."/produit/temp";
  256. $this->service->dir_output=$rootfordata."/produit";
  257. $this->service->dir_temp =$rootfordata."/produit/temp";
  258. // Module contrat
  259. $this->contrat->dir_output=$rootfordata."/contracts";
  260. $this->contrat->dir_temp=$rootfordata."/contracts/temp";
  261. /*
  262. * Set some default values
  263. */
  264. // societe
  265. if (empty($this->global->SOCIETE_CODECLIENT_ADDON)) $this->global->SOCIETE_CODECLIENT_ADDON="mod_codeclient_leopard";
  266. if (empty($this->global->SOCIETE_CODEFOURNISSEUR_ADDON)) $this->global->SOCIETE_CODEFOURNISSEUR_ADDON=$this->global->SOCIETE_CODECLIENT_ADDON;
  267. if (empty($this->global->SOCIETE_CODECOMPTA_ADDON)) $this->global->SOCIETE_CODECOMPTA_ADDON="mod_codecompta_panicum";
  268. if (empty($this->global->COMPANY_AQUARIUM_MASK_SUPPLIER)) $this->global->COMPANY_AQUARIUM_MASK_SUPPLIER='401';
  269. if (empty($this->global->COMPANY_AQUARIUM_MASK_CUSTOMER)) $this->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411';
  270. // Security
  271. if (empty($this->global->USER_PASSWORD_GENERATED)) $this->global->USER_PASSWORD_GENERATED='standard'; // Default password generator
  272. if (empty($this->global->MAIN_UMASK)) $this->global->MAIN_UMASK='0664'; // Default mask
  273. // conf->box_max_lines
  274. $this->box_max_lines=5;
  275. if (isset($this->global->MAIN_BOXES_MAXLINES)) $this->box_max_lines=$this->global->MAIN_BOXES_MAXLINES;
  276. // conf->use_preview_tabs
  277. $this->use_preview_tabs=0;
  278. if (isset($this->global->MAIN_USE_PREVIEW_TABS)) $this->use_preview_tabs=$this->global->MAIN_USE_PREVIEW_TABS;
  279. // conf->use_javascript_ajax
  280. $this->use_javascript_ajax=1;
  281. if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript_ajax=! $this->global->MAIN_DISABLE_JAVASCRIPT;
  282. // If no javascript_ajax, Ajax features are disabled.
  283. if (! $this->use_javascript_ajax)
  284. {
  285. $this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
  286. }
  287. // conf->monnaie
  288. if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE='EUR';
  289. $this->monnaie=$this->global->MAIN_MONNAIE; // TODO deprecated
  290. $this->currency=$this->global->MAIN_MONNAIE;
  291. // $this->global->COMPTA_MODE = Option des modules Comptabilites (simple ou expert). Defini le mode de calcul des etats comptables (CA,...)
  292. if (empty($this->global->COMPTA_MODE)) $this->global->COMPTA_MODE='RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES'
  293. // $this->liste_limit = constante de taille maximale des listes
  294. if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25;
  295. $this->liste_limit=$this->global->MAIN_SIZE_LISTE_LIMIT;
  296. // $this->product->limit_size = constante de taille maximale des select de produit
  297. if (! isset($this->global->PRODUIT_LIMIT_SIZE)) $this->global->PRODUIT_LIMIT_SIZE=100;
  298. $this->product->limit_size=$this->global->PRODUIT_LIMIT_SIZE;
  299. // $this->theme et $this->css
  300. if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME="eldy";
  301. $this->theme=$this->global->MAIN_THEME;
  302. $this->css = "/theme/".$this->theme."/style.css.php";
  303. // $this->email_from = email pour envoi par dolibarr des mails automatiques
  304. $this->email_from = "dolibarr-robot@domain.com";
  305. if (! empty($this->global->MAIN_MAIL_EMAIL_FROM)) $this->email_from = $this->global->MAIN_MAIL_EMAIL_FROM;
  306. // $this->notification->email_from = email pour envoi par Dolibarr des notifications
  307. $this->notification->email_from=$this->email_from;
  308. if (! empty($this->global->NOTIFICATION_EMAIL_FROM)) $this->notification->email_from=$this->global->NOTIFICATION_EMAIL_FROM;
  309. // $this->mailing->email_from = email pour envoi par Dolibarr des mailings
  310. $this->mailing->email_from=$this->email_from;
  311. if (! empty($this->global->MAILING_EMAIL_FROM)) $this->mailing->email_from=$this->global->MAILING_EMAIL_FROM;
  312. // Defini MAIN_GRAPH_LIBRARY
  313. if (empty($this->global->MAIN_GRAPH_LIBRARY)) $this->global->MAIN_GRAPH_LIBRARY = 'artichow';
  314. if (! isset($this->global->FCKEDITOR_EDITORNAME)) $this->global->FCKEDITOR_EDITORNAME='ckeditor'; // fckeditor to switch
  315. // Format for date (used by default when not found or searched in lang)
  316. $this->format_date_short="%d/%m/%Y"; // Format of day with PHP/C tags (strftime functions)
  317. $this->format_date_short_java="dd/MM/yyyy"; // Format of day with Java tags
  318. $this->format_hour_short="%H:%M";
  319. $this->format_hour_short_duration="%H:%M";
  320. $this->format_date_text_short="%d %b %Y";
  321. $this->format_date_text="%d %B %Y";
  322. $this->format_date_hour_short="%d/%m/%Y %H:%M";
  323. $this->format_date_hour_text_short="%d %b %Y %H:%M";
  324. $this->format_date_hour_text="%d %B %Y %H:%M";
  325. // Limites decimales si non definie (peuvent etre egale a 0)
  326. if (! isset($this->global->MAIN_MAX_DECIMALS_UNIT)) $this->global->MAIN_MAX_DECIMALS_UNIT=5;
  327. if (! isset($this->global->MAIN_MAX_DECIMALS_TOT)) $this->global->MAIN_MAX_DECIMALS_TOT=2;
  328. if (! isset($this->global->MAIN_MAX_DECIMALS_SHOWN)) $this->global->MAIN_MAX_DECIMALS_SHOWN=8;
  329. // Timeouts
  330. if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10;
  331. if (empty($this->global->MAIN_USE_RESPONSE_TIMEOUT)) $this->global->MAIN_USE_RESPONSE_TIMEOUT=30;
  332. // Set default variable to calculate VAT as if option tax_mode was 0 (standard)
  333. if (empty($this->global->TAX_MODE_SELL_PRODUCT)) $this->global->TAX_MODE_SELL_PRODUCT='invoice';
  334. if (empty($this->global->TAX_MODE_BUY_PRODUCT)) $this->global->TAX_MODE_BUY_PRODUCT='invoice';
  335. if (empty($this->global->TAX_MODE_SELL_SERVICE)) $this->global->TAX_MODE_SELL_SERVICE='payment';
  336. if (empty($this->global->TAX_MODE_BUY_SERVICE)) $this->global->TAX_MODE_BUY_SERVICE='payment';
  337. // Delay before warnings
  338. $this->actions->warning_delay=(isset($this->global->MAIN_DELAY_ACTIONS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60;
  339. $this->commande->client->warning_delay=(isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_ORDERS_TO_PROCESS:2)*24*60*60;
  340. $this->commande->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS:7)*24*60*60;
  341. $this->propal->cloture->warning_delay=(isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE)?$this->global->MAIN_DELAY_PROPALS_TO_CLOSE:0)*24*60*60;
  342. $this->propal->facturation->warning_delay=(isset($this->global->MAIN_DELAY_PROPALS_TO_BILL)?$this->global->MAIN_DELAY_PROPALS_TO_BILL:0)*24*60*60;
  343. $this->facture->client->warning_delay=(isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED)?$this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED:0)*24*60*60;
  344. $this->facture->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY)?$this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY:0)*24*60*60;
  345. $this->contrat->services->inactifs->warning_delay=(isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES)?$this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES:0)*24*60*60;
  346. $this->contrat->services->expires->warning_delay=(isset($this->global->MAIN_DELAY_RUNNING_SERVICES)?$this->global->MAIN_DELAY_RUNNING_SERVICES:0)*24*60*60;
  347. $this->adherent->cotisation->warning_delay=(isset($this->global->MAIN_DELAY_MEMBERS)?$this->global->MAIN_DELAY_MEMBERS:0)*24*60*60;
  348. $this->bank->rappro->warning_delay=(isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE)?$this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE:0)*24*60*60;
  349. $this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60;
  350. // For backward compatibility
  351. $this->produit=$this->product;
  352. // Define menu manager in setup
  353. if (empty($user->societe_id)) // If internal user or not defined
  354. {
  355. $this->top_menu=(empty($this->global->MAIN_MENU_STANDARD_FORCED)?$this->global->MAIN_MENU_STANDARD:$this->global->MAIN_MENU_STANDARD_FORCED);
  356. $this->smart_menu=(empty($this->global->MAIN_MENU_SMARTPHONE_FORCED)?$this->global->MAIN_MENU_SMARTPHONE:$this->global->MAIN_MENU_SMARTPHONE_FORCED);
  357. }
  358. else // If external user
  359. {
  360. $this->top_menu=(empty($this->global->MAIN_MENUFRONT_STANDARD_FORCED)?$this->global->MAIN_MENUFRONT_STANDARD:$this->global->MAIN_MENUFRONT_STANDARD_FORCED);
  361. $this->smart_menu=(empty($this->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$this->global->MAIN_MENUFRONT_SMARTPHONE:$this->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
  362. }
  363. // For backward compatibility
  364. if ($this->top_menu == 'eldy.php') $this->top_menu='eldy_backoffice.php';
  365. elseif ($this->top_menu == 'rodolphe.php') $this->top_menu='eldy_backoffice.php';
  366. }
  367. }
  368. ?>