From 3d5e5795a077743f98ef19bdbb9c5a29cc34c917 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 21 Nov 2021 14:41:40 +0100 Subject: [PATCH] Renamed and cleaned up the wep app class to WPApplication. --- HEADS | 2 +- app/ccms_application.cpp | 282 --------------------------------------- app/ccms_application.h | 56 -------- app/wp_application.cpp | 112 ++++++++++++++++ app/wp_application.h | 34 +++++ 5 files changed, 147 insertions(+), 339 deletions(-) delete mode 100644 app/ccms_application.cpp delete mode 100644 app/ccms_application.h create mode 100644 app/wp_application.cpp create mode 100644 app/wp_application.h diff --git a/HEADS b/HEADS index 3b8f12a..67a29d8 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"master": "e32593da4c31a550d755623b0566d0a0908a3bce"}} \ No newline at end of file +{"engine": {"master": "557c2a3934fda8bcc76be3bde525bead5adcaead"}} \ No newline at end of file diff --git a/app/ccms_application.cpp b/app/ccms_application.cpp deleted file mode 100644 index 4cf89ae..0000000 --- a/app/ccms_application.cpp +++ /dev/null @@ -1,282 +0,0 @@ -#include "ccms_application.h" - -#include "core/http/request.h" - -#include - -#include "core/file_cache.h" - -#include "core/http/handler_instance.h" - -#include "core/database/database_manager.h" - -#include "core/html/html_builder.h" -#include "core/http/http_session.h" -#include "core/http/session_manager.h" - -#include "modules/users/user.h" -//#include "modules/users/user_controller.h" -#include "modules/rbac_users/rbac_user_controller.h" - -#include "modules/admin_panel/admin_panel.h" -#include "modules/rbac/rbac_controller.h" -#include "modules/rbac/rbac_model.h" - -bool CCMSApplication::is_logged_in(Request *request) { - if (!request->session) { - return false; - } - - Ref u = request->reference_data["user"]; - - return u.is_valid(); -} - -void CCMSApplication::index(Object *instance, Request *request) { - add_menu(request, MENUENTRY_NEWS); - - /* - - - - - 2): ?> - - - - - - - - - - - */ - - //dynamic_cast(instance)->index(request); - request->body += "test"; - request->compile_and_send_body(); -} - -void CCMSApplication::session_middleware_func(Object *instance, Request *request) { -} - -void CCMSApplication::add_menu(Request *request, const MenuEntries index) { - request->head += menu_head; - - HTMLBuilder b; - - HTMLTag *t; - - /* - -