added: now plugin ticket uses a new horizontal table (plugins.ticket)
columns: dir_id, param, value we are able to build complicated tickets git-svn-id: svn://ttmath.org/publicrep/winix/trunk@664 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -47,6 +47,7 @@ public:
|
||||
void SetTDb(TDb * ptdb);
|
||||
void SetDb(Db * pdb);
|
||||
void SetSystem(System * psystem);
|
||||
void SetRequest(Request * prequest);
|
||||
|
||||
void Clear();
|
||||
void ReadTicket(long dir_id);
|
||||
@@ -61,7 +62,14 @@ public:
|
||||
typedef std::map<long, TicketConfWrap> ConfTab;
|
||||
ConfTab conf_tab;
|
||||
|
||||
// used by templates
|
||||
// will not be null
|
||||
const TicketConfWrap * cur_conf_wrap;
|
||||
const TicketConf * cur_conf;
|
||||
|
||||
// default: "progress"
|
||||
// can be set in config in option: ticket_form_progress_prefix
|
||||
std::string progress_prefix;
|
||||
|
||||
int mount_type_ticket;
|
||||
|
||||
@@ -82,17 +90,26 @@ public:
|
||||
int mount_par_createticket_on;
|
||||
|
||||
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();
|
||||
|
||||
private:
|
||||
TDb * tdb;
|
||||
Db * db;
|
||||
System * system;
|
||||
Request * request;
|
||||
TicketParser ticket_parser;
|
||||
Item item_conf;
|
||||
std::string path_dir;
|
||||
std::string path_file;
|
||||
|
||||
// for cur_conf_wrap and cur_conf
|
||||
const TicketConfWrap cur_conf_wrap_empty;
|
||||
const TicketConf cur_conf_empty;
|
||||
|
||||
|
||||
static bool SortTicketsFun(const Ticket & t1, const Ticket & t2);
|
||||
bool GetConfContent(const std::string & path);
|
||||
bool ParseTicketConf(long mount_dir_id, const std::string & path);
|
||||
|
Reference in New Issue
Block a user