Files
winix/templates/mount.cpp
Tomasz Sowa 3071df227a fixed: find_ticket_value (in plugins/ticket/templates.cpp)
should find the first item (can be more than one item with the same 'param')

fixed: added sorting tickets params in ReadTicketParams() (in plugins/ticket/ticketinfo.cpp)

fixed: plugin should have its own 'PluginInfo info' struct
a plugin's function can call another plugin's functions

added: removing tickets files/images

added: removing threads

changed: rm function will call WINIX_FILE_REMOVED now when deleting directories





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@710 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-01-23 23:23:24 +00:00

56 lines
908 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved.
*
*/
#include "templates.h"
#include "core/misc.h"
namespace TemplatesFunctions
{
void mount_type_is(Info & i)
{
int mount_type_id = system->mounts.FindMountType(i.par);
if( mount_type_id == -1 )
return;
i.res = (system->mounts.pmount->type == mount_type_id);
}
void mount_page_arg_is(Info & i)
{
i.res = system->mounts.pmount->IsArg(system->mounts.MountParPage(), i.par);
}
void mount_has_html_template(Info & i)
{
i.res = system->mounts.pmount->param[system->mounts.MountParHtmlTemplate()].defined;
}
void mount_first_html_template(Info & i)
{
Mount::ParamRow & par = system->mounts.pmount->param[system->mounts.MountParHtmlTemplate()];
if( par.defined && !par.arg.empty() )
i.out << par.arg[0];
}
} // namespace TemplatesFunctions