[Fusionforge-commits] r10797 - in trunk/src: plugins/mediawiki/www plugins/scmgit/www www/account www/admin www/developer www/frs/admin www/my www/people www/pm www/project/admin www/reporting www/snippet www/tracker www/tracker/admin

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Sat Oct 2 17:31:40 CEST 2010


Author: aljeux
Date: 2010-10-02 17:31:39 +0200 (Sat, 02 Oct 2010)
New Revision: 10797

Modified:
   trunk/src/plugins/mediawiki/www/frame.php
   trunk/src/plugins/scmgit/www/index.php
   trunk/src/www/account/setlang.php
   trunk/src/www/admin/responses_admin.php
   trunk/src/www/developer/diary.php
   trunk/src/www/frs/admin/editrelease.php
   trunk/src/www/my/bookmark_delete.php
   trunk/src/www/people/editjob.php
   trunk/src/www/people/editprofile.php
   trunk/src/www/people/helpwanted-latest.php
   trunk/src/www/people/viewjob.php
   trunk/src/www/people/viewprofile.php
   trunk/src/www/pm/task.php
   trunk/src/www/project/admin/roleedit.php
   trunk/src/www/reporting/projectact.php
   trunk/src/www/reporting/projecttime.php
   trunk/src/www/reporting/projecttime_graph.php
   trunk/src/www/reporting/timeadd.php
   trunk/src/www/reporting/useract.php
   trunk/src/www/reporting/useract_graph.php
   trunk/src/www/reporting/usertime.php
   trunk/src/www/reporting/usertime_graph.php
   trunk/src/www/snippet/addversion.php
   trunk/src/www/tracker/admin/updates.php
   trunk/src/www/tracker/taskmgr.php
   trunk/src/www/tracker/tracker.php
Log:
Use getIntFromRequest() for *_id vars.

