3 # Copyright (C) 2008 Aleksandar Erkalovic, aerkalov@gmail.com
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version. For
9 # more details read LICENSE in the root of this distribution.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 # As per the GPL, removal of this notice is prohibited.
18 # Set default current working directory (needed for mod_perl)
19 if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\
/]+$/ ) {
22 # Set library paths in @INC, at compile time
29 use CGI
::Carp
qw( fatalsToBrowser );
31 use File
::Temp
qw(:POSIX);
41 my $thePathInfo = $query->path_info();
42 my $theRemoteUser = $query->remote_user();
43 my $theTopic = $query->param( 'topic' );
44 my $theUrl = $query->url;
46 my( $topic, $webName, $scriptUrlPath, $userName ) =
47 TWiki
::initialize
( $thePathInfo, $theRemoteUser,
48 $theTopic, $theUrl, $query );
52 use TWiki
::Contrib
::ObjaviContrib
;
54 if($query->request_method() eq "GET") {
55 TWiki
::Contrib
::ObjaviContrib
::handleRequest
($webName, $userName, $thePathInfo, $query);
57 TWiki
::Contrib
::ObjaviContrib
::handlePublish
($webName, $userName, $thePathInfo, $query);