diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-02-04 18:24:15 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-02-04 18:24:15 -0500 |
commit | 8380a9d0009fee740f980aee3d45a933a5b24219 (patch) | |
tree | 625a29926e459c0f81fd5f70cd6ac45144297c36 /IkiWiki/Plugin/editpage.pm | |
parent | a2e78ebcf27680eedf30e00f1ee9b86ed1d9e127 (diff) | |
download | ikiwiki-8380a9d0009fee740f980aee3d45a933a5b24219.tar ikiwiki-8380a9d0009fee740f980aee3d45a933a5b24219.tar.gz |
factor out a userpage function
Not yet exported, as only 4 quite core plugins use it.
Diffstat (limited to 'IkiWiki/Plugin/editpage.pm')
-rw-r--r-- | IkiWiki/Plugin/editpage.pm | 5 |
1 files changed, 3 insertions, 2 deletions
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 { |