added: TextStream<> DbTextStream<> and HtmlTextStream<> have operator<<(Space&) now
added: to db: bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single)
added: environment variables for users
User::env (of type Space) and
User::aenv (of type Space) for admin variables (can be changed only by a super user)
added: winix function 'env'
for changing User::env and User::aenv ('env' winix function with a 'a' parameter)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@790 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
53
functions/env.h
Executable file
53
functions/env.h
Executable file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_functions_env
|
||||
#define headerfile_winix_functions_env
|
||||
|
||||
#include "functionbase.h"
|
||||
#include "core/confparser.h"
|
||||
|
||||
|
||||
namespace Fun
|
||||
{
|
||||
|
||||
|
||||
class Env : public FunctionBase
|
||||
{
|
||||
public:
|
||||
|
||||
Env();
|
||||
|
||||
bool EditAdminEnv(long user_id, const std::wstring & env_str);
|
||||
bool EditEnv(long user_id, const std::wstring & env_str);
|
||||
|
||||
bool HasAccess();
|
||||
void MakePost();
|
||||
|
||||
// used mainly by templates
|
||||
// can return a null pointer
|
||||
User * GetUser();
|
||||
|
||||
private:
|
||||
|
||||
ConfParser conf_parser;
|
||||
Space space;
|
||||
User * puser;
|
||||
size_t req_id;
|
||||
|
||||
bool Parse(const std::wstring & env_str);
|
||||
void SaveEnv();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user