tickets has been moved to a new plugin 'ticket'

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@657 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-09-29 21:24:34 +00:00
parent a589e5a090
commit a8b8c1feec
55 changed files with 2765 additions and 2523 deletions

View File

@@ -10,6 +10,7 @@
#include "functions.h"
#include "core/log.h"
#include "core/misc.h"
#include "core/plugin.h"
#include "templates/templates.h"
@@ -176,10 +177,8 @@ void Functions::Create()
Add(fun_ckeditor);
Add(fun_cp);
Add(fun_createthread);
Add(fun_createticket);
Add(fun_default);
Add(fun_download);
Add(fun_editticket);
Add(fun_emacs);
Add(fun_last);
Add(fun_login);
@@ -194,12 +193,17 @@ void Functions::Create()
Add(fun_run);
Add(fun_subject);
Add(fun_thread);
Add(fun_ticket);
Add(fun_tinymce);
Add(fun_uname);
Add(fun_upload);
Add(fun_uptime);
Add(fun_who);
plugin.Call(WINIX_CREATE_FUNCTIONS);
// Add(fun_ticket);
// Add(fun_createticket);
// Add(fun_editticket);
}
@@ -234,25 +238,14 @@ void Functions::SetDefaultFunctionForDir()
{
log << log3 << "Content: Default item: id: " << default_item << logend;
system->RedirectTo(default_item);
return;
}
else
{
if( system->mounts.pmount->type == system->mounts.MountTypeThread() )
request->function = &fun_thread;
else
request->function = &fun_ls;
if( system->mounts.pmount->type == system->mounts.MountTypeThread() )
{
request->function = &fun_thread;
log << log3 << "Content: default function: " << request->function->fun.url << logend;
}
else
if( system->mounts.pmount->type == system->mounts.MountTypeTicket() )
{
request->function = &fun_ticket;
log << log3 << "Content: default function: " << request->function->fun.url << logend;
}
else
{
// cms
request->function = &fun_ls;
log << log3 << "Content: default function: " << request->function->fun.url << logend;
}
}
@@ -260,14 +253,18 @@ void Functions::SetDefaultFunctionForDir()
void Functions::SetDefaultFunction()
{
plugin.Call(WINIX_SELECT_DEFAULT_FUNCTION);
if( request->function )
{
log << log3 << "Functions: default function: " << request->function->fun.url << logend;
return;
}
if( request->is_item )
{
SetDefaultFunctionForFile();
}
else
{
SetDefaultFunctionForDir();
}
}