mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Adds a proc to check if the current thread is from an admin advanced proc call (#26191)
* Admin proc call guards * Adds a db warning * Better this way * leftover * )= * Fix * Wew * Better runtime handling * Make callback use it if var_edited
This commit is contained in:
committed by
duncathan salt
parent
d4f72b49dd
commit
6a9fa3d35a
@@ -99,7 +99,10 @@ DBConnection/proc/SelectDB(database_name,dbi)
|
||||
if(IsConnected()) Disconnect()
|
||||
//return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[DB_SERVER]:[DB_PORT]"]",user,password)
|
||||
return Connect("[dbi?"[dbi]":"dbi:mysql:[database_name]:[global.sqladdress]:[global.sqlport]"]",user,password)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor) return new/DBQuery(sql_query,src,cursor_handler)
|
||||
DBConnection/proc/NewQuery(sql_query,cursor_handler=src.default_cursor)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
log_admin_private("WARNING: Advanced admin proc call DB query created!: [sql_query]")
|
||||
return new/DBQuery(sql_query,src,cursor_handler)
|
||||
|
||||
|
||||
DBQuery/New(sql_query,DBConnection/connection_handler,cursor_handler)
|
||||
|
||||
Reference in New Issue
Block a user