Modified: trunk/src/plugins/mediawiki/www/frame.php
===================================================================
--- trunk/src/plugins/mediawiki/www/frame.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/plugins/mediawiki/www/frame.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -11,7 +11,7 @@
 require_once('../../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 
-$group_id = getStringFromRequest('group_id');
+$group_id = getIntFromRequest('group_id');
 $pluginname = 'mediawiki' ;
 
 $group = group_get_object($group_id);

Modified: trunk/src/plugins/scmgit/www/index.php
===================================================================
--- trunk/src/plugins/scmgit/www/index.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/plugins/scmgit/www/index.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -13,7 +13,7 @@
 $func = getStringFromRequest ('func') ;
 switch ($func) {
 case 'request-personal-repo':
-	$group_id = getStringFromRequest ('group_id') ;
+	$group_id = getIntFromRequest ('group_id') ;
 	session_require_perm ('scm', $group_id, 'write') ;
 	$user = session_get_user(); // get the session user
 	$result = db_query_params ('SELECT * FROM plugin_scmgit_personal_repos p WHERE p.group_id=$1 AND p.user_id=$2',

Modified: trunk/src/www/account/setlang.php
===================================================================
--- trunk/src/www/account/setlang.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/account/setlang.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -24,7 +24,7 @@
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 
-$language_id=getStringFromRequest('language_id');
+$language_id=getIntFromRequest('language_id');
 setcookie('cookie_language_id',$language_id,(time()+2592000),'/','',0);
 $cookie_language_id = $language_id;
 

Modified: trunk/src/www/admin/responses_admin.php
===================================================================
--- trunk/src/www/admin/responses_admin.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/admin/responses_admin.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -59,7 +59,7 @@
 $action = getStringFromRequest('action');
 
 if( $action == "Edit" ) {
-	$response_id = getStringFromRequest('response_id');
+	$response_id = getIntFromRequest('response_id');
 	$action2 = getStringFromRequest('action2');
 	$response_title = getStringFromRequest('response_title');
 	$response_text = getStringFromRequest('response_text');
@@ -97,7 +97,7 @@
 	}
 
 } else if ( $action == "Delete" ) {
-	$response_id = getStringFromRequest('response_id');
+	$response_id = getIntFromRequest('response_id');
 	$sure = getStringFromRequest('sure');
 
 	// Delete Response

Modified: trunk/src/www/developer/diary.php
===================================================================
--- trunk/src/www/developer/diary.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/developer/diary.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -26,9 +26,9 @@
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/vote_function.php';
 
-$diary_user = getStringFromRequest('diary_user');
+$diary_user = getIntFromRequest('diary_user');
 if ($diary_user) {
-	$diary_id = getStringFromRequest('diary_id');
+	$diary_id = getIntFromRequest('diary_id');
   
 	$user_obj=user_get_object($diary_user);
 	if (!$user_obj) {

Modified: trunk/src/www/frs/admin/editrelease.php
===================================================================
--- trunk/src/www/frs/admin/editrelease.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/frs/admin/editrelease.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -147,7 +147,7 @@
 	$release_date = getStringFromRequest('release_date');
 	// Build a Unix time value from the supplied Y-m-d value
 	$release_date = strtotime($release_date);
-	$processor_id = getStringFromRequest('processor_id');
+	$processor_id = getIntFromRequest('processor_id');
 	$group_unix_name=group_getunixname($group_id);
 	$ftp_filename = getStringFromRequest('ftp_filename');
 	$manual_filename = getStringFromRequest('manual_filename');

Modified: trunk/src/www/my/bookmark_delete.php
===================================================================
--- trunk/src/www/my/bookmark_delete.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/my/bookmark_delete.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -26,7 +26,7 @@
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'include/bookmarks.php';
 
-$bookmark_id = getStringFromRequest('bookmark_id');
+$bookmark_id = getIntFromRequest('bookmark_id');
 
 if ($bookmark_id) {
 	bookmark_delete ($bookmark_id);

Modified: trunk/src/www/people/editjob.php
===================================================================
--- trunk/src/www/people/editjob.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/people/editjob.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -37,13 +37,13 @@
 if ($group_id && (user_ismember($group_id, 'A'))) {
 	$title = getStringFromRequest('title');
 	$description = getStringFromRequest('description');
-	$category_id = getStringFromRequest('category_id');
-	$status_id = getStringFromRequest('status_id');
-	$job_id = getStringFromRequest('job_id');
-	$job_inventory_id = getStringFromRequest('job_inventory_id');
-	$skill_id = getStringFromRequest('skill_id');
-	$skill_level_id = getStringFromRequest('skill_level_id');
-	$skill_year_id = getStringFromRequest('skill_year_id');
+	$category_id = getIntFromRequest('category_id');
+	$status_id = getIntFromRequest('status_id');
+	$job_id = getIntFromRequest('job_id');
+	$job_inventory_id = getIntFromRequest('job_inventory_id');
+	$skill_id = getIntFromRequest('skill_id');
+	$skill_level_id = getIntFromRequest('skill_level_id');
+	$skill_year_id = getIntFromRequest('skill_year_id');
 
 	if (getStringFromRequest('add_job')) {
 		/*

Modified: trunk/src/www/people/editprofile.php
===================================================================
--- trunk/src/www/people/editprofile.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/people/editprofile.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -34,10 +34,7 @@
 }
 
 $group_id = getIntFromRequest('group_id');
-$job_id = getStringFromRequest('job_id');
-$feedback = '';
-$warning_msg = '';
-$error_msg = '';
+$job_id = getIntFromRequest('job_id');
 
 if (session_loggedin()) {
 

Modified: trunk/src/www/people/helpwanted-latest.php
===================================================================
--- trunk/src/www/people/helpwanted-latest.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/people/helpwanted-latest.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -32,7 +32,7 @@
 }
 
 $group_id = getIntFromRequest('group_id');
-$job_id = getStringFromRequest('job_id');
+$job_id = getIntFromRequest('job_id');
 
 people_header(array('title'=>_('Help Wanted Latest Posts')));
 

Modified: trunk/src/www/people/viewjob.php
===================================================================
--- trunk/src/www/people/viewjob.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/people/viewjob.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -32,7 +32,7 @@
 }
 
 $group_id = getIntFromRequest('group_id');
-$job_id = getStringFromRequest('job_id');
+$job_id = getIntFromRequest('job_id');
 
 if ($group_id && $job_id) {
 

Modified: trunk/src/www/people/viewprofile.php
===================================================================
--- trunk/src/www/people/viewprofile.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/people/viewprofile.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -34,9 +34,9 @@
 }
 
 $group_id = getIntFromRequest('group_id');
-$job_id = getStringFromRequest('job_id');
+$job_id = getIntFromRequest('job_id');
 
-$user_id = getStringFromRequest('user_id');
+$user_id = getIntFromRequest('user_id');
 if ($user_id && is_numeric($user_id)) {
 
 	/*

Modified: trunk/src/www/pm/task.php
===================================================================
--- trunk/src/www/pm/task.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/pm/task.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -51,8 +51,8 @@
 $hours = getStringFromRequest('hours');
 $start_date = getStringFromRequest('start_date');
 $end_date = getStringFromRequest('end_date');
-$status_id = getStringFromRequest('status_id');
-$category_id = getStringFromRequest('category_id');
+$status_id = getIntFromRequest('status_id');
+$category_id = getIntFromRequest('category_id');
 $percent_complete = getStringFromRequest('percent_complete');
 $assigned_to = getStringFromRequest('assigned_to');
 $new_group_project_id = getIntFromRequest('new_group_project_id');
@@ -117,7 +117,7 @@
 	case 'postaddtask' : {
 		session_require_perm ('pm', $pg->getID(), 'manager') ;
 
-		$add_artifact_id = getStringFromRequest('add_artifact_id');
+		$add_artifact_id = getIntFromRequest('add_artifact_id');
 		
 		$pt = new ProjectTask($pg);
 		if (!$pt || !is_object($pt)) {
@@ -163,7 +163,7 @@
 	case 'postmodtask' : {
 		session_require_perm ('pm', $pg->getID(), 'manager') ;
 
-		$rem_artifact_id = getStringFromRequest('rem_artifact_id');
+		$rem_artifact_id = getIntFromRequest('rem_artifact_id');
 		
 		if(!$rem_artifact_id){
 			$rem_artifact_id=array();
@@ -302,7 +302,7 @@
 	case 'addartifact' : {
 		session_require_perm ('pm', $pg->getID(), 'manager') ;
 
-		$add_artifact_id = getStringFromRequest('add_artifact_id');
+		$add_artifact_id = getIntFromRequest('add_artifact_id');
 		
 		$pt = new ProjectTask($pg,$project_task_id);
 		if (!$pt || !is_object($pt)) {

Modified: trunk/src/www/project/admin/roleedit.php
===================================================================
--- trunk/src/www/project/admin/roleedit.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/project/admin/roleedit.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -32,7 +32,7 @@
 $group_id = getIntFromRequest('group_id');
 session_require_perm ('project_admin', $group_id) ;
 
-$role_id = getStringFromRequest('role_id');
+$role_id = getIntFromRequest('role_id');
 $data = getStringFromRequest('data');
 
 $group = group_get_object($group_id);

Modified: trunk/src/www/reporting/projectact.php
===================================================================
--- trunk/src/www/reporting/projectact.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/projectact.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -34,7 +34,7 @@
 	exit_error($report->getErrorMessage());
 }
 
-$g_id = getStringFromRequest('g_id');
+$g_id = getIntFromRequest('g_id');
 $area = getStringFromRequest('area');
 $SPAN = getIntFromRequest('SPAN', 1);
 $start = getIntFromRequest('start');

Modified: trunk/src/www/reporting/projecttime.php
===================================================================
--- trunk/src/www/reporting/projecttime.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/projecttime.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -35,7 +35,7 @@
 
 $sw = getStringFromRequest('sw');
 $typ = getStringFromRequest('typ');
-$g_id = getStringFromRequest('g_id');
+$g_id = getIntFromRequest('g_id');
 $typ = getStringFromRequest('typ');
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');

Modified: trunk/src/www/reporting/projecttime_graph.php
===================================================================
--- trunk/src/www/reporting/projecttime_graph.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/projecttime_graph.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -31,7 +31,7 @@
 
 session_require_global_perm ('forge_stats', 'read') ;
 
-$g_id = getStringFromRequest('g_id');
+$g_id = getIntFromRequest('g_id');
 $type = getStringFromRequest('type');
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');

Modified: trunk/src/www/reporting/timeadd.php
===================================================================
--- trunk/src/www/reporting/timeadd.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/timeadd.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -94,7 +94,7 @@
 }
 
 if ($week) {
-	$group_project_id = getStringFromRequest('group_project_id');
+	$group_project_id = getIntFromRequest('group_project_id');
 	
 	report_header(_('Time tracking'));
 	

Modified: trunk/src/www/reporting/useract.php
===================================================================
--- trunk/src/www/reporting/useract.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/useract.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -35,7 +35,7 @@
 }
 
 $sw = getStringFromRequest('sw');
-$dev_id = getStringFromRequest('dev_id');
+$dev_id = getIntFromRequest('dev_id');
 $area = getStringFromRequest('area');
 $SPAN = getIntFromRequest('SPAN');
 $start = getIntFromRequest('start');

Modified: trunk/src/www/reporting/useract_graph.php
===================================================================
--- trunk/src/www/reporting/useract_graph.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/useract_graph.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -30,7 +30,7 @@
 
 session_require_global_perm ('forge_stats', 'read') ;
 
-$dev_id = getStringFromRequest('dev_id');
+$dev_id = getIntFromRequest('dev_id');
 $SPAN = getIntFromRequest('SPAN');
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');

Modified: trunk/src/www/reporting/usertime.php
===================================================================
--- trunk/src/www/reporting/usertime.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/usertime.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -38,7 +38,7 @@
 $end = getIntFromRequest('end');
 $sw = getStringFromRequest('sw');
 $typ = getStringFromRequest('typ');
-$dev_id = getStringFromRequest('dev_id');
+$dev_id = getIntFromRequest('dev_id');
 $type = getStringFromRequest('type');
 
 if (!$start) {

Modified: trunk/src/www/reporting/usertime_graph.php
===================================================================
--- trunk/src/www/reporting/usertime_graph.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/reporting/usertime_graph.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -32,7 +32,7 @@
 
 session_require_global_perm ('forge_stats', 'read') ;
 
-$dev_id = getStringFromRequest('dev_id');
+$dev_id = getIntFromRequest('dev_id');
 $type = getStringFromRequest('type');
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');

Modified: trunk/src/www/snippet/addversion.php
===================================================================
--- trunk/src/www/snippet/addversion.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/snippet/addversion.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -48,7 +48,7 @@
 				exit_form_double_submit();
 			}
 
-			$snippet_id = getStringFromRequest('snippet_id');
+			$snippet_id = getIntFromRequest('snippet_id');
 			$changes = getStringFromRequest('changes');
 			$version = getStringFromRequest('version');
 			$code = getStringFromRequest('code');

Modified: trunk/src/www/tracker/admin/updates.php
===================================================================
--- trunk/src/www/tracker/admin/updates.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/tracker/admin/updates.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -269,7 +269,7 @@
 		//	Clone a tracker's elements to this tracker
 		//
 		} elseif (getStringFromRequest('clone_tracker')) {
-			$clone_id = getStringFromRequest('clone_id');
+			$clone_id = getIntFromRequest('clone_id');
 
 			if (!$clone_id) {
 				exit_missing_param('',array(_('Clone ID')),'tracker');

Modified: trunk/src/www/tracker/taskmgr.php
===================================================================
--- trunk/src/www/tracker/taskmgr.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/tracker/taskmgr.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -44,7 +44,7 @@
 	$set = getStringFromRequest('set');
 	$_assigned_to = getStringFromRequest('_assigned_to');
 	$_status = getStringFromRequest('_status');
-	$_category_id = getStringFromRequest('_category_id');
+	$_category_id = getIntFromRequest('_category_id');
 	
 	// $group object is created in tracker.php
 

Modified: trunk/src/www/tracker/tracker.php
===================================================================
--- trunk/src/www/tracker/tracker.php	2010-10-02 14:13:04 UTC (rev 10796)
+++ trunk/src/www/tracker/tracker.php	2010-10-02 15:31:39 UTC (rev 10797)
@@ -165,10 +165,10 @@
 
 		$artifact_id_list = getArrayFromRequest('artifact_id_list');
 		$priority = getStringFromRequest('priority');
-		$status_id = getStringFromRequest('status_id');
-		$category_id = getStringFromRequest('category_id');
-		$artifact_group_id = getStringFromRequest('artifact_group_id');
-		$resolution_id = getStringFromRequest('resolution_id');
+		$status_id = getIntFromRequest('status_id');
+		$category_id = getIntFromRequest('category_id');
+		$artifact_group_id = getIntFromRequest('artifact_group_id');
+		$resolution_id = getIntFromRequest('resolution_id');
 		$assigned_to = getStringFromRequest('assigned_to');
 		$canned_response = getIntFromRequest("canned_response");
 		$extra_fields = getArrayFromRequest('extra_fields');




More information about the Fusionforge-commits mailing list