From 5501e73b8597c144049bff0b594e4767fe8ddd1e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 30 Aug 2007 11:18:51 +0200 Subject: fill_empty_page.pm: Make it works as expected. The previousversion would agagin overwrite the content of the page with the template's content as soon as the page is being saved or previewed. --- .library/IkiWiki/Plugin/fill_empty_page.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to '.library/IkiWiki') diff --git a/.library/IkiWiki/Plugin/fill_empty_page.pm b/.library/IkiWiki/Plugin/fill_empty_page.pm index 30396438..b2ce1fc0 100644 --- a/.library/IkiWiki/Plugin/fill_empty_page.pm +++ b/.library/IkiWiki/Plugin/fill_empty_page.pm @@ -43,6 +43,8 @@ sub formbuilder_setup return if $form->title ne "editpage"; return if $form->field("do") ne "create"; + return if defined $form->field ("editcontent"); + # This is obviously not the last conclusion of wisdom. my $empty_page_page = bestlink ($page, "empty_page") || return; my $empty_page_file = $pagesources {$empty_page_page} || return; -- cgit v1.2.3