From: Marius Gavrilescu Date: Sun, 9 Mar 2014 06:54:12 +0000 (+0200) Subject: Fix contest support in generic entry X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=759ae227869b52a2ae9c12f25ee697d0d0e102a0;p=gruntmaster-page.git Fix contest support in generic entry --- diff --git a/lib/Gruntmaster/Page/Generic.pm b/lib/Gruntmaster/Page/Generic.pm index 3fdd47c..54909e5 100644 --- a/lib/Gruntmaster/Page/Generic.pm +++ b/lib/Gruntmaster/Page/Generic.pm @@ -56,7 +56,7 @@ sub entry { ($id, $ct) = ($ct, $id) if $thing{contest}; local $Gruntmaster::Data::contest = $ct if $ct; debug $env => "Hash is $thing{hash} and id is $id"; - my %params = HGETALL "$thing{hash}.$id"; + my %params = HGETALL $ct ? "contest.$ct.$thing{hash}.$id" : "$thing{hash}.$id"; $thing{mangle}->(local $_ = \%params) if exists $thing{mangle}; wantarray ? %params : \%params }