From d8a73d1d07088d00bb3c0f2f1c5a23b1c264585d Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Sat, 15 Jan 2011 20:16:14 +0000 Subject: added webdir config option --- config.pm.example | 2 +- read.pl | 3 ++- 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); -- cgit v1.2.3