changed: cmslu building
Makefile from cmslu/ builds only: confparser.a content.a core.a templates.a
the proper *.fcgi file is created from an application
changed: all cmslu functions have english names (ls, emacs, etc)
fixed: function: login/logout are placed where there are permissions
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@474 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -11,9 +11,8 @@ templates.a: $(o)
|
||||
.cpp.o:
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
|
||||
depend:
|
||||
makedepend -Y. -f- *.cpp > Makefile.dep
|
||||
makedepend $(DEPMACROS) -Y. -f- *.cpp > Makefile.dep
|
||||
|
||||
|
||||
clean:
|
||||
|
||||
@@ -26,6 +26,24 @@ void dir(Info & i)
|
||||
|
||||
|
||||
|
||||
void dir_can_read_exec(Info & i)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
for(size_t a=0 ; a<request.dir_table.size() ; ++a)
|
||||
{
|
||||
if( !request.HasReadExecAccess(*request.dir_table[a]) )
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
i.result = result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static std::vector<Item*> dir_childs_table;
|
||||
@@ -152,6 +170,9 @@ void dir_last_default_item_url(Info & i)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
@@ -240,6 +240,13 @@ void item_tab_link(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void item_can_read(Info & i)
|
||||
{
|
||||
if( request.HasReadAccess(request.item) )
|
||||
i.result = true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
@@ -188,6 +188,8 @@ void Templates::CreateFunctions()
|
||||
functions.Insert("item_dir", item_dir);
|
||||
functions.Insert("item_url", item_url);
|
||||
functions.Insert("item_link", item_link);
|
||||
functions.Insert("item_can_read", item_can_read);
|
||||
|
||||
|
||||
functions.Insert("item_old_id", item_old_id);
|
||||
functions.Insert("item_old_subject", item_old_subject);
|
||||
@@ -215,6 +217,7 @@ void Templates::CreateFunctions()
|
||||
dir
|
||||
*/
|
||||
functions.Insert("dir", dir);
|
||||
functions.Insert("dir_can_read_exec", dir_can_read_exec);
|
||||
|
||||
functions.Insert("dir_childs_tab", dir_childs_tab);
|
||||
functions.Insert("dir_childs_tab_url", dir_childs_tab_url);
|
||||
@@ -270,6 +273,13 @@ void Templates::CreateFunctions()
|
||||
|
||||
// !! tymczasowa
|
||||
functions.Insert("is_group_tv", is_group_tv);
|
||||
|
||||
|
||||
#ifdef APPTEMPLATES
|
||||
|
||||
AppTemplateFunctions::CreateAppFunctions(functions);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -311,7 +321,7 @@ void Templates::Read()
|
||||
pat_fun_default_item.ParseFile("fun_default_item.html");
|
||||
|
||||
pat_fun_privileges.Directory(data.templates);
|
||||
pat_fun_privileges.ParseFile("fun_privileges.html");
|
||||
pat_fun_privileges.ParseFile("fun_priv.html");
|
||||
|
||||
pat_err_others.Directory(data.templates);
|
||||
pat_err_others.ParseFile("err_others.html");
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#include "../core/groups.h"
|
||||
#include "../core/log.h"
|
||||
|
||||
#ifdef APPTEMPLATES
|
||||
#include "../app/templates.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +68,7 @@ namespace TemplatesFunctions
|
||||
void item_dir(Info & i); // the same as full_dir()
|
||||
void item_url(Info & i);
|
||||
void item_link(Info & i);
|
||||
void item_can_read(Info & i);
|
||||
|
||||
// !! wprowadzic item_old_is ?
|
||||
void item_old_id(Info & i);
|
||||
@@ -92,6 +97,7 @@ namespace TemplatesFunctions
|
||||
dir
|
||||
*/
|
||||
void dir(Info & i);
|
||||
void dir_can_read_exec(Info & i);
|
||||
|
||||
void dir_childs_tab(Info & i);
|
||||
void dir_childs_tab_url(Info & i);
|
||||
|
||||
Reference in New Issue
Block a user