[Fusionforge-commits] FusionForge branch master updated. f4bb01160a6fdffa51694b35f2e7ac00d3c938c5

Alain Peyrat aljeux at fusionforge.org
Fri Aug 30 15:14:52 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  f4bb01160a6fdffa51694b35f2e7ac00d3c938c5 (commit)
      from  90743b16e94a1bf1dbec3c133337a818e457279e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f4bb01160a6fdffa51694b35f2e7ac00d3c938c5
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Aug 30 15:14:48 2013 +0200

    Fix delete reporting, only delete selected hours, not all

diff --git a/src/www/reporting/timeadd.php b/src/www/reporting/timeadd.php
index 2027929..6851e24 100644
--- a/src/www/reporting/timeadd.php
+++ b/src/www/reporting/timeadd.php
@@ -48,21 +48,26 @@ if (getStringFromRequest('submit')) {
 	if (getStringFromRequest('delete')) {
 		if ($project_task_id && $report_date && $old_time_code) {
 			$res=db_query_params ('DELETE FROM rep_time_tracking
+				WHERE ctid IN
+				(SELECT ctid FROM rep_time_tracking
 				WHERE user_id=$1
 				AND report_date=$2
 				AND project_task_id=$3
-				AND time_code=$4',
+				AND time_code=$4
+				AND hours=$5
+				LIMIT 1)',
 					      array (user_getid(),
 						     $report_date,
 						     $project_task_id,
-						     $old_time_code));
+						     $old_time_code,
+						     $hours));
 			if (!$res || db_affected_rows($res) < 1) {
 				exit_error(db_error());
 			} else {
 				$feedback=_('Successfully Deleted');
 			}
 		} else {
-			$error_msg = _('INTERNAL ERROR: delete: ').$project_task_id.' && '.$report_date.' && '.$old_time_code;
+			$error_msg = _('Internal error: delete: ').$project_task_id.' && '.$report_date.' && '.$old_time_code;
 		}
 
 	} elseif (getStringFromRequest('add')) {

-----------------------------------------------------------------------

Summary of changes:
 src/www/reporting/timeadd.php |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list