renamed: WinixModel -> WinixModelDeprecated (this class will be removed)

added: WinixModel (models/winixmodel.h|cpp) - a class inheriting from morm::WinixModel, we have methods such as: get_config(), get_logger(), get_request()
       and this class will be a base class for our models
added: WinixModelConnector (models/winixmodelconnector.h|cpp) - a class inheriting from morm::WinixModelConnector
       this connector we are using instead of morm::ModelConnector - there are pointers to winix objects there (config, request, log)
added to Request: Ezc::Models models
removed from TemplatesFunctions: Ezc::Models ezc_models;
changed: ImgCrop winix functions is using its own item_tab vector now (not finished yet)
added: Item::is(), Item::link(), ItemContent::print_content()
This commit is contained in:
2021-06-16 18:07:44 +02:00
parent 9688b1a26a
commit 6dddc5e948
63 changed files with 654 additions and 225 deletions

View File

@@ -41,7 +41,7 @@
#include "edb.h"
#include "message.h"
#include "exportthread.h"
#include "core/winixmodel.h"
#include "core/winixmodeldeprecated.h"
@@ -52,7 +52,7 @@ namespace Export
{
class ExportInfo : public WinixModel
class ExportInfo : public WinixModelDeprecated
{
public:

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2010-2018, Tomasz Sowa
* Copyright (c) 2010-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@
#include <map>
#include <fstream>
#include "core/config.h"
#include "core/winixmodel.h"
#include "core/winixmodeldeprecated.h"
namespace Winix
@@ -50,7 +50,7 @@ namespace Stats
struct Stats : public WinixModel
struct Stats : public WinixModelDeprecated
{
Stats();

View File

@@ -183,7 +183,7 @@ void thread_sort_tab_print_content(Info & i)
std::wstring & content = thread_info.item_sort_tab[item_sort_index]->item_content.content_raw;
ItemContent::ContentType type = thread_info.item_sort_tab[item_sort_index]->item_content.content_raw_type;
item_print_content(i.out, content, type);
ItemContent::print_content(i.out, content, type, config->html_filter);
}
@@ -354,11 +354,11 @@ void thread_sort_tab_run(Info & i)
Ezc::Pattern * p = pattern_cacher.GetPattern(*thread_info.item_sort_tab[item_sort_index]);
item_run_content.Clear();
InitGenerator(ezc_generator);
InitGenerator(ezc_generator, cur->request->models);
ezc_generator.SetPattern(*p);
ezc_generator.Generate(item_run_content);
item_print_content(i.out, item_run_content.Str(), thread_info.item_sort_tab[item_sort_index]->item_content.content_raw_type);
ItemContent::print_content(i.out, item_run_content.Str(), thread_info.item_sort_tab[item_sort_index]->item_content.content_raw_type, config->html_filter);
}
else
{

View File

@@ -40,7 +40,7 @@
#include "db/db.h"
#include "thread.h"
#include "tdb.h"
#include "core/winixmodel.h"
#include "core/winixmodeldeprecated.h"
#include "models/item.h"
@@ -52,7 +52,7 @@ namespace Winix
namespace Thread
{
class ThreadInfo : public WinixModel
class ThreadInfo : public WinixModelDeprecated
{
public:

View File

@@ -42,7 +42,7 @@
#include "db/db.h"
#include "tdb.h"
#include "space/spaceparser.h"
#include "core/winixmodel.h"
#include "core/winixmodeldeprecated.h"
#include "models/item.h"
@@ -67,7 +67,7 @@ struct TicketConfWrap
};
class TicketInfo : public WinixModel
class TicketInfo : public WinixModelDeprecated
{
public: