[Fusionforge-commits] r7876 - in trunk/gforge/www/survey: . admin

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Jun 19 15:00:03 CEST 2009


Author: lolando
Date: 2009-06-19 15:00:02 +0200 (Fri, 19 Jun 2009)
New Revision: 7876

Modified:
   trunk/gforge/www/survey/admin/edit_survey.php
   trunk/gforge/www/survey/admin/show_questions.php
   trunk/gforge/www/survey/admin/show_results_individual.php
   trunk/gforge/www/survey/rating_resp.php
Log:
Semi-automated db_query_params() transition for simple cases

Modified: trunk/gforge/www/survey/admin/edit_survey.php
===================================================================
--- trunk/gforge/www/survey/admin/edit_survey.php	2009-06-19 12:59:52 UTC (rev 7875)
+++ trunk/gforge/www/survey/admin/edit_survey.php	2009-06-19 13:00:02 UTC (rev 7876)
@@ -63,8 +63,8 @@
 		} else {
 			$is_active = 0;
 		}
-		$sql="UPDATE surveys SET survey_title='".htmlspecialchars($survey_title)."', survey_questions='$survey_questions', is_active='$is_active' ".
-			 "WHERE survey_id='$survey_id' AND group_id='$group_id'";
+		$sql="UPDATE surveys SET survey_title='".htmlspecialchars($survey_title)."', survey_questions='$survey_questions', is_active='$is_active' 
+WHERE survey_id='$survey_id' AND group_id='$group_id'";
 		$result=db_query($sql);
 		if (db_affected_rows($result) < 1) {
 			$feedback .= _('UPDATE FAILED');

Modified: trunk/gforge/www/survey/admin/show_questions.php
===================================================================
--- trunk/gforge/www/survey/admin/show_questions.php	2009-06-19 12:59:52 UTC (rev 7875)
+++ trunk/gforge/www/survey/admin/show_questions.php	2009-06-19 13:00:02 UTC (rev 7876)
@@ -79,9 +79,9 @@
 	Select this survey from the database
 */
 
-$sql="SELECT survey_questions.question_id,survey_questions.question,survey_question_types.type ".
-	"FROM survey_questions,survey_question_types ".
-	"WHERE survey_question_types.id=survey_questions.question_type AND survey_questions.group_id='$group_id' ORDER BY survey_questions.question_id DESC";
+$sql="SELECT survey_questions.question_id,survey_questions.question,survey_question_types.type 
+FROM survey_questions,survey_question_types 
+WHERE survey_question_types.id=survey_questions.question_type AND survey_questions.group_id='$group_id' ORDER BY survey_questions.question_id DESC";
 
 $result=db_query($sql);
 

Modified: trunk/gforge/www/survey/admin/show_results_individual.php
===================================================================
--- trunk/gforge/www/survey/admin/show_results_individual.php	2009-06-19 12:59:52 UTC (rev 7875)
+++ trunk/gforge/www/survey/admin/show_results_individual.php	2009-06-19 13:00:02 UTC (rev 7876)
@@ -90,9 +90,9 @@
 		Build the questions on the HTML form
 	*/
 
-	$sql="select questions.question_type,questions.question,questions.question_id,responses.response ".
-		"from questions,responses where questions.question_id='".$quest_array[$i]."' and ".
-		"questions.question_id=responses.question_id and responses.customer_id='$customer_id' AND responses.survey_id='$survey_id'";
+	$sql="select questions.question_type,questions.question,questions.question_id,responses.response 
+from questions,responses where questions.question_id='".$quest_array[$i]."' and 
+questions.question_id=responses.question_id and responses.customer_id='$customer_id' AND responses.survey_id='$survey_id'";
 
 	$result=db_query($sql);
 

Modified: trunk/gforge/www/survey/rating_resp.php
===================================================================
--- trunk/gforge/www/survey/rating_resp.php	2009-06-19 12:59:52 UTC (rev 7875)
+++ trunk/gforge/www/survey/rating_resp.php	2009-06-19 13:00:02 UTC (rev 7876)
@@ -56,8 +56,8 @@
 		} else {
 			$feedback .= _('Vote registered');
 			echo "<h2>"._('Vote registered')."</h2>";
-			echo "<a href=\"javascript:history.back()\"><strong>"._('Click to return to previous page')."</strong></a>".
-				"<p>"._('If you vote again, your old vote will be erased.')."</p>";
+			echo "<a href=\"javascript:history.back()\"><strong>"._('Click to return to previous page')."</strong></a>
+<p>"._('If you vote again, your old vote will be erased.')."</p>";
 		}
 	} else {
 		echo "<h1>"._('ERROR!!! MISSING PARAMS')."</h1>";




More information about the Fusionforge-commits mailing list