added: to mount points: file systems
we have two file systems now: - simplefs - the files stored on the hard drive have the same structure as in the database (dir1/dir2/file) - hashfs - files are stored in special directories extented: the mountparser can read file system added: function download this is a default function for items which have static content git-svn-id: svn://ttmath.org/publicrep/winix/trunk@588 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -168,6 +168,15 @@ ticket.o: ../core/done.h ../core/thread.h ../core/compress.h
|
||||
ticket.o: ../core/acceptencodingparser.h ../core/acceptbaseparser.h
|
||||
ticket.o: ../core/htmlfilter.h ../core/postmultiparser.h ../core/ticket.h
|
||||
ticket.o: ../core/misc.h
|
||||
upload.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
|
||||
upload.o: ../core/locale.h ../confparser/confparser.h ckeditorgetparser.h
|
||||
upload.o: ../core/httpsimpleparser.h ../core/log.h ../core/request.h
|
||||
upload.o: ../core/requesttypes.h ../core/session.h ../core/done.h
|
||||
upload.o: ../core/item.h ../core/error.h ../core/log.h ../core/user.h
|
||||
upload.o: ../core/rebus.h ../core/function.h ../core/thread.h
|
||||
upload.o: ../core/compress.h ../core/acceptencodingparser.h
|
||||
upload.o: ../core/acceptbaseparser.h ../core/htmlfilter.h
|
||||
upload.o: ../core/postmultiparser.h ../core/ticket.h
|
||||
uptime.o: templates.h patterncacher.h ../core/item.h misc.h localefilter.h
|
||||
uptime.o: ../core/locale.h ../confparser/confparser.h ckeditorgetparser.h
|
||||
uptime.o: ../core/httpsimpleparser.h ../core/log.h ../core/data.h
|
||||
|
@@ -1 +1 @@
|
||||
o = dir.o doc.o done.o item.o last.o localefilter.o ls.o misc.o mount.o patterncacher.o priv.o rebus.o sys.o templates.o thread.o ticket.o uptime.o user.o who.o winix.o
|
||||
o = dir.o doc.o done.o item.o last.o localefilter.o ls.o misc.o mount.o patterncacher.o priv.o rebus.o sys.o templates.o thread.o ticket.o upload.o uptime.o user.o who.o winix.o
|
||||
|
@@ -166,12 +166,6 @@ void item_link(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_link_static_auth(Info & i)
|
||||
{
|
||||
HtmlEscape(i.out, data.base_url_static_auth);
|
||||
item_dir(i);
|
||||
item_url(i);
|
||||
}
|
||||
|
||||
|
||||
void item_static_auth_is_none(Info & i)
|
||||
@@ -186,12 +180,6 @@ void item_static_auth_is_image(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_static_auth_is_other(Info & i)
|
||||
{
|
||||
i.result = request.item.static_auth == Item::static_other;
|
||||
}
|
||||
|
||||
|
||||
void item_can_read(Info & i)
|
||||
{
|
||||
i.result = request.HasReadAccess(request.item);
|
||||
|
@@ -17,7 +17,7 @@ namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
static size_t ls_ckeditor_reqid = 0;
|
||||
|
||||
static int ls_ckeditor_funnum = 0;
|
||||
|
||||
|
||||
|
||||
@@ -33,9 +33,11 @@ void ls_ckeditor_funnum_browse(Info & i)
|
||||
const char * str = request.param_table[request.param_table.size()-1]->c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
}
|
||||
|
||||
ls_ckeditor_funnum = ckeditor_getparser.fun_num;
|
||||
}
|
||||
|
||||
i.out << ckeditor_getparser.fun_num;
|
||||
i.out << ls_ckeditor_funnum;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -198,10 +198,8 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("item_url", item_url);
|
||||
functions.Insert("item_url_is", item_url_is);
|
||||
functions.Insert("item_link", item_link);
|
||||
functions.Insert("item_link_static_auth", item_link_static_auth);
|
||||
functions.Insert("item_static_auth_is_none", item_static_auth_is_none);
|
||||
functions.Insert("item_static_auth_is_image", item_static_auth_is_image);
|
||||
functions.Insert("item_static_auth_is_other", item_static_auth_is_other);
|
||||
|
||||
functions.Insert("item_can_read", item_can_read);
|
||||
functions.Insert("item_can_write", item_can_write);
|
||||
@@ -449,6 +447,12 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("rebus_question", rebus_question);
|
||||
|
||||
|
||||
/*
|
||||
upload
|
||||
*/
|
||||
functions.Insert("upload_ckeditor_funnum", upload_ckeditor_funnum);
|
||||
|
||||
|
||||
/*
|
||||
uptime
|
||||
*/
|
||||
|
@@ -112,10 +112,8 @@ namespace TemplatesFunctions
|
||||
void item_url(Info & i);
|
||||
void item_url_is(Info & i);
|
||||
void item_link(Info & i);
|
||||
void item_link_static_auth(Info & i);
|
||||
void item_static_auth_is_none(Info & i);
|
||||
void item_static_auth_is_image(Info & i);
|
||||
void item_static_auth_is_other(Info & i);
|
||||
void item_can_read(Info & i);
|
||||
void item_can_write(Info & i);
|
||||
void item_can_remove(Info & i);
|
||||
@@ -356,6 +354,12 @@ namespace TemplatesFunctions
|
||||
void rebus_question(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
upload
|
||||
*/
|
||||
void upload_ckeditor_funnum(Info & i);
|
||||
|
||||
|
||||
/*
|
||||
uptime
|
||||
*/
|
||||
|
42
templates/upload.cpp
Executable file
42
templates/upload.cpp
Executable file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is a part of CMSLU -- Content Management System like Unix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctime>
|
||||
#include "templates.h"
|
||||
#include "../core/request.h"
|
||||
|
||||
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
static size_t upload_ckeditor_reqid = 0;
|
||||
static int upload_fun_num = 0;
|
||||
|
||||
|
||||
|
||||
void upload_ckeditor_funnum(Info & i)
|
||||
{
|
||||
if( upload_ckeditor_reqid != request.id )
|
||||
{
|
||||
upload_ckeditor_reqid = request.id;
|
||||
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
|
||||
|
||||
if( !request.param_table.empty() )
|
||||
{
|
||||
const char * str = request.param_table[request.param_table.size()-1]->c_str() + 1; // the first char is '?'
|
||||
ckeditor_getparser.Parse(str);
|
||||
}
|
||||
|
||||
upload_fun_num = ckeditor_getparser.fun_num;
|
||||
}
|
||||
|
||||
i.out << upload_fun_num;
|
||||
}
|
||||
|
||||
} // namespace
|
Reference in New Issue
Block a user