From: Carsten K. <car...@us...> - 2003-12-07 17:14:14
|
On Saturday, December 6, 2003, at 07:34 pm, Micki Kaufman wrote: > Hi there. > > Here's a simple, but very very annoying new experience I'm having - I > hope someone can give me the key. > > I'm splitting one of our sites, and after clicking 'upload' to restore > the new phpwiki with the prior .zipdump (not a snapshot, because I > want to retain the edit history as much as possible), I get the > following error in PhpWikiAdministration for every revision of every > page after the first: > > "PageName > from MIME file [name] has edit conflicts - skipped " > > and for each, I have the option to 'Merge Edit' or 'Restore Anyway' > > I know I want to 'Restore Anyway', but we have hundreds of pages here, > many with up to ten revisions. > > How can I return the behavior to the desired pattern, where all the > revisions are loaded in automatically, and I can avoid the hundreds of > mouseclicks? > > Thanks amazingly much, > Micki > Hi Micki, 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); |