Fix contest support in generic entry
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Mar 2014 06:54:12 +0000 (08:54 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Mar 2014 06:54:12 +0000 (08:54 +0200)
lib/Gruntmaster/Page/Generic.pm

index 3fdd47c0a157d7e190ab5c5c6464bf1e5b53787e..54909e50a7422a5bd706f705606ae6fb650472bc 100644 (file)
@@ -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
 }
This page took 0.010329 seconds and 4 git commands to generate.