diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-09-27 13:34:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-09-27 13:34:46 -0400 |
commit | 316ef6571b94995d8eef0956b1f55b591db869d3 (patch) | |
tree | 10c3a8557672bb12c2ce282430df8414794c7b60 | |
parent | 3b39e936991f18df1c9fa812365acb55ce725b08 (diff) | |
download | ikiwiki-316ef6571b94995d8eef0956b1f55b591db869d3.tar ikiwiki-316ef6571b94995d8eef0956b1f55b591db869d3.tar.gz |
pagetype is exported
-rw-r--r-- | IkiWiki/Plugin/attachment.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/remove.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/rename.pm | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index f1a9b1939..6214df7f3 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -271,7 +271,7 @@ sub attachment_list ($) { #{{{ my @ret; foreach my $f (values %pagesources) { - if (! defined IkiWiki::pagetype($f) && + if (! defined pagetype($f) && $f=~m/^\Q$loc\E[^\/]+$/ && -e "$config{srcdir}/$f") { push @ret, { diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index 772be07b5..91a66cb6e 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -46,7 +46,7 @@ sub check_canremove ($$$) { #{{{ # If a user can't upload an attachment, don't let them delete it. # This is sorta overkill, but better safe than sorry. - if (! defined IkiWiki::pagetype($pagesources{$page})) { + if (! defined pagetype($pagesources{$page})) { if (IkiWiki::Plugin::attachment->can("check_canattach")) { IkiWiki::Plugin::attachment::check_canattach($session, $page, $file); } diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 4ee377b86..0ea77ec64 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -29,7 +29,7 @@ sub check_canrename ($$$$$$) { #{{{ my $q=shift; my $session=shift; - my $attachment=! defined IkiWiki::pagetype($pagesources{$src}); + my $attachment=! defined pagetype($pagesources{$src}); # Must be a known source file. if (! exists $pagesources{$src}) { |