2009-06-05 22:29:06 +02:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2009-06-05 22:29:06 +02:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2010-02-28 22:33:06 +01:00
|
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
2009-06-05 22:29:06 +02:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "templates.h"
|
2010-08-13 22:04:57 +02:00
|
|
|
#include "core/misc.h"
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace TemplatesFunctions
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
void mount_page_is(Info & i)
|
2009-06-05 22:29:06 +02:00
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
i.res = system->mounts.pmount->IsArg(system->mounts.MountParPage(), i.par);
|
2010-01-25 05:52:17 +01:00
|
|
|
}
|
2009-06-05 22:29:06 +02:00
|
|
|
|
2010-05-30 23:07:46 +02:00
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
void mount_thread_is(Info & i)
|
2009-06-07 04:40:27 +02:00
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
i.res = system->mounts.pmount->IsArg(system->mounts.MountParThread(), i.par);
|
2009-06-07 04:40:27 +02:00
|
|
|
}
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
void mount_type_is_thread(Info & i)
|
2009-06-07 04:40:27 +02:00
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
i.res = system->mounts.pmount->type == system->mounts.MountTypeThread();
|
2009-06-07 04:40:27 +02:00
|
|
|
}
|
2009-06-05 22:29:06 +02:00
|
|
|
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
void mount_type_is_ticket(Info & i)
|
2009-10-01 00:31:20 +02:00
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
i.res = system->mounts.pmount->type == system->mounts.MountTypeTicket();
|
2009-10-01 00:31:20 +02:00
|
|
|
}
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
|
|
|
|
void mount_type_is_cms(Info & i)
|
2009-10-01 00:31:20 +02:00
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
i.res = system->mounts.pmount->type == system->mounts.MountTypeCms();
|
2009-10-01 00:31:20 +02:00
|
|
|
}
|
|
|
|
|
2010-08-13 22:04:57 +02:00
|
|
|
void mount_has_html_template(Info & i)
|
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
i.res = system->mounts.pmount->param[system->mounts.MountParHtmlTemplate()].defined;
|
2010-08-13 22:04:57 +02:00
|
|
|
}
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
|
2010-08-13 22:04:57 +02:00
|
|
|
void mount_first_html_template(Info & i)
|
|
|
|
{
|
2010-09-13 01:33:27 +02:00
|
|
|
Mount::ParamRow & par = system->mounts.pmount->param[system->mounts.MountParHtmlTemplate()];
|
2010-08-13 22:04:57 +02:00
|
|
|
|
|
|
|
if( par.defined && !par.arg.empty() )
|
|
|
|
HtmlEscape(i.out, par.arg[0]);
|
|
|
|
}
|
2010-01-25 05:52:17 +01:00
|
|
|
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
} // namespace TemplatesFunctions
|
|
|
|
|
|
|
|
|
|
|
|
|