Merge pull request #6653 from zekesulastin/disable-stat-tracking

Changes DBCore connection procs to check for config value SQL_ENABLED instead of ENABLE_STAT_TRACKING
This commit is contained in:
Atermonera
2020-02-03 17:48:44 -08:00
committed by VirgoBot
parent 132187b089
commit 67889b8f99

View File

@@ -56,7 +56,7 @@ DBConnection/New(dbi_handler,username,password_handler,cursor_handler)
_db_con = _dm_db_new_con()
DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
if(!sqllogging)
if(!config.sql_enabled)
return 0
if(!src) return 0
cursor_handler = src.default_cursor
@@ -66,7 +66,7 @@ DBConnection/proc/Connect(dbi_handler=src.dbi,user_handler=src.user,password_han
DBConnection/proc/Disconnect() return _dm_db_close(_db_con)
DBConnection/proc/IsConnected()
if(!sqllogging) return 0
if(!config.sql_enabled) return 0
var/success = _dm_db_is_connected(_db_con)
return success