Replace direct mysql_xxx() calls with query_xxx() calls. Replace calls to mysql_insert_id()
with calls specific to the appdb or bugzilla database. Fixes a bug where a call to mysql_insert_id() can potentially retrieve an id from either the bugzilla or appdb database, depending on whichever database was last opened by mysql_connect().
This commit is contained in:
@@ -31,7 +31,7 @@ class Note {
|
||||
{
|
||||
$sQuery = "SELECT * FROM appNotes WHERE noteId = '?'";
|
||||
if($hResult = query_parameters($sQuery, $iNoteId))
|
||||
$oRow = mysql_fetch_object($hResult);
|
||||
$oRow = query_fetch_object($hResult);
|
||||
}
|
||||
|
||||
if($oRow)
|
||||
@@ -64,7 +64,7 @@ class Note {
|
||||
|
||||
if($hResult)
|
||||
{
|
||||
$this->note(mysql_insert_id());
|
||||
$this->note(query_appdb_insert_id());
|
||||
$sWhatChanged = "Description is:\n".$this->shDescription.".\n\n";
|
||||
$this->SendNotificationMail("add", $sWhatChanged);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user