[Fusionforge-commits] r9276 - trunk/gforge/common/system_event
Christian Bayle
cbayle at libremir.placard.fr.eu.org
Mon Mar 29 13:19:43 CEST 2010
Author: cbayle
Date: 2010-03-29 13:19:42 +0200 (Mon, 29 Mar 2010)
New Revision: 9276
Modified:
trunk/gforge/common/system_event/SystemEventManager.class.php
Log:
Make use of db_query_params
Modified: trunk/gforge/common/system_event/SystemEventManager.class.php
===================================================================
--- trunk/gforge/common/system_event/SystemEventManager.class.php 2010-03-29 09:13:14 UTC (rev 9275)
+++ trunk/gforge/common/system_event/SystemEventManager.class.php 2010-03-29 11:19:42 UTC (rev 9276)
@@ -50,8 +50,12 @@
* Create a new event, store it in the db and send notifications
*/
public function createEvent($type, $parameters, $priority) {
- $sql = "INSERT INTO system_event (type, parameters,create_date,log) VALUES ('".$type."','".$parameters['group_list_id']."','".$_SERVER['REQUEST_TIME']."', 'NEW');";
- return db_query($sql);
+ return db_query_params('INSERT INTO system_event (type, parameters,create_date,log) VALUES ($1,$2,$3,$4)',
+ array($type,
+ $parameters['group_list_id'],
+ $_SERVER['REQUEST_TIME'],
+ 'NEW')
+ );
}
More information about the Fusionforge-commits
mailing list