added: new options to the config: url_proto: default: http:// url_ssl_proto: default: https:// use_ssl, use_ssl_static, use_ssl_common (whether or not to use SSL protocol) use_ssl_only_for_logged_users now we are able to use SSL encryption (https) together with normal connections removed: config option: base_server git-svn-id: svn://ttmath.org/publicrep/winix/trunk@755 e52654a7-88a9-db11-a3e9-0013d4bc506epull/3/head
parent
3b2a1c3f25
commit
ee6500ac65
@ -1 +1 @@
|
||||
o = adduser.o dir.o doc.o filters.o htmltextstream.o indexpatterns.o insert.o item.o last.o locale.o localefilter.o ls.o misc.o mount.o patterncacher.o priv.o rebus.o slog.o stat.o sys.o template.o templates.o upload.o uptime.o user.o who.o winix.o
|
||||
o = adduser.o config.o dir.o doc.o filters.o htmltextstream.o indexpatterns.o insert.o item.o last.o locale.o localefilter.o login.o ls.o misc.o mount.o patterncacher.o priv.o rebus.o slog.o stat.o sys.o template.o templates.o upload.o uptime.o user.o who.o winix.o
|
||||
|
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
/*
|
||||
some config options
|
||||
*/
|
||||
|
||||
|
||||
void config_use_ssl(Info & i)
|
||||
{
|
||||
i.res = config->use_ssl;
|
||||
}
|
||||
|
||||
|
||||
void config_use_ssl_static(Info & i)
|
||||
{
|
||||
i.res = config->use_ssl_static;
|
||||
}
|
||||
|
||||
|
||||
void config_use_ssl_common(Info & i)
|
||||
{
|
||||
i.res = config->use_ssl_common;
|
||||
}
|
||||
|
||||
|
||||
void config_url_proto(Info & i)
|
||||
{
|
||||
i.out << config->url_proto;
|
||||
}
|
||||
|
||||
|
||||
void config_url_ssl_proto(Info & i)
|
||||
{
|
||||
i.out << config->url_ssl_proto;
|
||||
}
|
||||
|
||||
|
||||
void config_base_url(Info & i)
|
||||
{
|
||||
i.out << config->base_url;
|
||||
}
|
||||
|
||||
|
||||
void config_base_url_static(Info & i)
|
||||
{
|
||||
i.out << config->base_url_static;
|
||||
}
|
||||
|
||||
|
||||
void config_base_url_common(Info & i)
|
||||
{
|
||||
i.out << config->base_url_common;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
|
||||
namespace TemplatesFunctions
|
||||
{
|
||||
|
||||
|
||||
void login_path(Info & i)
|
||||
{
|
||||
if( config->use_ssl )
|
||||
i.out << config->url_ssl_proto;
|
||||
else
|
||||
i.out << config->url_proto;
|
||||
|
||||
i.out << config->base_url;
|
||||
|
||||
if( system->HasReadExecAccessToPath(cur->request->dir_tab) )
|
||||
{
|
||||
dir(i);
|
||||
|
||||
if( cur->request->is_item && system->HasReadAccess(cur->request->item) )
|
||||
i.out << cur->request->item.url << '/';
|
||||
}
|
||||
else
|
||||
{
|
||||
i.out << '/';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
Loading…
Reference in new issue