added: mount option: html_template(file.html)
files: indexpatterns.h indexpatterns.cpp removed: templates/index_root.html its content was moved to index.html git-svn-id: svn://ttmath.org/publicrep/winix/trunk@611 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -91,6 +91,7 @@ requestcontroller.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
requestcontroller.o: misc.h item.h ../templates/ckeditorgetparser.h
|
||||
requestcontroller.o: ../core/httpsimpleparser.h ../core/log.h
|
||||
requestcontroller.o: ../core/locale.h ../confparser/confparser.h
|
||||
requestcontroller.o: ../templates/indexpatterns.h ../templates/localefilter.h
|
||||
requestcontroller.o: ../core/thread.h ../core/ticket.h ../core/db.h user.h
|
||||
requestcontroller.o: group.h thread.h error.h log.h dircontainer.h
|
||||
requestcontroller.o: ugcontainer.h ticket.h sessionmanager.h
|
||||
@@ -102,7 +103,7 @@ requestcontroller.o: acceptencodingparser.h acceptbaseparser.h htmlfilter.h
|
||||
requestcontroller.o: postmultiparser.h postparser.h httpsimpleparser.h
|
||||
requestcontroller.o: cookieparser.h notify.h
|
||||
requestcontroller.o: ../templatesnotify/templatesnotify.h ../core/mount.h
|
||||
requestcontroller.o: ../templates/misc.h ../templates/localefilter.h
|
||||
requestcontroller.o: ../templates/misc.h
|
||||
session.o: session.h item.h error.h log.h user.h rebus.h plugindata.h
|
||||
sessioncontainer.o: sessioncontainer.h session.h item.h error.h log.h user.h
|
||||
sessioncontainer.o: rebus.h plugindata.h data.h dirs.h dircontainer.h users.h
|
||||
|
@@ -101,7 +101,8 @@ Mount::ParamCode Mount::ParseParam(const char * param_name)
|
||||
{ par_only_root_remove, "only_root_remove" },
|
||||
{ par_emacs_on, "emacs_on" },
|
||||
{ par_mkdir_on, "mkdir_on" },
|
||||
{ par_app, "app" }
|
||||
{ par_app, "app" },
|
||||
{ par_html_template, "html_template" },
|
||||
};
|
||||
|
||||
size_t i, len = sizeof(par_name_tab) / sizeof(ParName);
|
||||
@@ -176,3 +177,15 @@ return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const std::string * Mount::HtmlTemplate() const
|
||||
{
|
||||
if( !param[par_html_template].defined )
|
||||
return 0;
|
||||
|
||||
if( param[par_html_template].arg.size() != 1 )
|
||||
return 0;
|
||||
|
||||
return & param[par_html_template].arg[0];
|
||||
}
|
||||
|
||||
|
@@ -60,6 +60,7 @@ public:
|
||||
par_emacs_on,
|
||||
par_mkdir_on,
|
||||
par_app,
|
||||
par_html_template,
|
||||
|
||||
par_none
|
||||
};
|
||||
@@ -99,6 +100,9 @@ public:
|
||||
bool IsArg(Mount::ParamCode code, const std::string & arg);
|
||||
bool IsArg(Mount::ParamCode code, int arg);
|
||||
|
||||
// returning a name to html template (can be null if not defined)
|
||||
const std::string * HtmlTemplate() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
Mounts::Mounts()
|
||||
{
|
||||
pmount = 0;
|
||||
@@ -23,6 +24,7 @@ Mounts::Mounts()
|
||||
|
||||
|
||||
|
||||
|
||||
// reading from 'mounts'
|
||||
Error Mounts::ReadMounts(const std::string & mounts)
|
||||
{
|
||||
@@ -146,3 +148,11 @@ Mount * Mounts::CalcMount(long dir_id)
|
||||
dir_id = pdir->parent_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const Mounts::MountTab * Mounts::GetMountTab()
|
||||
{
|
||||
return &mount_tab;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -22,6 +22,9 @@ class Mounts
|
||||
{
|
||||
public:
|
||||
|
||||
// dir_id, mount_point
|
||||
typedef std::map<long, Mount> MountTab;
|
||||
|
||||
Mounts();
|
||||
Error ReadMounts(const std::string & mounts);
|
||||
Error ReadMounts();
|
||||
@@ -33,13 +36,13 @@ public:
|
||||
// will not be null after calling CalcCurMount() or ReadMounts([...])
|
||||
Mount * pmount;
|
||||
|
||||
|
||||
const MountTab * GetMountTab();
|
||||
|
||||
private:
|
||||
|
||||
// dir_id, mount_point
|
||||
typedef std::map<long, Mount> MountTab;
|
||||
MountTab mount_tab;
|
||||
|
||||
|
||||
void MountCmsForRoot();
|
||||
};
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#define WINIX_VER_MAJOR 0
|
||||
#define WINIX_VER_MINOR 3
|
||||
#define WINIX_VER_REVISION 1
|
||||
#define WINIX_VER_REVISION 2
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user