aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-01 20:35:54 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-01 20:35:54 -0400
commited25c2abf259ad1e4f307f0656175a90906b93ba (patch)
treeec50654f88a7c50c7dbcce0875c49d12148836da /IkiWiki
parent883da338a468cff3a03d1627f3a7f7ea7afe56d6 (diff)
downloadikiwiki-ed25c2abf259ad1e4f307f0656175a90906b93ba.tar
ikiwiki-ed25c2abf259ad1e4f307f0656175a90906b93ba.tar.gz
fixes
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index 38c241350..ae06922d4 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -22,7 +22,7 @@ sub formbuilder_setup (@) { #{{{
if ($form->field("do") eq "edit") {
$form->field(name => 'attachment', type => 'file');
# These buttons are not put in the usual place, so
- # is not added to the normal formbuilder button list.
+ # are not added to the normal formbuilder button list.
$form->tmpl_param("field-upload" => '<input name="_submit" type="submit" value="Upload Attachment" />');
$form->tmpl_param("field-link" => '<input name="_submit" type="submit" value="Insert Links" />');
}
@@ -220,7 +220,7 @@ sub parsesize ($) { #{{{
my $base=$size+0; # force to number
use warnings;
foreach my $unit (sort keys %units) {
- if ($size=~/\d\Q$unit\E$/i) {
+ if ($size=~/[0-9\s]\Q$unit\E$/i) {
return $base * $units{$unit};
}
}
@@ -232,7 +232,7 @@ sub humansize ($) { #{{{
foreach my $unit (reverse sort { $units{$a} <=> $units{$b} || $b cmp $a } keys %units) {
if ($size / $units{$unit} > 0.25) {
- return (int($size / $units{$unit} * 10)/10)."$unit";
+ return (int($size / $units{$unit} * 10)/10).$unit;
}
}
return $size; # near zero, or negative