]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/bugs/newfile-test.mdwn
web commit by cworth: Attempting to protect patch content with indentation...
[ikiwiki.git] / doc / bugs / newfile-test.mdwn
index b5e7428bd4c3cc268ed609169a82f54bc743f39c..34e3ac6c8a6aa48489a29232bf59fb5c10c23922 100644 (file)
@@ -6,4 +6,6 @@ The CGI tries to decide whether an user is trying to edit a new file or not with
 
 Assume the script is called like this `http://example.com/ikiwiki.cgi?page=discussion&from=some-page&do=create`. The `if (exists $pagesources{$page}) {` test determines whether there's a file called `$config{srcdir}/discussion`. Most installs won't have a `$config{srcdir}/discussion` page, so this test will fail causing the else clause to be executed. In this case, the else clause results in `$file` being set to `discussion.mdwn`. Thus, on typical installs `value => ! -e "$config{srcdir}/$file",` always succeeds, which results in the expected behaviour, albeit for the wrong reasons. Similarly, the ` $form->field(name => "rcsinfo", value => rcs_prepedit($file)` line is also meaningless because `$file` isn't what we think it is.
 
-(To confirm that this wasn't just a result of my imagination, I created [[/discussion]] on this site; feel free to delete it now.) 
\ No newline at end of file
+(To confirm that this wasn't just a result of my imagination, I created [[/discussion]] on this site; feel free to delete it now.) 
+
+> I've fixed it to only look for an existing page if it's not creating a new page, so [[bugs/done]] --[[Joey]]