X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/df7bba65634dbc997ba06409e25a49b8be9dd139..ddcd73d3997cd6d2f56815c4ea539a4bed7d20c4:/selfforum-cgi/user/fo_posting.pl diff --git a/selfforum-cgi/user/fo_posting.pl b/selfforum-cgi/user/fo_posting.pl index d2a0a8f..658f445 100644 --- a/selfforum-cgi/user/fo_posting.pl +++ b/selfforum-cgi/user/fo_posting.pl @@ -4,7 +4,7 @@ # # # File: user/fo_posting.pl # # # -# Authors: André Malo , 2001-04-08 # +# Authors: André Malo # # # # Description: Accept new postings, display "Neue Nachricht" page # # # @@ -16,28 +16,27 @@ use vars qw( $Shared $Script $Config - $VERSION ); # locate the script # BEGIN { - my $null = $0; $null =~ s/\\/\//g; # for win :-( - $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.'; - $Shared = "$Bin/../shared"; - $Config = "$Bin/config"; - $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null; - -# my $null = $0; +# my $null = $0; $null =~ s/\\/\//g; # for win :-( # $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.'; -# $Config = "$Bin/../../daten/forum/config"; -# $Shared = "$Bin/../../cgi-shared"; +# $Shared = "$Bin/../shared"; +# $Config = "$Bin/config"; # $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null; + + my $null = $0; + $Bin = ($null =~ /^(.*)\/.*$/)? $1 : '.'; + $Config = "$Bin/../../cgi-config/forum"; + $Shared = "$Bin/../../cgi-shared"; + $Script = ($null =~ /^.*\/(.*)$/)? $1 : $null; } # setting umask, remove or comment it, if you don't need # -umask 006; +umask 000; use lib "$Shared"; use CGI::Carp qw(fatalsToBrowser); @@ -46,9 +45,15 @@ use Conf; use Conf::Admin; use Posting::Cache; +################################################################################ +# # Version check # -$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +# last modified: +# $Date$ (GMT) +# by $Author$ +# +sub VERSION {(q$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'} # load script configuration and admin default conf. # @@ -83,9 +88,9 @@ $request -> severance; ### Posting::Request ########################################################### package Posting::Request; -use Arc::Archive; +use Arc::Starter; use CheckRFC; -use Encode::Plain; $Encode::Plain::utf8 = 1; # generally convert from UTF-8 +use Encode::Plain; $Encode::Plain::utf8 = 1; use Encode::Posting; use Lock; use Posting::_lib qw( @@ -141,16 +146,7 @@ sub new { sub severance { my $self = shift; - my $stat = cut_tail ({ - forumFile => $self -> {conf} -> {forum_file_name}, - messagePath => $self -> {conf} -> {message_path}, - archivePath => $self -> {conf} -> {original} -> {files} -> {archivePath}, - lockFile => $self -> {conf} -> {original} -> {files} -> {sev_lock}, - adminDefault => $self -> {conf} -> {admin}, - cachePath => $self -> {conf} -> {original} -> {files} -> {cachePath} - }); -# die $stat->{(keys %$stat)[0]} if (%$stat); - + start_severance ($self -> {conf} -> {original} -> {files} -> {sev_app}); } ### sub response ############################################################### @@ -1029,7 +1025,9 @@ sub decode_param { } sub jerk { - my $text = $_[1] || 'An error has occurred.'; + my $text = shift; + $text = 'An error has occurred.' unless defined $text; + print <