Objet : devel-adl
Archives de la liste
- From: svn AT agendadulibre.org
- To: devel AT agendadulibre.org
- Subject: [Devel] r480 - in branches/generic: . adl-specific includes
- Date: Tue, 3 Aug 2010 20:37:15 +0200 (CEST)
- List-archive: <http://agendadulibre.org/pipermail/devel>
- List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>
Author: ploc
Date: Tue Aug 3 20:37:14 2010
New Revision: 480
Log:
added possibility to set locale for day and month names, and to set the
timezone (useful if different from the server timezone)
Modified:
branches/generic/adl-specific/config.inc.php
branches/generic/config.inc.php
branches/generic/includes/funcs.inc.php
Modified: branches/generic/adl-specific/config.inc.php
==============================================================================
--- branches/generic/adl-specific/config.inc.php Mon Aug 2 23:40:29
2010 (r479)
+++ branches/generic/adl-specific/config.inc.php Tue Aug 3 20:37:14
2010 (r480)
@@ -11,18 +11,21 @@
$footerTemplate = "$specificContent/templates/footer.html";
/* main config */
-$developerMail = "devel AT agendadulibre.org"; /* mail of developers */
-$moderatorMail = "moderateurs AT agendadulibre.org"; /* mail of moderators */
+$locale = "fr_FR.utf8"; /*
locale used for month and day names */
+$timezone = "Europe/Paris"; /*
default timezone used to get actual time (not the server local time)
+
see <http://php.net/manual/fr/timezones.php> for a list of valid timezones */
+$developerMail = "devel AT agendadulibre.org"; /*
mail of developers */
+$moderatorMail = "moderateurs AT agendadulibre.org"; /*
mail of moderators */
$moderatorMail = "agenda AT survie.org";
-$debugMail = ""; /* mail of debugger */
-/* When not empty, all the e-mails are sent to debug address, instead of the
- event submitter addresses. Useful for debugging during development. */
+$debugMail = ""; /*
mail of debugger */
+ /* When not empty, all the e-mails are sent to debug address,
instead of the
+ event submitter addresses. Useful for debugging during
development. */
/* database related config */
-$db_host = "host"; /* where the database is
hosted */
-$db_user = "user"; /* username needed to
connect to the database */
-$db_pass = "password"; /* password needed to
connect to the database */
-$db_name = "db"; /* database name */
+$db_host = "host"; /*
mysql server */
+$db_user = "user"; /*
username needed to connect to the database */
+$db_pass = "password"; /*
password needed to connect to the database */
+$db_name = "db"; /*
database name */
/* misc config */
$localGroupName = "groupe d'utilisateurs";
Modified: branches/generic/config.inc.php
==============================================================================
--- branches/generic/config.inc.php Mon Aug 2 23:40:29 2010 (r479)
+++ branches/generic/config.inc.php Tue Aug 3 20:37:14 2010 (r480)
@@ -4,4 +4,9 @@
include("$specificContent/config.inc.php");
+if(date_default_timezone_set($timezone) == false)
+{
+ echo "timezone setting error";
+}
+
?>
Modified: branches/generic/includes/funcs.inc.php
==============================================================================
--- branches/generic/includes/funcs.inc.php Mon Aug 2 23:40:29 2010
(r479)
+++ branches/generic/includes/funcs.inc.php Tue Aug 3 20:37:14 2010
(r480)
@@ -28,15 +28,18 @@
function calendar_absolute_url($url="", $protocol="http")
{
global $rootUrl;
+
$rootUrl = rtrim ($rootUrl, "/");
return $protocol . "://" . $rootUrl . "/" . $url;
}
function calendar_setlocale()
{
- if(setlocale(LC_TIME, "fr_FR.utf8") == false)
+ global $locale;
+
+ if(setlocale(LC_TIME, $locale) == false)
{
- echo "Erreur locales";
+ echo "locale setting error";
}
}
- [Devel] r480 - in branches/generic: . adl-specific includes, svn, 03/08/2010
- Re: [Devel] r480 - in branches/generic: . adl-specific includes, Ploc, 04/08/2010
Archives gérées par MHonArc 2.6.16.