#!/usr/bin/perl -wT # # TWiki Collaboration Platform, http://TWiki.org/ # # For licensing info read license.txt file in the TWiki root. # 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 BEGIN { # See the 'view' script for a description of what this does if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\/]+$/ ) { chdir $1; } unshift @INC, '.'; require 'setlib.cfg'; } use TWiki::Func; use TWiki::Plugins; use TWiki::UI; TWiki::UI::run( \&doit ); sub doit { my $session = shift; my $result = $session->getScriptUrl ( "Main", "WebHome", 'view' ) . "\n" . $session->getScriptUrl ( "", "WebHome", 'view' ); # throw Error::Simple ( $result ); print "Content-type: text/plain\n\n"; print $result; }