- The sqllogging variable now determines whether a connection to the database is going to be established or not. To enable or disable sqllogging, comment or uncomment the ENABLE_STAT_TRACKING entry in config/dbconfig.txt.

Fixes issue 793

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4425 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-08-16 00:49:59 +00:00
parent efc0f67199
commit a2b7a485ab

View File

@@ -47,6 +47,8 @@ DBConnection
_db_con = _dm_db_new_con()
proc
Connect(dbi_handler=src.dbi,user_handler=src.user,password_handler=src.password,cursor_handler)
if(!sqllogging)
return 0
if(!src) return 0
cursor_handler = src.default_cursor
if(!cursor_handler) cursor_handler = Default_Cursor
@@ -54,7 +56,10 @@ DBConnection
Disconnect() return _dm_db_close(_db_con)
IsConnected() return _dm_db_is_connected(_db_con)
IsConnected()
if(!sqllogging) return 0
var/success = _dm_db_is_connected(_db_con)
return success
Quote(str) return _dm_db_quote(_db_con,str)