From c10f4a89eb8a6c33382f134479b33ce54d610e4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Jun 2004 19:32:08 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Le=20rep=20de=20cache=20de=20donn=E9es?= =?UTF-8?q?=20RSS=20du=20module=20externalRSS=20n'est=20pas=20cr=E9e=20=E0?= =?UTF-8?q?=20l'install.=20De=20plus=20l'appli=20le=20cherche=20dans=20le?= =?UTF-8?q?=20rep=20courant=20au=20lieu=20de=20DOL=5FDOCUMENT=5FROOT.docum?= =?UTF-8?q?ent/rsscache.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/magpierss/rss_fetch.inc | 8 +++++--- htdocs/includes/menus/barre_top/default.php | 10 +++++----- htdocs/install/etape1.php | 15 ++++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/htdocs/includes/magpierss/rss_fetch.inc b/htdocs/includes/magpierss/rss_fetch.inc index 6afdbbeb680..2897fc2dffb 100644 --- a/htdocs/includes/magpierss/rss_fetch.inc +++ b/htdocs/includes/magpierss/rss_fetch.inc @@ -117,8 +117,10 @@ function fetch_rss ($url) { $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE ); - if (MAGPIE_DEBUG and $cache->ERROR) { - debug($cache->ERROR, E_USER_WARNING); + if ($cache->ERROR) { + // Erreur + print $cache->ERROR; + if (MAGPIE_DEBUG) { debug($cache->ERROR, E_USER_WARNING); } } @@ -336,7 +338,7 @@ function init () { } if ( !defined('MAGPIE_CACHE_DIR') ) { - define('MAGPIE_CACHE_DIR', './cache'); + define('MAGPIE_CACHE_DIR', DOL_DOCUMENT_ROOT.'/document/rsscache'); } if ( !defined('MAGPIE_CACHE_AGE') ) { diff --git a/htdocs/includes/menus/barre_top/default.php b/htdocs/includes/menus/barre_top/default.php index 47a3ec32f7f..a19bd891113 100644 --- a/htdocs/includes/menus/barre_top/default.php +++ b/htdocs/includes/menus/barre_top/default.php @@ -43,7 +43,7 @@ else { { $class=""; if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "commercial") { $class="menusel"; } - elseif (ereg('^\/comm\/',$PHP_SELF)) { $class="menusel"; } + elseif (ereg("^".DOL_URL_ROOT."\/comm\/",$PHP_SELF)) { $class="menusel"; } print ''; print 'Commercial'; print ''; @@ -53,7 +53,7 @@ else { { $class=""; if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "adherent") { $class="menusel"; } - elseif (ereg('^\/adherents\/',$PHP_SELF)) { $class="menusel"; } + elseif (ereg("^".DOL_URL_ROOT."\/adherents\/",$PHP_SELF)) { $class="menusel"; } print ''; print 'Adhérents'; print ''; @@ -63,7 +63,7 @@ else { { $class=""; if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "compta") { $class="menusel"; } - elseif (ereg('^\/compta\/',$PHP_SELF)) { $class="menusel"; } + elseif (ereg("^".DOL_URL_ROOT."\/compta\/",$PHP_SELF)) { $class="menusel"; } print ''; print 'Compta'; print ''; @@ -73,7 +73,7 @@ else { { $class=""; if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "product") { $class="menusel"; } - elseif (ereg('^\/product\/',$PHP_SELF)) { $class="menusel"; } + elseif (ereg("^".DOL_URL_ROOT."\/product\/",$PHP_SELF)) { $class="menusel"; } $chaine=""; if ($conf->produit->enabled) { $chaine.="Produits"; } if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; } @@ -87,7 +87,7 @@ else { { $class=""; if ($_SESSION["topmenu"] && $_SESSION["topmenu"] == "webcalendar") { $class="menusel"; } - elseif (ereg('^\/webcalendar\/',$PHP_SELF)) { $class="menusel"; } + elseif (ereg("^".DOL_URL_ROOT."\/webcalendar\/",$PHP_SELF)) { $class="menusel"; } print ''; print 'Calendrier'; print ''; diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index f3ddef330f4..71055707894 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -110,13 +110,14 @@ if ($_POST["action"] == "set") if ($error == 0) { - $dir[0] = "$main_data_dir/facture"; - $dir[1] = "$main_data_dir/propale"; - $dir[2] = "$main_data_dir/societe"; - $dir[3] = "$main_data_dir/ficheinter"; - $dir[4] = "$main_data_dir/produit"; - $dir[5] = "$main_data_dir/rapport"; - $dir[6] = "$main_data_dir/images"; + $dir[0] = "$main_data_dir/facture"; + $dir[1] = "$main_data_dir/propale"; + $dir[2] = "$main_data_dir/societe"; + $dir[3] = "$main_data_dir/ficheinter"; + $dir[4] = "$main_data_dir/produit"; + $dir[5] = "$main_data_dir/rapport"; + $dir[6] = "$main_data_dir/images"; + $dir[7] = "$main_data_dir/rsscache"; if (! is_dir($main_dir)) {