/* * 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