[Fusionforge-commits] r7294 - in trunk: . gforge/debian gforge/www/activity

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Apr 2 15:16:37 CEST 2009


Author: lolando
Date: 2009-04-02 15:16:36 +0200 (Thu, 02 Apr 2009)
New Revision: 7294

Modified:
   trunk/
   trunk/gforge/debian/changelog
   trunk/gforge/www/activity/index.php
Log:
Fixed date printing and parsing in activity tab, where the expected
format for date input didn't match the one used for display (which
depended on locale).



Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291

   + /branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293


Modified: trunk/gforge/debian/changelog
===================================================================
--- trunk/gforge/debian/changelog	2009-04-02 13:15:07 UTC (rev 7293)
+++ trunk/gforge/debian/changelog	2009-04-02 13:16:36 UTC (rev 7294)
@@ -11,7 +11,7 @@
 
  -- Roland Mas <lolando at debian.org>  Thu, 26 Mar 2009 17:29:27 +0100
 
-gforge (4.7.2-3+3) experimental; urgency=low
+gforge (4.7.2-3+4) experimental; urgency=low
 
   * Quick fix for a bug in uploading attachments to forum posts.  A proper
     fix requires a change in the DB schema, and will be implemented in
@@ -19,8 +19,11 @@
   * Removed database password from a world-readable file.
   * Fixed require directives in cronjobs (again, this is only for the 4.7
     series as it won't be needed on trunk).
+  * Fixed date printing and parsing in activity tab, where the expected
+    format for date input didn't match the one used for display (which
+    depended on locale).
 
- -- Roland Mas <lolando at debian.org>  Thu, 02 Apr 2009 15:01:23 +0200
+ -- Roland Mas <lolando at debian.org>  Thu, 02 Apr 2009 15:14:05 +0200
 
 gforge (4.7.2-3) experimental; urgency=low
 

Modified: trunk/gforge/www/activity/index.php
===================================================================
--- trunk/gforge/www/activity/index.php	2009-04-02 13:15:07 UTC (rev 7293)
+++ trunk/gforge/www/activity/index.php	2009-04-02 13:16:36 UTC (rev 7294)
@@ -20,15 +20,17 @@
 $end = getStringFromRequest("end_date");
 $show=getArrayFromRequest("show");
 
+$date_format = _('%Y-%m-%d') ;
+
 if (!$begin || $begin==0) {
 	$begin = (time()-(30*86400));
 } else {
-	$begin = strtotime($begin);
+	$begin = strptime ($begin, $date_format);
 }
 if (!$end || $end==0) {
-	$end = time();
+	$end = time ();
 } else {
-	$end=strtotime($end)+86400;
+	$end = strptime ($end, $date_format) + 86400;
 }
 if ($begin > $end) {
 	$endtmp=$end;
@@ -109,8 +111,8 @@
 </tr>
 <tr>
 	<td><?php echo $multiselect; ?></td>
-	<td valign="top"><input name="start_date" value="<?php echo date(_('Y-m-d'),$begin); ?>" size="10" maxlength="10" /></td>
-	<td valign="top"><input name="end_date" value="<?php echo date(_('Y-m-d'),$end); ?>" size="10" maxlength="10" /></td>
+	<td valign="top"><input name="start_date" value="<?php echo strftime($date_format,$begin); ?>" size="10" maxlength="10" /></td>
+	<td valign="top"><input name="end_date" value="<?php echo strftime($date_format,$end); ?>" size="10" maxlength="10" /></td>
 	<td valign="top"><input type="submit" name="submit" value="<?php echo _('Submit'); ?>"/></td>
 </tr>
 </table>
@@ -128,11 +130,11 @@
 	$j=0;
 	$last_day = 0;
 	while ($arr =& db_fetch_array($res)) {
-		if ($last_day != date('Y-M-d',$arr['activity_date'])) {
+		if ($last_day != strftime($date_format,$arr['activity_date'])) {
 		//	echo $HTML->listTableBottom($theader);
-			echo '<tr class="tableheading"><td colspan="3">'.date(_('Y-m-d'),$arr['activity_date']).'</td></tr>';
+			echo '<tr class="tableheading"><td colspan="3">'.strftime($date_format,$arr['activity_date']).'</td></tr>';
 		//	echo $HTML->listTableTop($theader);
-			$last_day=date('Y-M-d',$arr['activity_date']);
+			$last_day=strftime($date_format,$arr['activity_date']);
 		}
 		switch ($arr['section']) {
 			case 'commit': {




More information about the Fusionforge-commits mailing list