[evolvis-commits] r7951: Applied Francisco Gimeno alias kikov supposed repared patch↵?==?UTF-8?Q?

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Feb 24 15:53:41 CET 2011


Author: mirabilos
Date: 2011-02-24 15:53:40 +0100 (Thu, 24 Feb 2011)
New Revision: 7951

Modified:
   trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/pm_data.php
   trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/add_task.php
   trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/mod_task.php
   trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/pm_utils.php
   trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/task.php
Log:
Applied Francisco Gimeno alias kikov supposed repared patch


Modified: trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/pm_data.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/pm_data.php	2011-02-24 14:53:39 UTC (rev 7950)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/common/pm/pm_data.php	2011-02-24 14:53:40 UTC (rev 7951)
@@ -304,11 +304,16 @@
  * @param		int		The group project ID
  * @param		int		The starting month
  * @param		int		The starting day
+ * @param		int		The starting year
+ * @param		int		The starting hour
+ * @param		int		The starting minute
  * @param		int		The ending month
  * @param		int		The ending day
  * @param		int		The ending year
- * @param		string	The task summary
- * @param		string	Details of the task
+ * @param		int		The ending hour
+ * @param		int 		The ending minute
+ * @param		string		The task summary
+ * @param		string		Details of the task
  * @param		int		The completed percentage of the task
  * @param		int		The task priority
  * @param		int		The number of hours exptected to complete this task
@@ -317,8 +322,8 @@
  * @returns Nnew project_task_id or false and $feedback
  *
  */
