Remove deprecated code. Now usage of smarty is simpler (no need to declare things in config file)

This commit is contained in:
Laurent Destailleur 2009-10-20 17:34:17 +00:00
parent d963cc049b
commit 6e43cda408
7 changed files with 10 additions and 49 deletions

View File

@ -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%">';

View File

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

View File

@ -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<EFBFBD>curit<EFBFBD> acc<63>s client
// Security check
if ($user->societe_id == 0)
{
$newmenu->add(DOL_URL_ROOT."/soc.php?leftmenu=suppliers&amp;action=create&amp;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<EFBFBD>placements
// Deplacements
if ($conf->deplacement->enabled)
{
$langs->load("trips");
@ -518,7 +518,7 @@ class MenuLeft {
}
// Pr<EFBFBD>l<EFBFBD>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<EFBFBD>sultats
// Bilan, resultats
$newmenu->add(DOL_URL_ROOT."/compta/resultat/index.php?leftmenu=ca&amp;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<EFBFBD>curit<EFBFBD> acc<63>s client
// Security check
if ($user->societe_id == 0)
{
$newmenu->add(DOL_URL_ROOT."/soc.php?leftmenu=suppliers&amp;action=create&amp;type=f",$langs->trans("NewSupplier"), 1, $user->rights->societe->creer && $user->rights->fournisseur->lire);

View File

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

View File

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

View File

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

View File

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