From: Sergio T. <ser...@ho...> - 2003-12-07 22:39:42
|
>From: Carsten Klapp <car...@us...> >To: Micki Kaufman <mic...@co...> >CC: php...@li... >Subject: Re: [Phpwiki-talk] Restore 'has edit conflicts - skipped' - how to >avoid >Date: Sun, 7 Dec 2003 12:14:00 -0500 > > >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); > Hi Carsten, Out of curiosity, I'm wondering if I should use this patch for the following situation I find myself in: I created a Wiki a few months ago and then some colleagues of mine entered some content into the Wiki. However, the group has recently collaboratively agreed to change the name of the Wiki. So my idea is to back up the entire Wiki content of the existing Wiki, and then I will create a new Wiki (with the new name that our group has agreed to use), and then restore the content from the old Wiki to the new one. Does this sound like a good approach, perhaps using your patch, or maybe there's a simpler way to move content around from one named Wiki to another (or a better way to rename a Wiki)? Thanks for any suggestions! -Serg Serj _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |