[Fusionforge-commits] r7866 - trunk/gforge/www/my

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


Author: lolando
Date: 2009-06-19 11:56:15 +0200 (Fri, 19 Jun 2009)
New Revision: 7866

Modified:
   trunk/gforge/www/my/diary.php
   trunk/gforge/www/my/index.php
Log:
Semi-automated preparatory work for db_query_params() transition

Modified: trunk/gforge/www/my/diary.php
===================================================================
--- trunk/gforge/www/my/diary.php	2009-06-19 09:56:05 UTC (rev 7865)
+++ trunk/gforge/www/my/diary.php	2009-06-19 09:56:15 UTC (rev 7866)
@@ -64,17 +64,17 @@
 		} else if (getStringFromRequest('add')) {
 			//inserting a new diary entry
 
-			$sql="INSERT INTO user_diary (user_id,date_posted,summary,details,is_public) VALUES ".
-			"('". user_getid() ."','". time() ."','". htmlspecialchars($summary) ."','". htmlspecialchars($details) ."','$is_public')";
+			$sql="INSERT INTO user_diary (user_id,date_posted,summary,details,is_public) VALUES 
+('". user_getid() ."','". time() ."','". htmlspecialchars($summary) ."','". htmlspecialchars($details) ."','$is_public')";
 			$res=db_query($sql);
 			if ($res && db_affected_rows($res) > 0) {
 				$feedback .= _('Item Added');
 				if ($is_public) {
 
 					//send an email if users are monitoring
-					$sql="SELECT users.email from user_diary_monitor,users ".
-					"WHERE user_diary_monitor.user_id=users.user_id ".
-					"AND user_diary_monitor.monitored_user='". user_getid() ."'";
+					$sql="SELECT users.email from user_diary_monitor,users 
+WHERE user_diary_monitor.user_id=users.user_id 
+AND user_diary_monitor.monitored_user='". user_getid() ."'";
 
 					$result=db_query($sql);
 					$rows=db_numrows($result);

Modified: trunk/gforge/www/my/index.php
===================================================================
--- trunk/gforge/www/my/index.php	2009-06-19 09:56:05 UTC (rev 7865)
+++ trunk/gforge/www/my/index.php	2009-06-19 09:56:15 UTC (rev 7866)
@@ -327,11 +327,11 @@
 		$order_name_arr[]=_('Monitored FileModules');
 		echo $HTML->listTableTop($order_name_arr,'',$tabcnt);
 
-		$sql="SELECT groups.group_name,groups.unix_group_name,groups.group_id,frs_package.name,filemodule_monitor.filemodule_id ".
-			"FROM groups,filemodule_monitor,frs_package ".
-			"WHERE groups.group_id=frs_package.group_id AND groups.status = 'A' ".
-			"AND frs_package.package_id=filemodule_monitor.filemodule_id ".
-			"AND filemodule_monitor.user_id='".user_getid()."' ORDER BY group_name DESC";
+		$sql="SELECT groups.group_name,groups.unix_group_name,groups.group_id,frs_package.name,filemodule_monitor.filemodule_id 
+FROM groups,filemodule_monitor,frs_package 
+WHERE groups.group_id=frs_package.group_id AND groups.status = 'A' 
+AND frs_package.package_id=filemodule_monitor.filemodule_id 
+AND filemodule_monitor.user_id='".user_getid()."' ORDER BY group_name DESC";
 		$result=db_query($sql);
 		$rows=db_numrows($result);
 		if (!$result || $rows < 1) {




More information about the Fusionforge-commits mailing list