the first part of reimplementing has been done

now we have app object and singletons are only: log logn plugin and app



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@628 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-08-10 16:12:50 +00:00
parent 6897192364
commit 217cf1420b
191 changed files with 9529 additions and 7250 deletions

View File

@@ -19,16 +19,19 @@
#include "session.h"
#include "item.h"
#include "error.h"
#include "function.h"
#include "thread.h"
#include "compress.h"
#include "acceptencodingparser.h"
#include "htmlfilter.h"
#include "postmultiparser.h"
#include "ticket.h"
#include "config.h"
class FunctionBase;
struct Request
{
// request id
@@ -87,7 +90,7 @@ struct Request
Item item;
// null if there is no a function
Function * pfunction;
FunctionBase * pfunction;
// parameters (name:value)
ParamTable param_table;
@@ -149,37 +152,12 @@ struct Request
void SendAll();
void SendNotify();
bool CanChangeUser(const Item & item, long new_user_id);
bool CanChangeGroup(const Item & item, long new_group_id);
bool CanChangePrivileges(const Item & item, int new_priv);
bool HasAccess(const Item & item, int mask);
bool HasReadAccess(const Item & item);
bool HasWriteAccess(const Item & item);
bool HasReadWriteAccess(const Item & item);
bool HasReadExecAccess(const Item & item);
bool HasReadExecAccessForRoot(const Item & item);
bool HasReadExecAccessToPath(long dir_id);
bool CanCreateThread(bool check_root = false);
bool CanCreateTicket(bool check_root = false);
bool CanEditTicket();
bool CanRemove(const Item & item);
bool CanUseEmacs(const Item & item, bool check_root = false);
bool CanUseMkdir(const Item & item, bool check_root = false);
bool CanUseUpload(const Item & item, bool check_root = false);
bool CanUseHtml(long user_id);
bool CanUseBBCode(long user_id);
bool CanUseRaw(long user_id);
bool MakePathSimpleFs(std::string & path, long dir_id, bool create_dir = false);
bool MakePathHashFs(std::string & path, long id, bool create_dir = false);
bool MakePath(const Item & item, std::string & path, bool create_dir = false);
bool MakePath(Item & item, bool create_dir = false);
void SetConfig(Config * pconfig);
private:
Config * config;
enum Header
{
h_200,
@@ -204,6 +182,7 @@ private:
// used in ParamValue(const char * param_name) when there is no such a param
const std::string str_empty;
PostMultiParser post_multi_parser;
const char * SetEnvVar(const char * var);
@@ -221,7 +200,7 @@ private:
extern Request request;