[grisbiwebcommit] [13] FIX bug si on ne renseignait que la date de d?\195? \169but ou que la date de fin |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/grisbiwebcommit Archives
]
Revision: 13
Author: nicosomb
Date: 2009-02-03 22:04:13 +0100 (Tue, 03 Feb 2009)
Log Message:
-----------
FIX bug si on ne renseignait que la date de d?\195?\169but ou que la date de fin
Modified Paths:
--------------
trunk/functions.php
trunk/grisbi.php
Modified: trunk/functions.php
===================================================================
--- trunk/functions.php 2009-02-03 20:53:39 UTC (rev 12)
+++ trunk/functions.php 2009-02-03 21:04:13 UTC (rev 13)
@@ -153,7 +153,7 @@
if (isset($_POST['sc']) && $_POST['sc'] != '' && $_POST['sc'] != '0') {
$params['sc'] = $_POST['sc'];
}
-
+
return $params;
}
Modified: trunk/grisbi.php
===================================================================
--- trunk/grisbi.php 2009-02-03 20:53:39 UTC (rev 12)
+++ trunk/grisbi.php 2009-02-03 21:04:13 UTC (rev 13)
@@ -210,10 +210,22 @@
// Traitement de la plage de date
$entreDate = true;
- if ($params['dateDebut'] != '' && $params['dateFin'] != '') {
+ if ($params['dateDebut'] != '' || $params['dateFin'] != '') {
$dateOperation = convertirTimestamp($operation->tagAttrs['d']);
- $borneDebut = convertirTimestamp($params['dateDebut']);
- $borneFin = convertirTimestamp($params['dateFin']);
+
+ if ($params['dateDebut'] != '') {
+ $borneDebut = convertirTimestamp($params['dateDebut']);
+ }
+ else {
+ $borneDebut = 0;
+ }
+
+ if ($params['dateFin'] != '') {
+ $borneFin = convertirTimestamp($params['dateFin']);
+ }
+ else {
+ $borneFin = time();
+ }
if ($dateOperation < $borneDebut || $dateOperation > $borneFin) {
$entreDate = false;
$display = false;