pagetype is exported

master
Joey Hess 2008-09-27 13:34:46 -04:00
parent 3b39e93699
commit 316ef6571b
3 changed files with 3 additions and 3 deletions

View File

@ -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, {

View File

@ -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);
}

View File

@ -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}) {