From 8380a9d0009fee740f980aee3d45a933a5b24219 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Feb 2010 18:24:15 -0500 Subject: factor out a userpage function Not yet exported, as only 4 quite core plugins use it. --- IkiWiki/Plugin/editpage.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/editpage.pm') diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index fca970c60..219386a30 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -245,8 +245,9 @@ sub cgi_editpage ($$) { push @page_locs, $dir.$page; } - push @page_locs, "$config{userdir}/$page" - if length $config{userdir}; + my $userpage=IkiWiki::userpage($page); + push @page_locs, $userpage + if ! grep { $_ eq $userpage } @page_locs; } @page_locs = grep { -- cgit v1.2.3