diff -r 81fc1e7ce91b -r e9add840d228 once.pl --- a/once.pl Thu Dec 24 01:26:00 2015 +0100 +++ b/once.pl Thu Dec 24 01:28:21 2015 +0100 @@ -55,10 +55,9 @@ my $rxVIEW = qr/[a-z\d]{6}-[a-z\d]+/i; # date-userhash my $rxFILE = qr/[a-z\d]{6}-[a-z\d]+-./i; # date-filehash-deletemode -my $TT_CONFIG = { - INCLUDE_PATH => [ map { catfile($RealBin, $_) } - qw(var templates.override templates) ] - }; +my $TT_CONFIG = + { INCLUDE_PATH => + [map { catfile($RealBin, $_) } qw(var templates.override templates)] }; umask 077; @@ -72,22 +71,6 @@ $1; }; -my @footer = (hr, - div( - { -align => "right" }, - a( - { - -href => - "https://ssl.schlittermann.de/hg/anon-upload/file/once/" - } => "Scripting" - ), - " © 2010,2011,2015 ", - a({ -href => "http://www.schlittermann.de/" } => "Heiko Schlittermann"), - " © 2014 ", - a({ -href => "http://www.schlittermann.de/" } => "Matthias Förste") - ) -); - exit main() if not caller; sub main { @@ -232,7 +215,7 @@ # create the view my %tt = (view => $view); my $tt = Template->new($TT_CONFIG) - or die $Template::ERROR; + or die $Template::ERROR; # List the current content if (my @files = map { deslash $_ } glob "$user_dir/*-*/*") { @@ -305,12 +288,13 @@ sub confirm { my ($base, $mimetype) = @_; my %tt = ( - file => { name => $base, + file => { + name => $base, mimetype => $mimetype - } + } ); my $tt = Template->new($TT_CONFIG) - or die $Template::ERROR; + or die $Template::ERROR; $tt->process('confirm.html' => \%tt); exit 0; }