|
From: Arno H. <aho...@in...> - 2000-06-20 22:36:25
|
> > - add the ability to dump the contents of a wiki into files like in /pgsrc > > - add the ability to dump from 1.0.x and 1.1.y wikis to 1.1.6 format. > * in a DBM-based Wiki, call dump.php3. can be in a mysql or pgsql wiki as well - I don't see any problems here. Just call RetreivePage and store it in a file. > * Choose between saving the page source only (like the files in pgsrc/), > or as serialized data structures (preserving all page information). How about having the page source in files like /pgsrc and one additional file that contains serialized data structures (in the 1.1.6 format)? > * call load.php3 to load pages; choose whether they are page source or > serialized hashes in files No need to create a new file - just instruct wiki_setupwiki.php3 to look for that additonal file and read in the serialized data and fill the newly created structures not with defaults but with values from that file. > * load the database, checking for each file whether it has all 8 > attributes (lastmodified, refs, created, version, etc) and add defaults if > they are not there > * go have coffee and relax Nice idea - we should add this to the README :o) On a side note: the file names have to be escaped in some way. The new naming scheme allows arbitrary characters and some filesystems don't allow that. Know of any good escaping scheme, short of naming the files 1,2,3,4,5,6, .... (I thought of something like using a special character, say ',' and escape any odd characters with their decimal value, e.g. the name "you \\don't// hear, do you?" would be saved as "you ,92,,92,don,39,t,47,,47, hear,44, do you,63," I guess you can see why this might not be a good solution) > what do you think about > making the schema for the ARCHIVE table the same as for WIKI? No problem. As you say: it saves code. It's always better to have easy manageable code. /Arno |