From: Pierre Habouzit (MadCoder Date: Wed, 29 Dec 2004 23:07:06 +0000 (+0000) Subject: closes #137 X-Git-Tag: xorg/old~565 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e1f2b5c65f0393d05c7a1ab6bb70272a2991562e;p=platal.git closes #137 git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-183 --- diff --git a/ChangeLog b/ChangeLog index ff56d69..6e9f43b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,15 +13,17 @@ New : - Brand new PDF of the contact list (using FPDF). -MC - Even include Photos in the PDF (kludgy !). -MC - * Validation : - - quite a lot of rewrite, simplifications. -MC - - now possible to add comments without any action. -MC - * Skins : - Openweb : update. -MC + * Validation : + - quite a lot of rewrite, simplifications. -MC + Bug/Wish : + * Validations : + - #137: now possible to add comments without any action. -MC + ================================================================================ VERSION 0.9.3 27 Dec 2004 diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 4a4d82a..b13acf0 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -25,7 +25,7 @@ function microtime_float() return ((float)$usec + (float)$sec); } $TIME_BEGIN = microtime_float(); - + // {{{ defines $i=0; @@ -40,6 +40,9 @@ define("PERMS_ADMIN", "admin"); define('SKINNED', 0); define('NO_SKIN', 1); +setlocale(LC_MESSAGES, 'fr_FR'); +setlocale(LC_TIME, 'fr_FR'); + // }}} // {{{ globals + session init diff --git a/include/xorg/page.inc.php b/include/xorg/page.inc.php index 9b52d17..4696b0e 100644 --- a/include/xorg/page.inc.php +++ b/include/xorg/page.inc.php @@ -54,12 +54,9 @@ class XorgPage extends DiogenesCorePage { global $globals; - setlocale(LC_MESSAGES, 'fr_FR'); - setlocale(LC_TIME, 'fr_FR'); - $this->template_dir = $globals->spoolroot."/templates/"; $this->compile_dir = $globals->spoolroot."/templates_c/"; - $this->plugins_dir[] = $globals->spoolroot."/plugins/"; + array_unshift($this->plugins_dir, $globals->spoolroot."/plugins/"); $this->config_dir = $globals->spoolroot."/configs/"; $this->compile_check = !empty($globals->debug); diff --git a/plugins/modifier.date_format.php b/plugins/modifier.date_format.php new file mode 100644 index 0000000..1f9f06a --- /dev/null +++ b/plugins/modifier.date_format.php @@ -0,0 +1,36 @@ +format($format); + } elseif (!empty($default_date)) { + $date = new Date($default_date); + return $date->format($format); + } else { + return; + } +} + +?>