summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@wirdorange.org>2011-01-15 20:16:14 +0000
committerOthmar Gsenger <otti@wirdorange.org>2011-01-15 20:16:14 +0000
commitd8a73d1d07088d00bb3c0f2f1c5a23b1c264585d (patch)
tree506086b9f8783db0d26e05efd89d0d073cc5d7c2
parentadded config, fixed nobr issiue on lenny (diff)
added webdir config option
-rw-r--r--config.pm.example2
-rwxr-xr-xread.pl3
2 files changed, 3 insertions, 2 deletions
diff --git a/config.pm.example b/config.pm.example
index b4655df..e8abd09 100644
--- a/config.pm.example
+++ b/config.pm.example
@@ -4,5 +4,5 @@ our %config = (
db => ['dbi:SQLite:/home/nzbget/datenbank.sqlite', '', ''],
page_name => 'anymur binary usenet',
files_dir => '/media/wechsel/otti/done/usenet',
-
+ web_dir => '/done/usenet',
);
diff --git a/read.pl b/read.pl
index 882c9bc..fd4ad50 100755
--- a/read.pl
+++ b/read.pl
@@ -5,6 +5,7 @@ use CGI::Carp 'fatalsToBrowser';
use utf8;
use local::db;
use local::user;
+use config;
my $user = new local::user($ENV{REMOTE_USER});
my $dl = local::db::download->retrieve(param('id')) or die "Ungültige download id";
@@ -14,4 +15,4 @@ if (not local::db::seen->search(user=>$user->get_id,download=>$dl->download_id))
local::db::seen->insert({user=>$user->get_id,download=>$dl->download_id});
}
-print CGI::redirect('/'.$dl->category->name.'/'.$dl->download_id);
+print CGI::redirect($config::config{web_dir}.'/'.$dl->category->name.'/'.$dl->download_id);