2 rcs_id('$Id: RawHtml.php,v 1.6 2003-03-17 21:24:53 dairiki Exp $');
4 Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam
6 This file is part of PhpWiki.
8 PhpWiki is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 PhpWiki is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with PhpWiki; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 // Define ENABLE_RAW_HTML to false (in index.php) to disable the RawHtml plugin.
25 if (!defined('ENABLE_RAW_HTML'))
26 define('ENABLE_RAW_HTML', true);
29 * A plugin to provide for raw HTML within wiki pages.
31 class WikiPlugin_RawHtml
38 function getDescription () {
39 return _("A plugin to provide for raw HTML within wiki pages.");
42 function getVersion() {
43 return preg_replace("/[Revision: $]/", '',
47 function run($dbi, $argstr, &$request, $basepage) {
48 if (!defined('ENABLE_RAW_HTML') || ! ENABLE_RAW_HTML) {
49 return $this->disabled(_("Raw HTML is disabled in this wiki."));
52 return $this->error("$basepage unset?");
55 $page = $request->getPage($basepage);
57 if (! $page->get('locked')) {
58 return $this->disabled(fmt(_("%s is only allowed in locked pages."),
62 return HTML::raw($argstr);
66 // $Log: not supported by cvs2svn $
67 // Revision 1.5 2003/01/18 22:01:43 carstenklapp
69 // Reformatting & tabs to spaces;
70 // Added copyleft, getVersion, getDescription, rcs_id.
78 // c-hanging-comment-ender-p: nil
79 // indent-tabs-mode: nil