#!/usr/bin/perl -wT
#
# TWiki WikiClone (see TWiki.pm for $wikiversion and other info)
#
# Based on parts of Ward Cunninghams original Wiki and JosWiki.
# Copyright (C) 1998 Markus Peter - SPiN GmbH (warpi@spin.de)
# Some changes by Dave Harris (drh@bhresearch.co.uk) incorporated
# Copyright (C) 1999-2000 Peter Thoeny, peter@thoeny.com
#
# This script Copyright (C) 2003 Motorola - All Rights Reserved
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details, published at 
# http://www.gnu.org/copyleft/gpl.html

#
# Script used for communication from the PowerEdit applet (client)
# back to TWiki (server). The script uses an 'action' parameter
# to select one of three server actions:
#
# get           Deliver the raw text of the topic from the DB
#               Required because there's no way to pass enough text
#               in the parameters to the applet
# preview       Save the text and return the URL for the applet to
#               jump to when editing is finished.
# commit        Commit the applet-provided text back to the DB and
#               preview it.
#
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use lib ( '.' );
use lib ( '../lib' );
use TWiki::Plugins::PowerEditAddon::PowerEdit;

use strict;

PowerEditAddon::PowerEdit::serverCommand( new CGI );

1;

