git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
word: ignore non-numeric selection arguments
[sheet.git]
/
word.plp
diff --git
a/word.plp
b/word.plp
index 41d2bd330aa80a5d78b2a81c3a9e08284900ffdd..aed42fd57b997f08f6b1904c587df1f91de3b5d3 100644
(file)
--- a/
word.plp
+++ b/
word.plp
@@
-90,7
+90,7
@@
sub showimg {
sub printimgs {
say '<ul>';
for my $row (@_) {
sub printimgs {
say '<ul>';
for my $row (@_) {
- my ($id, $level, $title) =
split /:/, $row, 3
;
+ my ($id, $level, $title) =
@{$row}
;
$id or die "empty reference"; # assertion to prevent loops
my @type;
push @type, 'parent' if defined $table->{$id};
$id or die "empty reference"; # assertion to prevent loops
my @type;
push @type, 'parent' if defined $table->{$id};
@@
-110,8
+110,8
@@
if (exists $get{q}) {
if ($Request) {
my @query = $Request;
while (@query) {
if ($Request) {
my @query = $Request;
while (@query) {
- push @rows, grep {
(split /:/)
[1] <= $limit } @query;
-
s/:.*//
for @query;
+ push @rows, grep {
$_->
[1] <= $limit } @query;
+
$_ = $_->[0]
for @query;
@query = map {$_ ? @{$_} : ()} @{$table}{@query};
}
}
@query = map {$_ ? @{$_} : ()} @{$table}{@query};
}
}
@@
-122,7
+122,10
@@
if (exists $get{q}) {
$table = {};
printimgs(@rows);
}
$table = {};
printimgs(@rows);
}
+elsif ($Request and $Request =~ /^\d+$/) {
+ printimgs([$Request]);
+}
else {
else {
- printimgs($
Request || $
table->{''}->[0]);
+ printimgs($table->{''}->[0]);
}
say '</section>';
}
say '</section>';