From 55d0ad29d36b8880312c2faa472f6cf889143960 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2009 18:34:46 +0000 Subject: [PATCH] Removed source code from conf dir that is dedicatd to store dolibarr config file. --- .settings/org.eclipse.core.resources.prefs | 4 +-- htdocs/compta/index.php | 2 +- htdocs/{conf => core}/conf.class.php | 2 +- htdocs/install/etape2.php | 38 +++++++++++----------- htdocs/install/etape4.php | 2 +- htdocs/install/inc.php | 2 +- htdocs/master.inc.php | 2 +- htdocs/support/inc.php | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) rename htdocs/{conf => core}/conf.class.php (99%) diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 73962a7caab..b9f8076e026 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,4 @@ -#Mon Mar 09 21:45:56 CET 2009 +#Wed Mar 11 19:32:00 CET 2009 eclipse.preferences.version=1 encoding//dev/initdemo/initdemo.sql=UTF-8 encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1 @@ -33,8 +33,8 @@ encoding//htdocs/compta/facture.php=ISO-8859-1 encoding//htdocs/compta/facture/stats/index.php=ISO-8859-1 encoding//htdocs/compta/facture/stats/month.php=ISO-8859-1 encoding//htdocs/compta/index.php=ISO-8859-1 -encoding//htdocs/conf/conf.class.php=ISO-8859-1 encoding//htdocs/contrat/fiche.php=ISO-8859-1 +encoding//htdocs/core/conf.class.php=ISO-8859-1 encoding//htdocs/dolgraph.class.php=ISO-8859-1 encoding//htdocs/expedition/expedition.class.php=ISO-8859-1 encoding//htdocs/expedition/stats/month.php=ISO-8859-1 diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 633a1b2702c..ad180787638 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -245,7 +245,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) $facturesupplierstatic->ref=$obj->facnumber; $facturesupplierstatic->id=$obj->rowid; $facturesupplierstatic->type=$obj->type; - print $facturesupplierstatic->getNomUrl(1,''); + print $facturesupplierstatic->getNomUrl(1,'',16); print ''; print ''; $companystatic->id=$obj->socid; diff --git a/htdocs/conf/conf.class.php b/htdocs/core/conf.class.php similarity index 99% rename from htdocs/conf/conf.class.php rename to htdocs/core/conf.class.php index a90893ff762..bef6b1ec391 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/core/conf.class.php @@ -21,7 +21,7 @@ */ /** - * \file htdocs/conf/conf.class.php + * \file htdocs/core/conf.class.php * \ingroup core * \brief Fichier de la classe de stockage de la config courante * \remarks La config est stockee dans le fichier conf/conf.php diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index 4807dea90d9..aacc4595003 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -26,7 +26,7 @@ include("./inc.php"); require_once($dolibarr_main_document_root."/lib/databases/".$dolibarr_main_db_type.".lib.php"); -require_once($dolibarr_main_document_root."/conf/conf.class.php"); +require_once($dolibarr_main_document_root."/core/conf.class.php"); require_once($dolibarr_main_document_root."/lib/admin.lib.php"); $etape = 2; @@ -37,7 +37,7 @@ $ok = 0; // Ne fonctionne que si on est pas en safe_mode. $err=error_reporting(); error_reporting(0); -@set_time_limit(180); +@set_time_limit(180); error_reporting($err); $setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto'); @@ -118,8 +118,8 @@ if ($_POST["action"] == "set") if ($ok) { // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) - $dir = "../../mysql/tables/"; - + $dir = "../../mysql/tables/"; + $ok = 0; $handle=opendir($dir); dolibarr_install_syslog("Ouverture repertoire ".$dir." handle=".$handle,LOG_DEBUG); @@ -129,7 +129,7 @@ if ($_POST["action"] == "set") if (eregi('\.sql$',$file) && eregi('^llx_',$file) && ! eregi('\.key\.sql$',$file)) { $tablefound++; - + $name = substr($file, 0, strlen($file) - 4); $buffer = ''; $fp = fopen($dir.$file,"r"); @@ -144,21 +144,21 @@ if ($_POST["action"] == "set") { $buf=$db->convertSQLFromMysql($buf); } - + $buffer .= $buf; } } fclose($fp); $buffer=trim($buffer); - + //print "Creation de la table $name/td>"; $requestnb++; if ($conf->character_set_client == "UTF-8") { $buffer=utf8_encode($buffer); } - + dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG); if ($db->query($buffer)) { @@ -208,7 +208,7 @@ if ($_POST["action"] == "set") } } - + /*************************************************************************************** * * Chargement fichiers tables/*.key.sql @@ -218,7 +218,7 @@ if ($_POST["action"] == "set") if ($ok) { // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) - $dir = "../../mysql/tables/"; + $dir = "../../mysql/tables/"; $okkeys = 0; $handle=opendir($dir); @@ -249,14 +249,14 @@ if ($_POST["action"] == "set") // Version qualified, delete SQL comments $buf=eregi_replace('^-- V([0-9\.]+)','',$buf); //print "Ligne $i qualifiee par version: ".$buf.'
'; - } + } } // Ajout ligne si non commentaire if (! eregi('^--',$buf)) $buffer .= $buf; } fclose($fp); - + // Si plusieurs requetes, on boucle sur chaque $listesql=split(';',$buffer); foreach ($listesql as $req) @@ -270,7 +270,7 @@ if ($_POST["action"] == "set") { $buffer=utf8_encode($buffer); } - + dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG); if ($db->query($buffer)) { @@ -318,8 +318,8 @@ if ($_POST["action"] == "set") $okkeys = 1; } } - - + + /*************************************************************************************** * * Chargement fichier functions.sql @@ -351,9 +351,9 @@ if ($_POST["action"] == "set") // Si plusieurs requetes, on boucle sur chaque $listesql=split('§',eregi_replace(";';",";'§",$buffer)); - foreach ($listesql as $buffer) { + foreach ($listesql as $buffer) { if (trim($buffer)) { - + if ($db->query(trim($buffer))) { $ok = 1; @@ -385,7 +385,7 @@ if ($_POST["action"] == "set") } } - } + } /*************************************************************************************** @@ -396,7 +396,7 @@ if ($_POST["action"] == "set") if ($ok) { // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax) - $dir = "../../mysql/data/"; + $dir = "../../mysql/data/"; // Creation donnees $file = "data.sql"; diff --git a/htdocs/install/etape4.php b/htdocs/install/etape4.php index e396acd1d0f..0d19e040b3b 100644 --- a/htdocs/install/etape4.php +++ b/htdocs/install/etape4.php @@ -29,7 +29,7 @@ include_once("./inc.php"); require_once($dolibarr_main_document_root."/lib/databases/".$dolibarr_main_db_type.".lib.php"); -require_once($dolibarr_main_document_root."/conf/conf.class.php"); +require_once($dolibarr_main_document_root."/core/conf.class.php"); require_once($dolibarr_main_document_root."/lib/admin.lib.php"); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 8455890ef34..fa345eb4a52 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -200,7 +200,7 @@ function conf($dolibarr_main_document_root) global $dolibarr_main_db_pass; global $character_set_client; - $return=include_once($dolibarr_main_document_root."/conf/conf.class.php"); + $return=include_once($dolibarr_main_document_root."/core/conf.class.php"); if (! $return) return -1; $conf=new Conf(); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 85f98e5921d..69115001348 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -110,7 +110,7 @@ if (! empty($dolibarr_main_db_encrypted_pass)) } //print memory_get_usage(); -require_once(DOL_DOCUMENT_ROOT."/conf/conf.class.php"); +require_once(DOL_DOCUMENT_ROOT."/core/conf.class.php"); $conf = new Conf(); // Identifiant propres au serveur base de donnee diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 6afca5b1a19..3e6cac5145c 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -161,7 +161,7 @@ function conf($dolibarr_main_document_root) global $dolibarr_main_db_pass; global $character_set_client; - $return=include_once($dolibarr_main_document_root."/conf/conf.class.php"); + $return=include_once($dolibarr_main_document_root."/core/conf.class.php"); if (! $return) return -1; $conf=new Conf();