mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-15 18:06:48 +01:00
Generalizing establish_db_connection() and setup_database_connection()
Both procs are now generalized, and accept a DBConnection object as an argument. Due to this generalization, all instances of `establish_db_connection()` must be renamed to `establish_db_connection(dbcon)`. Also added variable `failed_connections` to the definition of DBConnection.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
else
|
||||
query_details[":a_ckey"] = user.ckey
|
||||
|
||||
establish_db_connection()
|
||||
establish_db_connection(dbcon)
|
||||
if (!dbcon.IsConnected())
|
||||
alert("SQL connection failed while trying to add a note!")
|
||||
return
|
||||
@@ -36,7 +36,7 @@
|
||||
if (!note_id || !note_edit)
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
establish_db_connection(dbcon)
|
||||
if (!dbcon.IsConnected())
|
||||
error("SQL connection failed while attempting to delete a note!")
|
||||
return
|
||||
@@ -93,7 +93,7 @@
|
||||
player_ckey = ckey(player_ckey)
|
||||
admin_ckey = ckey(admin_ckey)
|
||||
|
||||
establish_db_connection()
|
||||
establish_db_connection(dbcon)
|
||||
if (!dbcon.IsConnected())
|
||||
error("SQL connection failed while attempting to view a player's notes!")
|
||||
return
|
||||
@@ -187,7 +187,7 @@
|
||||
if (!ckey)
|
||||
return "No ckey given!"
|
||||
|
||||
establish_db_connection()
|
||||
establish_db_connection(dbcon)
|
||||
|
||||
if (!dbcon.IsConnected())
|
||||
return "Unable to establish database connection! Aborting!"
|
||||
@@ -231,7 +231,7 @@
|
||||
note_list >> note_keys
|
||||
|
||||
msg_scopes("Establishing DB connection!")
|
||||
establish_db_connection()
|
||||
establish_db_connection(dbcon)
|
||||
if(!dbcon.IsConnected())
|
||||
msg_scopes("No DB connection!")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user