appdb/include query.php

WineHQ wineowner at wine.codeweavers.com
Wed Jul 19 12:18:16 CDT 2006


ChangeSet ID:	26652
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2006/07/19 12:18:16

Modified files:
	include        : query.php 

Log message:
	Chris Morgan <cmorgan at alum.wpi.edu>
	Swap error logging and addmsg() calls as addmsg() performs a database transaction and will clear out any error that
	we wanted to report when error logging and calling mysql_error()

Patch: http://cvs.winehq.org/patch.py?id=26652

Old revision  New revision  Changes     Path
 1.4           1.5           +2 -2       appdb/include/query.php

Index: appdb/include/query.php
diff -u -p appdb/include/query.php:1.4 appdb/include/query.php:1.5
--- appdb/include/query.php:1.4	19 Jul 2006 17:18:16 -0000
+++ appdb/include/query.php	19 Jul 2006 17:18:16 -0000
@@ -113,10 +113,10 @@ function query_bugzilladb($sQuery,$sComm
 
 function query_error($sQuery, $sComment="")
 {
+    error_log::log_error(ERROR_SQL, "Query: '".$sQuery."' mysql_error(): '".mysql_error()."' comment: '".$sComment."'");
+
     $sStatusMessage = "<p><b>An internal error has occurred and has been logged and reported to appdb admins</b></p>";
     addmsg($sStatusMessage);
-
-    error_log::log_error(ERROR_SQL, "Query: '".$sQuery."' mysql_error(): '".mysql_error()."' comment: '".$sComment."'");
 }
 
 ?>



More information about the wine-cvs mailing list