added: mount points

(reading /etc/fstab from db not working yet)
       core/mount.h
       core/mountparser.h
       core/mountparser.cpp
       core/mounts.h
       core/mounts.cpp
       content/thread.cpp
       content/createthread.cpp
       templates/thread.cpp       



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@495 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2009-04-19 22:13:21 +00:00
parent 7a4a8e0fe2
commit a1ea298a43
30 changed files with 879 additions and 195 deletions

View File

@@ -1,4 +1,4 @@
o = templates.o sys.o item.o doc.o user.o dir.o done.o priv.o patterncacher.o who.o last.o
o = templates.o sys.o item.o doc.o user.o dir.o done.o priv.o patterncacher.o who.o last.o thread.o
all: templates.a

View File

@@ -5,32 +5,35 @@ dir.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
dir.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
dir.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
dir.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
dir.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
dir.o: ../core/session.h ../core/done.h ../core/getparser.h
dir.o: ../core/httpsimpleparser.h ../core/postparser.h ../core/cookieparser.h
dir.o: ../core/item.h ../core/db.h ../core/error.h ../core/user.h
dir.o: ../core/group.h ../core/users.h ../core/groups.h ../core/log.h
dir.o: patterncacher.h ../app/templates.h
dir.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
dir.o: ../core/request.h ../core/requesttypes.h ../core/session.h
dir.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
dir.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
dir.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
dir.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
dir.o: ../core/log.h patterncacher.h ../app/templates.h
doc.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
doc.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
doc.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
doc.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
doc.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
doc.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
doc.o: ../core/session.h ../core/done.h ../core/getparser.h
doc.o: ../core/httpsimpleparser.h ../core/postparser.h ../core/cookieparser.h
doc.o: ../core/item.h ../core/db.h ../core/error.h ../core/user.h
doc.o: ../core/group.h ../core/users.h ../core/groups.h ../core/log.h
doc.o: patterncacher.h ../app/templates.h
doc.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
doc.o: ../core/request.h ../core/requesttypes.h ../core/session.h
doc.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
doc.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
doc.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
doc.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
doc.o: ../core/log.h patterncacher.h ../app/templates.h
done.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
done.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
done.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
done.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
done.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
done.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
done.o: ../core/session.h ../core/done.h ../core/getparser.h
done.o: ../core/httpsimpleparser.h ../core/postparser.h
done.o: ../core/cookieparser.h ../core/item.h ../core/db.h ../core/error.h
done.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
done.o: ../core/request.h ../core/requesttypes.h ../core/session.h
done.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
done.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
done.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
done.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
done.o: ../core/log.h patterncacher.h ../app/templates.h
item.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
@@ -38,10 +41,11 @@ item.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
item.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
item.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
item.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
item.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
item.o: ../core/session.h ../core/done.h ../core/getparser.h
item.o: ../core/httpsimpleparser.h ../core/postparser.h
item.o: ../core/cookieparser.h ../core/item.h ../core/db.h ../core/error.h
item.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
item.o: ../core/request.h ../core/requesttypes.h ../core/session.h
item.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
item.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
item.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
item.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
item.o: ../core/log.h patterncacher.h ../app/templates.h
last.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
@@ -49,10 +53,11 @@ last.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
last.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
last.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
last.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
last.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
last.o: ../core/session.h ../core/done.h ../core/getparser.h
last.o: ../core/httpsimpleparser.h ../core/postparser.h
last.o: ../core/cookieparser.h ../core/item.h ../core/db.h ../core/error.h
last.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
last.o: ../core/request.h ../core/requesttypes.h ../core/session.h
last.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
last.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
last.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
last.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
last.o: ../core/log.h patterncacher.h ../app/templates.h
last.o: ../core/lastcontainer.h ../core/misc.h
@@ -63,10 +68,11 @@ priv.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
priv.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
priv.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
priv.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
priv.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
priv.o: ../core/session.h ../core/done.h ../core/getparser.h
priv.o: ../core/httpsimpleparser.h ../core/postparser.h
priv.o: ../core/cookieparser.h ../core/item.h ../core/db.h ../core/error.h
priv.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
priv.o: ../core/request.h ../core/requesttypes.h ../core/session.h
priv.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
priv.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
priv.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
priv.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
priv.o: ../core/log.h patterncacher.h ../app/templates.h
sys.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
@@ -74,33 +80,49 @@ sys.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
sys.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
sys.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
sys.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
sys.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
sys.o: ../core/session.h ../core/done.h ../core/getparser.h
sys.o: ../core/httpsimpleparser.h ../core/postparser.h ../core/cookieparser.h
sys.o: ../core/item.h ../core/db.h ../core/error.h ../core/user.h
sys.o: ../core/group.h ../core/users.h ../core/groups.h ../core/log.h
sys.o: patterncacher.h ../app/templates.h
sys.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
sys.o: ../core/request.h ../core/requesttypes.h ../core/session.h
sys.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
sys.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
sys.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
sys.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
sys.o: ../core/log.h patterncacher.h ../app/templates.h
templates.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
templates.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
templates.o: ../core/db.h ../core/dircontainer.h ../core/user.h
templates.o: ../core/group.h ../core/ugcontainer.h ../core/users.h
templates.o: ../core/groups.h ../core/functions.h ../core/function.h
templates.o: ../core/functioncodeparser.h ../core/lastcontainer.h
templates.o: ../core/request.h ../core/requesttypes.h ../core/session.h
templates.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
templates.o: ../core/postparser.h ../core/cookieparser.h ../core/item.h
templates.o: ../core/mounts.h ../core/mount.h ../core/request.h
templates.o: ../core/requesttypes.h ../core/session.h ../core/done.h
templates.o: ../core/getparser.h ../core/httpsimpleparser.h
templates.o: ../core/postparser.h ../core/cookieparser.h
templates.o: ../core/mountparser.h ../core/request.h ../core/item.h
templates.o: ../core/db.h ../core/error.h ../core/user.h ../core/group.h
templates.o: ../core/users.h ../core/groups.h ../core/log.h patterncacher.h
templates.o: ../app/templates.h
thread.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
thread.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
thread.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
thread.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
thread.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
thread.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
thread.o: ../core/request.h ../core/requesttypes.h ../core/session.h
thread.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
thread.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
thread.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
thread.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
thread.o: ../core/log.h patterncacher.h ../app/templates.h
user.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
user.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
user.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
user.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
user.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
user.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
user.o: ../core/session.h ../core/done.h ../core/getparser.h
user.o: ../core/httpsimpleparser.h ../core/postparser.h
user.o: ../core/cookieparser.h ../core/item.h ../core/db.h ../core/error.h
user.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
user.o: ../core/request.h ../core/requesttypes.h ../core/session.h
user.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
user.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
user.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
user.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
user.o: ../core/log.h patterncacher.h ../app/templates.h
who.o: templates.h ../../ezc/src/ezc.h ../core/data.h ../core/misc.h
@@ -108,13 +130,14 @@ who.o: ../core/log.h ../core/item.h ../core/error.h ../core/dirs.h
who.o: ../core/db.h ../core/dircontainer.h ../core/user.h ../core/group.h
who.o: ../core/ugcontainer.h ../core/users.h ../core/groups.h
who.o: ../core/functions.h ../core/function.h ../core/functioncodeparser.h
who.o: ../core/lastcontainer.h ../core/request.h ../core/requesttypes.h
who.o: ../core/session.h ../core/done.h ../core/getparser.h
who.o: ../core/httpsimpleparser.h ../core/postparser.h ../core/cookieparser.h
who.o: ../core/item.h ../core/db.h ../core/error.h ../core/user.h
who.o: ../core/group.h ../core/users.h ../core/groups.h ../core/log.h
who.o: patterncacher.h ../app/templates.h ../core/sessioncontainer.h
who.o: ../core/requestcontroller.h ../core/data.h ../core/request.h
who.o: ../core/lastcontainer.h ../core/mounts.h ../core/mount.h
who.o: ../core/request.h ../core/requesttypes.h ../core/session.h
who.o: ../core/done.h ../core/getparser.h ../core/httpsimpleparser.h
who.o: ../core/postparser.h ../core/cookieparser.h ../core/mountparser.h
who.o: ../core/request.h ../core/item.h ../core/db.h ../core/error.h
who.o: ../core/user.h ../core/group.h ../core/users.h ../core/groups.h
who.o: ../core/log.h patterncacher.h ../app/templates.h
who.o: ../core/sessioncontainer.h ../core/requestcontroller.h ../core/data.h
who.o: ../content/content.h ../templates/templates.h ../core/misc.h
who.o: ../core/function.h ../core/functionparser.h ../app/content.h
who.o: ../core/sessionmanager.h ../core/sessioncontainer.h

