we're using an jquery upload plugin added: Item struct has new rows: hash, hash_type, file_size, sort_index added: css mount parameter you can specify css files there, and javascript wysiwyg editors (ckeditor, tinymce) can make use of it changed: post parsers can parse post variables with the same name (a postfix is added in such a case) added: common_dir parameter to the config this is a path to common directory (directory with common static files) it is needed to the 'css' mount parameter git-svn-id: svn://ttmath.org/publicrep/winix/trunk@746 e52654a7-88a9-db11-a3e9-0013d4bc506e
71 lines
1.3 KiB
C++
Executable File
71 lines
1.3 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfile_winix_functions_rm
|
|
#define headerfile_winix_functions_rm
|
|
|
|
#include "functionbase.h"
|
|
|
|
|
|
|
|
namespace Fun
|
|
{
|
|
|
|
|
|
class Rm : public FunctionBase
|
|
{
|
|
public:
|
|
|
|
Rm();
|
|
bool HasAccess();
|
|
void MakePost();
|
|
|
|
void RemoveDir(const Item & dir);
|
|
void RemoveDirContent(const Item & dir);
|
|
void RemoveFileOrSymlink(Item & item);
|
|
|
|
// removing either a directory or a symlink or a file
|
|
void RemoveItemById(long item_id);
|
|
|
|
private:
|
|
|
|
// for deleting content in a directory (files and symlinks)
|
|
DbItemQuery content_dir_iq;
|
|
std::vector<Item> content_item_tab;
|
|
std::wstring path;
|
|
|
|
// for deleting content in a directory (files, symlinks and directories)
|
|
DbItemQuery content_dir_iq2;
|
|
std::vector<Item> content_item_tab2;
|
|
|
|
// for logging
|
|
std::wstring old_url;
|
|
|
|
// for removing an item by id
|
|
DbItemQuery rm_by_id_iq;
|
|
Item rm_by_id_item;
|
|
|
|
bool HasAccess(const Item & item);
|
|
void Prepare();
|
|
void Clear();
|
|
bool RemoveStaticFile(const std::wstring & path);
|
|
void RemoveStaticFile(Item & item);
|
|
void RemoveDirTree(long dir_id);
|
|
void RemoveDirContent();
|
|
void RemoveDir();
|
|
void RemoveFile();
|
|
void CreateJSON(bool status);
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
#endif
|