we can create links (hard links, symbolic links) now
added winix functions: ln winix function 'default' can be used without redirecting now added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles now tickets are combined with files added winix functions: showtickets fixed mountpoints: when the default root mount was created its parameter table was empty and it caused accessing to a non-existing objects fixed logger: modifiers (log1, log2, log3) were incorrectly treated added modifier: log4 (debug info) now we are moving threads to a new plugin 'thread' created directory: plugins/thread (not finished yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
#include "ticketparser.h"
|
||||
#include "core/item.h"
|
||||
#include "core/system.h"
|
||||
#include "functions/functions.h"
|
||||
#include "db/db.h"
|
||||
#include "tdb.h"
|
||||
|
||||
|
||||
|
||||
namespace Ticket
|
||||
{
|
||||
|
||||
@@ -46,48 +46,42 @@ public:
|
||||
|
||||
void SetTDb(TDb * ptdb);
|
||||
void SetDb(Db * pdb);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetSystem(System * psystem);
|
||||
void SetRequest(Request * prequest);
|
||||
void SetFunctions(Functions * pfunctions);
|
||||
|
||||
void Clear();
|
||||
void ReadTicket(long dir_id);
|
||||
void SortTickets();
|
||||
|
||||
Item item;
|
||||
bool is_ticket;
|
||||
Ticket ticket;
|
||||
// current ticket for templates
|
||||
const Ticket * ticket;
|
||||
|
||||
// for displaying all tickets in a directory
|
||||
std::vector<Item> item_tab;
|
||||
std::vector<Ticket> ticket_tab;
|
||||
|
||||
std::vector<Item*> item_sort_tab;
|
||||
|
||||
|
||||
// <dir_id, TicketConfWrap>
|
||||
typedef std::map<long, TicketConfWrap> ConfTab;
|
||||
ConfTab conf_tab;
|
||||
|
||||
// used by templates
|
||||
// will not be null
|
||||
// current ticket config
|
||||
// will be set by FindCurrentConf()
|
||||
const TicketConfWrap * cur_conf_wrap;
|
||||
const TicketConf * cur_conf;
|
||||
const TicketConf * cur_conf;
|
||||
|
||||
// default: "progress"
|
||||
// can be set in config in option: ticket_form_progress_prefix
|
||||
std::wstring progress_prefix;
|
||||
|
||||
int mount_type_ticket;
|
||||
// ticket plugin id
|
||||
int plugin_id;
|
||||
|
||||
int mount_par_ticket;
|
||||
|
||||
int mount_type_ticket;
|
||||
int mount_par_ticket_conf;
|
||||
|
||||
int mount_par_ticket_type;
|
||||
int mount_par_ticket_type_default;
|
||||
int mount_par_ticket_status;
|
||||
int mount_par_ticket_status_default;
|
||||
int mount_par_ticket_priority;
|
||||
int mount_par_ticket_priority_default;
|
||||
int mount_par_ticket_category;
|
||||
int mount_par_ticket_category_default;
|
||||
int mount_par_ticket_expected;
|
||||
int mount_par_ticket_expected_default;
|
||||
|
||||
int mount_par_createticket_on;
|
||||
|
||||
// template index for notifications
|
||||
size_t template_index;
|
||||
@@ -95,32 +89,47 @@ public:
|
||||
|
||||
void ReadTicketConf(bool skip_existing_configs = false);
|
||||
void FindCurrentConf();
|
||||
bool CheckMinMaxValue(const TicketConf::TicketItem & ticket_item, Ticket::TicketParam & par);
|
||||
bool CheckMinMaxValue(Ticket::TicketParam & par);
|
||||
void ReadTicketParams();
|
||||
void CheckMinMaxValue(const TicketConf::TicketItem & conf_item, Ticket::TicketParam & par);
|
||||
void ReadTicketParams(Ticket & ticket, bool clear_ticket = true, std::vector<long> * file_map = 0);
|
||||
|
||||
private:
|
||||
TDb * tdb;
|
||||
Db * db;
|
||||
System * system;
|
||||
Request * request;
|
||||
|
||||
Db * db;
|
||||
TDb * tdb;
|
||||
Config * config;
|
||||
System * system;
|
||||
Request * request;
|
||||
Functions * functions;
|
||||
|
||||
// for reading parameters
|
||||
Ticket::TicketParam ticket_param;
|
||||
|
||||
// for adding a new image/file to a ticket
|
||||
Item file;
|
||||
|
||||
// for reading config file
|
||||
TicketParser ticket_parser;
|
||||
Item item_conf;
|
||||
std::wstring path_dir;
|
||||
std::wstring path_file;
|
||||
std::vector<Item*> config_dir_tab;
|
||||
Item config_file;
|
||||
|
||||
// for cur_conf_wrap and cur_conf
|
||||
// for Clearing
|
||||
// (we don't want to use empty pointers)
|
||||
const TicketConfWrap cur_conf_wrap_empty;
|
||||
const TicketConf cur_conf_empty;
|
||||
const TicketConf cur_conf_empty;
|
||||
const Ticket ticket_empty;
|
||||
|
||||
|
||||
static bool SortTicketsFun(const Ticket & t1, const Ticket & t2);
|
||||
bool GetConfContent(const std::wstring & path);
|
||||
bool ParseTicketConf(long mount_dir_id, const std::wstring & path);
|
||||
void ReadTicketConf(Mounts & mounts, bool skip_existing_configs);
|
||||
void MarkAllConfToDelete();
|
||||
void DeleteAllMarkedConf();
|
||||
|
||||
|
||||
bool ReadTicketValue(const TicketConf::TicketItem & conf_item, Ticket::TicketParam & par, const std::wstring & value);
|
||||
bool ReadTicketValue(const TicketConf::TicketItem & conf_item, Ticket::TicketParam & par, const PostFile & value, std::vector<long> * file_map);
|
||||
void ReadTicketParam(Ticket & ticket, int param_id, const std::wstring & value);
|
||||
void ReadTicketParam(Ticket & ticket, int param_id, const PostFile & value, std::vector<long> * file_map);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user