From be092a67c22e98885f79936c18529f9fac5c0fe0 Mon Sep 17 00:00:00 2001
From: joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Date: Sun, 13 Aug 2006 05:56:01 +0000
Subject: [PATCH] * Fix a bug in page type determination during online editing.

---
 IkiWiki/CGI.pm   | 4 +---
 debian/changelog | 6 ++++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index db97740f6..f1f83cfc4 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -372,9 +372,7 @@ sub cgi_editpage ($$) { #{{{
 			# favor the type of linking page
 			$type=pagetype($pagesources{$from});
 		}
-		else {
-			$type=$config{default_pageext};
-		}
+		$type=$config{default_pageext} unless defined $type;
 		$file=$page.".".$type;
 	}
 
diff --git a/debian/changelog b/debian/changelog
index 0efb4f6b1..66336196f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ikiwiki (1.19) UNRELEASED; urgency=low
+
+  * Fix a bug in page type determination during online editing.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 13 Aug 2006 01:53:02 -0400
+
 ikiwiki (1.18) unstable; urgency=low
 
   * The last release accidentially installed ikiwiki as ikiwiki.pl, now fixed.
-- 
2.39.5