[Fusionforge-commits] r8193 - in trunk/gforge/plugins: webcalendar/common webcalendar/script wiki/common

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Sep 25 16:03:49 CEST 2009


Author: lolando
Date: 2009-09-25 16:03:49 +0200 (Fri, 25 Sep 2009)
New Revision: 8193

Modified:
   trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php
   trunk/gforge/plugins/webcalendar/script/webcalendar-init.php
   trunk/gforge/plugins/wiki/common/WikiPlugin.class.php
Log:
Fixing PHP syntax errors

Modified: trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php
===================================================================
--- trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php	2009-09-25 13:53:39 UTC (rev 8192)
+++ trunk/gforge/plugins/webcalendar/common/webcalendarPlugin.class.php	2009-09-25 14:03:49 UTC (rev 8193)
@@ -267,7 +267,6 @@
 					db_query_params ('UPDATE webcal_user SET cal_is_admin = $1 WHERE cal_login = $2',
 							 array ($cia,
 								$row_nom_user['user_name']));
-					}
 				}
 
 				if(($row_num[0] != 1 ) && ($row_flags['value'] == 1)){
@@ -307,8 +306,6 @@
 			array ($mail,
 				$row_nom_boss['unix_group_name']));
 				}
-				
-				
 		}
 		elseif ($hookname == "change_cal_permission_default") {
 			$res = db_query_params ('SELECT admin_flags FROM user_group WHERE user_id = $1 AND group_id = $2',
@@ -544,8 +541,8 @@
 				$row_old = db_fetch_array($res_old);
 				
 				//get all the cal_login where you need to change mail
-				$res_all_mail = db_query_params ('SELECT cal_login, cal_email FROM webcal_user WHERE cal_email LIKE '%".$row_old['cal_email']."%'',
-			array ());
+				$res_all_mail = db_query_params ('SELECT cal_login, cal_email FROM webcal_user WHERE lower(cal_email) LIKE $1',
+								 array ("%".$row_old['cal_email']."%"));
 				print $query_all_mail;
 				while($row_all_mail = db_fetch_array($res_all_mail)){
 					$mail = str_replace($row_old['cal_email'],$row_name['email'],$row_all_mail['cal_email']);

Modified: trunk/gforge/plugins/webcalendar/script/webcalendar-init.php
===================================================================
--- trunk/gforge/plugins/webcalendar/script/webcalendar-init.php	2009-09-25 13:53:39 UTC (rev 8192)
+++ trunk/gforge/plugins/webcalendar/script/webcalendar-init.php	2009-09-25 14:03:49 UTC (rev 8193)
@@ -77,13 +77,9 @@
 		}	
 		db_query_params ('UPDATE webcal_user SET cal_email = $1 WHERE cal_login = $2',
 				 array (trim($mail,','),
-					$row2['unix_group_name'])) ;
+					$row2['unix_group_name'])) ;
 	}
-	$cal_res = db_query_params ('INSERT INTO webcal_user (cal_login, cal_passwd, cal_firstname,cal_email) VALUES ($1,$2,$3,$4)',
-			array ($row2['unix_group_name'] ,
-				'qdkqshjddoshd',
-				addslashes($row2['group_name']) ,
-				$row2['email'] )); 
+	$cal_res = db_query("INSERT INTO webcal_user (cal_login, cal_passwd, cal_firstname,cal_email) VALUES ('" . $row2['unix_group_name'] . "','qdkqshjddoshd','" . addslashes($row2['group_name']) . "','" . $row2['email'] . "')"); 
 
 }
 

Modified: trunk/gforge/plugins/wiki/common/WikiPlugin.class.php
===================================================================
--- trunk/gforge/plugins/wiki/common/WikiPlugin.class.php	2009-09-25 13:53:39 UTC (rev 8192)
+++ trunk/gforge/plugins/wiki/common/WikiPlugin.class.php	2009-09-25 14:03:49 UTC (rev 8193)
@@ -203,11 +203,13 @@
 							plugin_wiki_version.versiondata AS versiondata
 						FROM plugin_wiki_page, plugin_wiki_version
 						WHERE plugin_wiki_page.id=plugin_wiki_version.id
-							AND mtime BETWEEN '".$params['begin']."' AND '".$params['end']."'
+							AND mtime BETWEEN $2 AND $3
 							AND minor_edit=0
-							AND substring(plugin_wiki_page.pagename from 0 for $1) = $2
+							AND substring(plugin_wiki_page.pagename from 0 for $1) = $4
 						ORDER BY mtime DESC',
 								 array ($len,
+									$params['begin'],
+									$params['end'],
 									$pat));
 
 					$cache = array();




More information about the Fusionforge-commits mailing list