View File

@@ -25,6 +25,8 @@ Ezc::Pattern pat_fun_rm;
Ezc::Pattern pat_fun_who;
Ezc::Pattern pat_fun_run;
Ezc::Pattern pat_fun_last;
Ezc::Pattern pat_fun_thread;
Ezc::Pattern pat_fun_createthread;
Ezc::Pattern pat_err_item_required;
Ezc::Pattern pat_err_404;
Ezc::Pattern pat_err_per_denied;
@@ -108,6 +110,14 @@ Ezc::Pattern * p = 0;
p = &pat_fun_last;
break;
case FUN_THREAD:
p = &pat_fun_thread;
break;
case FUN_CREATETHREAD:
p = &pat_fun_createthread;
break;
default:
break;
}
@@ -318,6 +328,12 @@ void Templates::CreateFunctions()
functions.Insert("last_tab_start", last_tab_start);
functions.Insert("last_tab_end", last_tab_end);
/*
thread
*/
functions.Insert("thread_subject", thread_subject);
// !! tymczasowa
@@ -385,6 +401,12 @@ void Templates::Read()
pat_item_info.Directory(data.templates);
pat_item_info.ParseFile("item_info.html");
pat_fun_thread.Directory(data.templates);
pat_fun_thread.ParseFile("fun_thread.html");
pat_fun_createthread.Directory(data.templates);
pat_fun_createthread.ParseFile("fun_createthread.html");
CreateFunctions();
#ifdef APPTEMPLATES

View File

@@ -175,6 +175,7 @@ namespace TemplatesFunctions
void who_tab_time(Info & i);
void who_tab_last_time(Info & i);
/*
last
*/
@@ -185,6 +186,12 @@ namespace TemplatesFunctions
void last_tab_end(Info & i);
/*
thread
*/
void thread_subject(Info & i);
} // namespace TemplatesFunctions

32
templates/thread.cpp Executable file
View File

@@ -0,0 +1,32 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008, Tomasz Sowa
* All rights reserved.
*
*/
#include "templates.h"
namespace TemplatesFunctions
{
void thread_subject(Info & i)
{
// !! jesli bedzie podzial na strony (np page:2) to bedzie trzeba w inny sposob ustalac tytul dla calego watku
if( !request.item_table.empty() )
HtmlEscape(i.out, request.item_table[0].subject);
}
} // namespace TemplatesFunctions