mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 17:07:20 +01:00
Added a null check to HTTPSessionManagerDB, and small cleanups.
This commit is contained in:
parent
b8b51e7525
commit
47ac5e2668
@ -125,11 +125,9 @@ void HTTPSessionManagerDB::save_session(Ref<HTTPSession> session) {
|
||||
while ((k = m->next(k))) {
|
||||
const Variant &val = m->get(*k);
|
||||
|
||||
Variant::Type t = val.get_type();
|
||||
|
||||
// Maybe it should be allowed?
|
||||
// Or maybe when adding stuff to the sessions the method should have a store = true bool, if false skip saving
|
||||
if (t == Variant::OBJECT) {
|
||||
if (val.get_type() == Variant::OBJECT) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -146,6 +144,8 @@ void HTTPSessionManagerDB::load_sessions() {
|
||||
|
||||
Ref<QueryBuilder> b = get_query_builder();
|
||||
|
||||
ERR_FAIL_COND(!b.is_valid());
|
||||
|
||||
b->select("id, session_id");
|
||||
b->from(_database_table_name);
|
||||
// b->print();
|
||||
|
@ -98,7 +98,6 @@ Ref<HTTPSession> HTTPSessionManager::create_session() {
|
||||
}
|
||||
|
||||
void HTTPSessionManager::load_sessions() {
|
||||
clear();
|
||||
}
|
||||
|
||||
void HTTPSessionManager::clear() {
|
||||
|
@ -137,7 +137,6 @@ void register_web_types() {
|
||||
|
||||
#ifdef MODULE_DATABASE_ENABLED
|
||||
ClassDB::register_class<HTTPSessionManagerDB>();
|
||||
|
||||
#endif
|
||||
|
||||
#if TOOLS_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user