From: Micki K. <mic...@co...> - 2004-02-24 19:32:55
|
>The only problem/feature is that conflicts are skipped and not overwritten. >-- >Reini Urban Hi Reini: The patch Carsten sent me should allow an 'upload and overwrite' function, which will retrieve and restore ALL page versions, not just the first. I'd consider the current behavior a bug, since it only loads the first version of the page, not the latest - if it only loaded the latest it would only be a 'functionality gap', in my opinion. I attached the patch below for your review. Rock on! Thanks, Micki PATCH >Admittedly the loadsave functions do need some more work. In the >mean time, here's a quick hack I whipped up to do exactly what you >need. > >Add this line to PhpWikiAdministration: <?plugin WikiForm action=upload buttontext="Upload & OVERWRITE" overwrite=1 ?> >Patch lib/plugin/WikiForm.php with the enclosed patch. > >It should go without saying, but here it is anyway: BE CAREFUL you >don't do something silly like upload the wrong file! :) > >Carsten Index: WikiForm.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/WikiForm.php,v retrieving revision 1.9 diff -U2 -r1.9 WikiForm.php --- WikiForm.php 26 Feb 2003 01:56:52 -0000 1.9 +++ WikiForm.php 7 Dec 2003 17:08:54 -0000 @@ -43,4 +43,5 @@ 'default' => false, 'buttontext' => false, + 'overwrite' => false, // HACK ALERT 'size' => 50); } @@ -107,4 +108,8 @@ $input = HTML::input($input); + if ($overwrite) + $input->pushContent(HTML::input(array('name' => 'overwrite', + 'value' => 1, + 'type' => 'hidden'))); $input->addTooltip($buttontext); $button = Button('submit:', $buttontext, $class); -- Micki mailto:mic...@co... |