/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2010, Tomasz Sowa * All rights reserved. * */ #include "vim.h" #include "functions.h" namespace Fun { // WYMeditor doesn't work on different domains by default, // solution: http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=731&p=2507#p2504 // we add one file to winix: /var/wymiframe.html // in the future this will be removed static const char vim_wymiframe[] = "\n" "\n" "\n" "\n" "WYMeditor iframe\n" "\n" "\n" "\n" "\n" "\n"; Vim::Vim() { fun.url = "vim"; } void Vim::Init() { Item * var = system->dirs.CreateVarDir(); if( var ) { Item temp; if( db->GetItem(var->id, "wymiframe.html", temp) == WINIX_ERR_NO_ITEM ) { Item v; v.parent_id = var->id; v.user_id = -1; v.group_id = -1; v.privileges = 0755; v.subject = "wymiframe.html"; v.url = "wymiframe.html"; v.type = Item::file; v.content = vim_wymiframe; v.content_type = Item::ct_raw; system->AddFile(v, false); } } } bool Vim::HasAccess() { return functions->fun_emacs.HasAccess(); } void Vim::MakePost() { functions->fun_emacs.MakePost(); } } // namespace