added winix functions: ln winix function 'default' can be used without redirecting now added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles now tickets are combined with files added winix functions: showtickets fixed mountpoints: when the default root mount was created its parameter table was empty and it caused accessing to a non-existing objects fixed logger: modifiers (log1, log2, log3) were incorrectly treated added modifier: log4 (debug info) now we are moving threads to a new plugin 'thread' created directory: plugins/thread (not finished yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
53 lines
892 B
C++
Executable File
53 lines
892 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 "default.h"
|
|
|
|
|
|
|
|
namespace Fun
|
|
{
|
|
|
|
Default::Default()
|
|
{
|
|
fun.url = L"default";
|
|
}
|
|
|
|
|
|
bool Default::HasAccess()
|
|
{
|
|
return !request->is_item && system->HasWriteAccess(*request->dir_tab.back());
|
|
}
|
|
|
|
|
|
|
|
void Default::MakePost()
|
|
{
|
|
Item & dir = *request->dir_tab.back();
|
|
|
|
dir.link_to = request->PostVar(L"linkto");
|
|
dir.link_redirect = request->IsPostVar(L"makeredirect") ? 1 : 0;
|
|
TrimWhite(dir.link_to);
|
|
|
|
// !! dodac sprawdzenie czy link_to jest pusty teraz
|
|
|
|
request->status = db->EditLinkItem(dir.id, dir.link_to, dir.link_redirect);
|
|
|
|
if( request->status == WINIX_ERR_OK )
|
|
{
|
|
log << log2 << "Default: changed link_to: " << dir.link_to << ", for dir_id: " << dir.id << logend;
|
|
system->RedirectToLastDir();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace
|