From 904263e5f0b633b62d6ff8c03cd19f542e757de2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Jul 2011 22:55:06 +0000 Subject: [PATCH] Can disable string encoding (if already done) --- htdocs/comm/action/index.php | 35 ++++++++++++++++++----------------- htdocs/lib/agenda.lib.php | 14 ++++++++------ 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 05e52bded62..08e7d071cab 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -24,7 +24,7 @@ * \file htdocs/comm/action/index.php * \ingroup agenda * \brief Home page of calendar events - * \version $Id: index.php,v 1.183 2011/07/22 06:51:31 simnandez Exp $ + * \version $Id$ */ require("../../main.inc.php"); @@ -487,23 +487,24 @@ if ($showbirthday) //Exernal Calendars $listofextcals=array(); - -if (empty($conf->global->AGENDA_DISABLE_EXT) && $conf->global->AGENDA_EXT_NB > 0) +if ($conf->global->MAIN_FEATURES_LEVEL>=2) { - $i=0; - while($i < $conf->global->AGENDA_EXT_NB) - { - $i++; - $paramkey='AGENDA_EXT_SRC'.$i; - $url=$conf->global->$paramkey; - $paramkey='AGENDA_EXT_NAME'.$i; - $namecal = $conf->global->$paramkey; - $paramkey='AGENDA_EXT_COLOR'.$i; - $colorcal = $conf->global->$paramkey; - if ($url && $namecal) $listofextcals[]=array('src'=>$url,'name'=>$namecal,'color'=>$colorcal); - } + if (empty($conf->global->AGENDA_DISABLE_EXT) && $conf->global->AGENDA_EXT_NB > 0) + { + $i=0; + while($i < $conf->global->AGENDA_EXT_NB) + { + $i++; + $paramkey='AGENDA_EXT_SRC'.$i; + $url=$conf->global->$paramkey; + $paramkey='AGENDA_EXT_NAME'.$i; + $namecal = $conf->global->$paramkey; + $paramkey='AGENDA_EXT_COLOR'.$i; + $colorcal = $conf->global->$paramkey; + if ($url && $namecal) $listofextcals[]=array('src'=>$url,'name'=>$namecal,'color'=>$colorcal); + } + } } - if (sizeof($listofextcals)) { require_once(DOL_DOCUMENT_ROOT."/comm/action/class/ical.class.php"); @@ -786,7 +787,7 @@ $("#actionagenda_vcal_link").attr("href","/public/agenda/agendaexport.php?format '; */ -llxFooter('$Date: 2011/07/22 06:51:31 $ - $Revision: 1.183 $'); +llxFooter('$Date$ - $Revision$'); /** diff --git a/htdocs/lib/agenda.lib.php b/htdocs/lib/agenda.lib.php index d47b327541d..91a96d0e6e2 100644 --- a/htdocs/lib/agenda.lib.php +++ b/htdocs/lib/agenda.lib.php @@ -22,7 +22,7 @@ /** * \file htdocs/lib/agenda.lib.php * \brief Set of function for the agenda module - * \version $Id: agenda.lib.php,v 1.42 2011/07/22 06:51:30 simnandez Exp $ + * \version $Id$ */ @@ -324,11 +324,13 @@ function agenda_prepare_head() $head[$h][2] = 'xcal'; $h++; - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php"; - $head[$h][1] = $langs->trans("ExtSites"); - $head[$h][2] = 'extsites'; - $h++; - + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // In dev version only for the moment + { + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_extsites.php"; + $head[$h][1] = $langs->trans("ExtSites"); + $head[$h][2] = 'extsites'; + $h++; + } return $head; }