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"
|
|
|
|
#include "../core/data.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-01-25 05:52:17 +01:00
|
|
|
if( !i.is )
|
|
|
|
return;
|
2009-06-05 22:29:06 +02:00
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
i.result = data.mounts.pmount->IsArg(Mount::par_page, *i.is);
|
|
|
|
}
|
2009-06-05 22:29:06 +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-01-25 05:52:17 +01:00
|
|
|
if( !i.is )
|
|
|
|
return;
|
|
|
|
|
|
|
|
i.result = data.mounts.pmount->IsArg(Mount::par_thread, *i.is);
|
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-01-25 05:52:17 +01:00
|
|
|
i.result = data.mounts.pmount->type == Mount::thread;
|
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-01-25 05:52:17 +01:00
|
|
|
i.result = data.mounts.pmount->type == Mount::ticket;
|
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-01-25 05:52:17 +01:00
|
|
|
i.result = data.mounts.pmount->type == Mount::cms;
|
2009-10-01 00:31:20 +02:00
|
|
|
}
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
} // namespace TemplatesFunctions
|
|
|
|
|
|
|
|
|
|
|
|
|