From 6e43cda408155889881e77d4baf4313fd2dd1add Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Tue, 20 Oct 2009 17:34:17 +0000 Subject: [PATCH] Remove deprecated code. Now usage of smarty is simpler (no need to declare things in config file) --- htdocs/admin/system/index.php | 12 ++---------- htdocs/conf/conf.php.example | 12 ------------ htdocs/includes/menus/barre_left/eldy_backoffice.php | 10 +++++----- htdocs/includes/modules/modDroitPret.class.php | 4 +--- htdocs/includes/modules/modEditeur.class.php | 4 +--- htdocs/install/etape1.php | 12 ------------ htdocs/main.inc.php | 5 +---- 7 files changed, 10 insertions(+), 49 deletions(-) diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php index 2aa5be39e10..2fc0f60d7f8 100644 --- a/htdocs/admin/system/index.php +++ b/htdocs/admin/system/index.php @@ -114,11 +114,7 @@ $configfileparameters=array( 'dolibarr_main_auth_ldap_dn', 'dolibarr_main_auth_ldap_admin_login', 'dolibarr_main_auth_ldap_admin_pass', - 'dolibarr_main_auth_ldap_debug', - 'separator', - 'dolibarr_smarty_libs_dir', - 'dolibarr_smarty_compile', - 'dolibarr_smarty_cache' + 'dolibarr_main_auth_ldap_debug' ); $configfilelib=array( // 'separator', @@ -144,11 +140,7 @@ $configfilelib=array( 'dolibarr_main_auth_ldap_dn', 'dolibarr_main_auth_ldap_admin_login', 'dolibarr_main_auth_ldap_admin_pass', - 'dolibarr_main_auth_ldap_debug', - 'separator', - $langs->trans("SmartyLibs"), - $langs->trans("SmartyCompile"), - $langs->trans("SmartyCache") + 'dolibarr_main_auth_ldap_debug' ); $var=true; print '<table class="noborder" width="100%">'; diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index ee75e8c84c5..fbd8fbfcb69 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -165,18 +165,6 @@ $dolibarr_main_force_https="0"; # $dolibarr_main_auth_ldap_debug="false"; -# Parameters not used yet -# dolibarr_smarty_libs_dir,dolibarr_smarty_compile,dolibarr_smarty_cache -# Examples: -# $dolibarr_smarty_libs_dir="/var/www/dolibarr/htdocs/includes/smarty/libs/"; -# $dolibarr_smarty_compile="/var/www/dolibarr/documents/temp/smarty_templates"; -# $dolibarr_smarty_cache="/var/www/dolibarr/documents/temp/smarty_cache"; -# -$dolibarr_smarty_libs_dir=""; -$dolibarr_smarty_compile=""; -$dolibarr_smarty_cache=""; - - # Login and pass to use in a demo mode # Default value: 0 # Possible values: 0 or 1 diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 891ba98c787..9053d589759 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -385,7 +385,7 @@ class MenuLeft { $langs->load("suppliers"); $newmenu->add(DOL_URL_ROOT."/compta/index.php?leftmenu=suppliers", $langs->trans("Suppliers"),0,$user->rights->societe->lire && $user->rights->fournisseur->lire); - // S�curit� acc�s client + // Security check if ($user->societe_id == 0) { $newmenu->add(DOL_URL_ROOT."/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"),1,$user->rights->societe->creer && $user->rights->fournisseur->lire); @@ -471,7 +471,7 @@ class MenuLeft { if ($leftmenu=="donations") $newmenu->add(DOL_URL_ROOT."/compta/dons/stats.php",$langs->trans("Statistics"), 1, $user->rights->don->lire); } - // D�placements + // Deplacements if ($conf->deplacement->enabled) { $langs->load("trips"); @@ -518,7 +518,7 @@ class MenuLeft { } - // Pr�l�vements + // Prelevements if ($conf->prelevement->enabled) { $langs->load("withdrawals"); @@ -559,7 +559,7 @@ class MenuLeft { // Rapports if ($conf->compta->enabled || $conf->accounting->enabled) { - // Bilan, r�sultats + // Bilan, resultats $newmenu->add(DOL_URL_ROOT."/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy",$langs->trans("Reportings"),0,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire); if ($leftmenu=="ca") $newmenu->add(DOL_URL_ROOT."/compta/resultat/index.php?leftmenu=ca",$langs->trans("ReportInOut"),1,$user->rights->compta->resultat->lire||$user->rights->accounting->comptarapport->lire); @@ -675,7 +675,7 @@ class MenuLeft { { $newmenu->add(DOL_URL_ROOT."/fourn/index.php?leftmenu=suppliers", $langs->trans("Suppliers"), 0, $user->rights->societe->lire && $user->rights->fournisseur->lire); - // S�curit� acc�s client + // Security check if ($user->societe_id == 0) { $newmenu->add(DOL_URL_ROOT."/soc.php?leftmenu=suppliers&action=create&type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire); diff --git a/htdocs/includes/modules/modDroitPret.class.php b/htdocs/includes/modules/modDroitPret.class.php index ad049d31987..eceac519ab6 100644 --- a/htdocs/includes/modules/modDroitPret.class.php +++ b/htdocs/includes/modules/modDroitPret.class.php @@ -58,9 +58,7 @@ class modDroitPret extends DolibarrModules $this->special = 3; // Dir - global $dolibarr_smarty_compile; - global $dolibarr_smarty_cache; - $this->dirs = array($dolibarr_smarty_compile,$dolibarr_smarty_cache); + $this->dirs = array('/smarty/cache','/smarty/template'); // Dependances $this->depends = array(); diff --git a/htdocs/includes/modules/modEditeur.class.php b/htdocs/includes/modules/modEditeur.class.php index c39d5e5582e..4cfd7d0f131 100644 --- a/htdocs/includes/modules/modEditeur.class.php +++ b/htdocs/includes/modules/modEditeur.class.php @@ -60,9 +60,7 @@ class modEditeur extends DolibarrModules $this->picto='book'; // Data directories to create when module is enabled - global $dolibarr_smarty_compile; - global $dolibarr_smarty_cache; - $this->dirs = array($dolibarr_smarty_compile,$dolibarr_smarty_cache); + $this->dirs = array('/smarty/cache','/smarty/template'); // Config pages $this->config_page_url = array("editeur.php"); diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 2c2d051ccf8..dd5ad448cd0 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -475,7 +475,6 @@ function write_conf_file($conffile) global $dolibarr_main_url_root,$dolibarr_main_document_root,$dolibarr_main_data_root,$dolibarr_main_db_host; global $dolibarr_main_db_port,$dolibarr_main_db_name,$dolibarr_main_db_user,$dolibarr_main_db_pass; global $dolibarr_main_db_type,$dolibarr_main_db_character_set,$dolibarr_main_db_collation,$dolibarr_main_authentication; - global $dolibarr_smarty_libs_dir,$dolibarr_smarty_compile,$dolibarr_smarty_cache; $error=0; @@ -538,17 +537,6 @@ function write_conf_file($conffile) } fputs($fp,"\n"); - /* Preparation integration SMARTY */ - fputs($fp, '$dolibarr_smarty_libs_dir="";'); - fputs($fp,"\n"); - - fputs($fp, '$dolibarr_smarty_compile="";'); - fputs($fp,"\n"); - - fputs($fp, '$dolibarr_smarty_cache="";'); - fputs($fp,"\n"); - /* Fin Smarty*/ - fputs($fp, '?>'); fclose($fp); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 71759a2470a..1a4a212bdcc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -597,10 +597,7 @@ else // Si utilisateur externe // If there is at least one module using Smarty if (sizeof($conf->need_smarty) > 0) { - // SMARTY (Defined into conf file) - // $dolibarr_smarty_libs_dir="/home/www/dolibarr/htdocs/includes/smarty/libs/"; - // $dolibarr_smarty_compile="/home/www/dolibarr/documents/smarty/templates/temp"; - // $dolibarr_smarty_cache="/home/www/dolibarr/documents/smarty/cache/temp"; + // Usage of constats in conf.php file is no more required. if (empty($dolibarr_smarty_libs_dir)) $dolibarr_smarty_libs_dir=DOL_DOCUMENT_ROOT.'/includes/smarty/libs/'; if (empty($dolibarr_smarty_compile)) $dolibarr_smarty_compile=DOL_DATA_ROOT.'/smarty/templates/temp'; if (empty($dolibarr_smarty_cache)) $dolibarr_smarty_cache=DOL_DATA_ROOT.'/smarty/cache/temp'; -- GitLab