word/memory: mirrored duplication of unpaired images
[sheet.git] / word.plp
index 9ea54e89f7d002937e0c21dc12caf12ce5d2ff88..f47c4f48ed167d63d4608d2d71c5e80e96dbae13 100644 (file)
--- a/word.plp
+++ b/word.plp
@@ -1,12 +1,13 @@
 <(common.inc.plp)><:
 
 our $lang = $get{lang} || 'en';
-our $wordlistbase = "data/wordlist.$lang";
+our $wordlistbase = "data/wordlist";
 
 if ($Request and $Request =~ m{\A([^/]+)}) {
        my $page = "word/$1.plp";
        utf8::downgrade($page); # unicode filename breaks contents encoding
        if (-e $page) {
+               $wordlistbase .= ".$lang";
                Include $page;
                exit;
        }
@@ -122,7 +123,10 @@ if (exists $get{q}) {
        $table = {};
        printimgs(@rows);
 }
+elsif ($Request and $Request =~ /^\d+$/) {
+       printimgs([$Request]);
+}
 else {
-       printimgs($Request || $table->{''}->[0]);
+       printimgs($table->{''}->[0]);
 }
 say '</section>';