-function pm_data_create_task ($group_project_id,$start_month,$start_day,$start_year,$end_month,$end_day,
-		$end_year,$summary,$details,$percent_complete,$priority,$hours,$assigned_to,$dependent_on) {
+function pm_data_create_task ($group_project_id,$start_month,$start_day,$start_year,$start_hour,$start_minute,$end_month,$end_day,
+		$end_year,$end_hour,$end_minute,$summary,$details,$percent_complete,$priority,$hours,$assigned_to,$dependent_on) {
 
 	global $feedback;
 	if (!$group_project_id || !$start_month || !$start_day || !$start_year || !$end_month || !$end_day || 
@@ -327,7 +332,8 @@
 		return false;
 	}
 
-	if (mktime(0,0,0,$start_month,$start_day,$start_year) > mktime(0,0,0,$end_month,$end_day,$end_year)) {
+	if (mktime($start_hour,$start_minute,0,$start_month,$start_day,$start_year) > mktime($end_hour,$end_minute,0,$end_month,
+		$end_day,$end_year)) {
 		exit_error('Error','End Date Must Be Greater Than Begin Date');
 	}
 
@@ -335,8 +341,8 @@
 		"priority,hours,start_date,end_date,".
 		"created_by,status_id) VALUES ('$group_project_id','".htmlspecialchars($summary)."',".
 		"'".htmlspecialchars($details)."','$percent_complete','$priority','$hours','".
-		mktime(0,0,0,$start_month,$start_day,$start_year)."','".
-		mktime(0,0,0,$end_month,$end_day,$end_year)."','".user_getid()."','1')";
+		mktime($start_hour,$start_minute,0,$start_month,$start_day,$start_year)."','".
+		mktime($end_hour,$end_minute,0,$end_month,$end_day,$end_year)."','".user_getid()."','1')";
 
 	db_begin();
 
@@ -391,14 +397,14 @@
  *
  */
 function pm_data_update_task ($group_project_id,$project_task_id,$start_month,$start_day,$start_year,
-		$end_month,$end_day,$end_year,$summary,$details,$percent_complete,$priority,$hours,
-		$status_id,$assigned_to,$dependent_on,$new_group_project_id,$group_id) {
+		$start_hour,$start_minute,$end_month,$end_day,$end_year,$end_hour,$end_minute,$summary,$details,$percent_complete,
+		$priority,$hours,$status_id,$assigned_to,$dependent_on,$new_group_project_id,$group_id) {
 
 	global $feedback;
 	if (!$group_project_id || !$project_task_id || !$status_id || !$start_month || !$start_day || !$start_year || 
 		!$end_month || !$end_day || !$end_year || !$summary || !$priority || !$new_group_project_id || !$group_id ||
-		!$start_hour || !$end_hour ) {
-		$feedback .= ' ERROR - Missing Parameters ';
+		!$start_hour || !$start_minute || !$end_hour || !$end_minute) {
+		$feedback .= ' ERROR - Missing Parameters: YEah! ';
 		return false;
 	}
 	$sql="SELECT * FROM project_task WHERE project_task_id='$project_task_id' AND group_project_id='$group_project_id'";
@@ -413,7 +419,7 @@
 	/*
 		Enforce start date > end date
 	*/
-	if (mktime($start_hour,0,0,$start_month,$start_day,$start_year) > mktime($end_hour,0,0,$end_month,$end_day,$end_year)) {
+	if (mktime($start_hour,$start_minute,0,$start_month,$start_day,$start_year) > mktime($end_hour,$end_minute,0,$end_month,$end_day,$end_year)) {
 		$feedback .= ' ERROR - End Date Must Be Greater Than Start Date ';
 		return false;
 	}
@@ -455,10 +461,10 @@
 	if (db_result($result,0,'hours') != $hours)
 		{ pm_data_create_history ('hours',db_result($result,0,'hours'),$project_task_id);  }
 
-	if (db_result($result,0,'start_date') != mktime($start_hour,0,0,$start_month,$start_day,$start_year))
+	if (db_result($result,0,'start_date') != mktime($start_hour,$start_minute,0,$start_month,$start_day,$start_year))
 		{ pm_data_create_history ('start_date',db_result($result,0,'start_date'),$project_task_id);  }
 
-	if (db_result($result,0,'end_date') != mktime($end_hour,0,0,$end_month,$end_day,$end_year))
+	if (db_result($result,0,'end_date') != mktime($end_hour,$end_minute,0,$end_month,$end_day,$end_year))
 		{ pm_data_create_history ('end_date',db_result($result,0,'end_date'),$project_task_id);  }
 
 	/*
@@ -489,8 +495,8 @@
 	*/
 	$sql="UPDATE project_task SET status_id='$status_id', priority='$priority',".
 		"summary='".htmlspecialchars($summary)."',start_date='".
-		mktime($start_hour,0,0,$start_month,$start_day,$start_year)."',end_date='".
-		mktime($end_hour,0,0,$end_month,$end_day,$end_year)."',hours='$hours',".
+		mktime($start_hour,$start_minute,0,$start_month,$start_day,$start_year)."',end_date='".
+		mktime($end_hour,$end_minute,0,$end_month,$end_day,$end_year)."',hours='$hours',".
 		"percent_complete='$percent_complete', ".
 		"group_project_id='$new_group_project_id' ".
 		"WHERE project_task_id='$project_task_id' AND group_project_id='$group_project_id'";

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog	2011-02-24 14:53:39 UTC (rev 7950)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/debian/changelog	2011-02-24 14:53:40 UTC (rev 7951)
@@ -2,9 +2,10 @@
 
   * [Christian] repared broken delete function in new_parse.pl
   * [Christian] made that ssh_dump.pl don't try to create key files for
-    deleted user 
+    deleted user
+  * [Christian] Applied Francisco Gimeno alias kikov supposed repared patch 
 
- -- Christian Bayle <bayle at debian.org>  Sun,  1 Dec 2002 11:53:50 +0100
+ -- Christian Bayle <bayle at debian.org>  Mon,  2 Dec 2002 14:37:29 +0100
 
 sourceforge (2.6-0+15) experimental; urgency=low
 

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/add_task.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/add_task.php	2011-02-24 14:53:39 UTC (rev 7950)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/add_task.php	2011-02-24 14:53:40 UTC (rev 7951)
@@ -53,6 +53,7 @@
 		echo pm_show_day_box ('start_day',date('d', time()));
 		echo pm_show_year_box ('start_year',date('Y', time()));
 		echo pm_show_hour_box ('start_hour',date('G', time()));
+		echo pm_show_minute_box ('start_minute', (date('i',  (int (time() / 15 )) * 15 )));
 		?>
 			<BR><a href="calendar.php">View Calendar</a>
 		 </td>
@@ -66,6 +67,7 @@
 		echo pm_show_day_box ('end_day',date('d', time()));
 		echo pm_show_year_box ('end_year',date('Y', time()));
 		echo pm_show_hour_box ('end_hour',date('G', time()));
+		echo pm_show_minute_box ('end_minute', (date('i', (int (time() / 15 )) * 15 )));	
 		?>
 		</td>
 

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/mod_task.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/mod_task.php	2011-02-24 14:53:39 UTC (rev 7950)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/mod_task.php	2011-02-24 14:53:40 UTC (rev 7951)
@@ -78,6 +78,7 @@
 		echo pm_show_day_box ('start_day',date('d', db_result($result,0,'start_date')));
 		echo pm_show_year_box ('start_year',date('Y', db_result($result,0,'start_date')));
 		echo pm_show_hour_box ('start_hour',date('G', db_result($result,0,'start_date')));
+		echo pm_show_minute_box ('start_minute',date('i', db_result($result,0,'start_date')));		
 		?>
 		<BR><a href="calendar.php">View Calendar</a>
 		</TD>
@@ -91,6 +92,7 @@
 		echo pm_show_day_box ('end_day',date('d', db_result($result,0,'end_date')));
 		echo pm_show_year_box ('end_year',date('Y', db_result($result,0,'end_date')));
 		echo pm_show_hour_box ('end_hour',date('G', db_result($result,0,'end_date')));
+		echo pm_show_minute_box ('end_minute',date('i', db_result($result,0,'end_date')));		
 		?>
 		</TD>
 	</TR>

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/pm_utils.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/pm_utils.php	2011-02-24 14:53:39 UTC (rev 7950)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/pm_utils.php	2011-02-24 14:53:40 UTC (rev 7951)
@@ -228,6 +228,23 @@
 
 }
 
+function pm_show_minute_box($name,$minute=0) {
+
+	echo '	<select name="'.$name.'" size="1">';
+	for ($i=0; $i<=45; $i=$i+15) {
+		if ($i == $minute) {
+			echo '	<option selected value="'.$i.'">'.$i;
+		} else {
+			echo '
+				<option value="'.$i.'">'.$i;
+		}
+	}
+	echo '
+		</select>';
+
+}
+
+
 function pm_show_tasklist ($result,$offset,$set='open') {
 	global $sys_datefmt,$group_id,$group_project_id,$PHP_SELF;
 	/*

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/task.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/task.php	2011-02-24 14:53:39 UTC (rev 7950)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/pm/task.php	2011-02-24 14:53:40 UTC (rev 7951)
@@ -65,8 +65,8 @@
 		case 'postaddtask' : {
 			if (user_isloggedin() && $perm->isPMAdmin()) {
 				if (pm_data_create_task ($group_project_id,$start_month,$start_day,$start_year,
-					$start_hour,$end_month,$end_day,$end_year,
-					$end_hour,$summary,$details,$percent_complete,
+					$start_hour,$start_minute,$end_month,$end_day,$end_year,
+					$end_hour,$end_minute,$summary,$details,$percent_complete,
 					$priority,$hours,$assigned_to,$dependent_on)) {
 					$feedback='Task Created Successfully';
 					include '../pm/browse_task.php';
@@ -82,9 +82,9 @@
 		case 'postmodtask' : {
 			if (user_isloggedin() && $perm->isPMAdmin()) {
 				if (pm_data_update_task ($group_project_id,$project_task_id,$start_month,$start_day,
-					$start_year,$start_hour,$end_month,$end_day,$end_year,$end_hour,
-					$summary,$details,$percent_complete,$priority,$hours,$status_id,$assigned_to,
-					$dependent_on,$new_group_project_id,$group_id)) {
+					$start_year,$start_hour,$start_minute,$end_month,$end_day,$end_year,$end_hour,
+					$end_minute,$summary,$details,$percent_complete,$priority,$hours,$status_id,
+					$assigned_to,$dependent_on,$new_group_project_id,$group_id)) {
 					$feedback='Task Updated Successfully';
 					include '../pm/browse_task.php';
 				} else {



More information about the evolvis-commits mailing list