#
$request -> response;
+# shorten the main file?
+#
+$request -> severance;
+
#
#
### main end ###################################################################
### Posting::Request ###########################################################
package Posting::Request;
+use Arc::Archive;
use CheckRFC;
use Encode::Plain; $Encode::Plain::utf8 = 1; # generally convert from UTF-8
use Encode::Posting;
bless $self, $class;
}
+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);
+
+}
+
### sub response ###############################################################
#
# print the response to STDOUT
};
}
else {
- my $cache = new Posting::Cache ($self->{conf}->{original}->{files}->{cacheFile});
+ my $cache = new Posting::Cache ($self->{conf}->{original}->{files}->{cachePath});
$cache -> add_posting (
{ thread => ($tid =~ /(\d+)/)[0],
posting => ($mid =~ /(\d+)/)[0]
#
my ($ftid, $fmid) = split /;/ => $q -> param ($formdata -> {followUp} -> {name}) => 2;
- unless ($ftid =~ /\d+/ and $fmid =~ /\d+/) {
+ unless ($ftid =~ /^\d+$/ and $fmid =~ /^\d+$/) {
$self -> {error} = {
spec => 'unknown_followup',
type => 'fatal'
};
$self -> kill_param or return;
}
+
+ elsif ($formdata -> {$name {$_}} -> {type} eq 'unique-id' and not may_id $val) {
+ $self -> {error} = {
+ spec => 'wrong_unique_id',
+ desc => $name{$_},
+ type => $formdata -> {$name {$_}} -> {errorType}
+ };
+ print STDERR "Manipuliert!";
+ $self -> kill_param or return;
+ }
}
if (exists ($formdata -> {$name {$_}} -> {values})