From: Steve W. <sw...@wc...> - 2000-08-15 03:31:19
|
OK, after a lot of hair pulling I've done some (imperfect) refactoring of the database interface: SaveCopyToArchive is now in the database libraries (out of stdlib) because it will be implementation dependent. I've added IsInArchive() which works the same as IsWikiPage(). RetrievePage() now takes a third argument, the table name (or page store if you prefer). This is kind of unfortunate but can be remedied, because SaveCopyToArchive is really just a copy now of InsertPage, and I should have written a RetrieveCopy() instead. That is, InsertPage is to SaveCopyToArchive IsWikiPage is to IsInArchive RetrievePage stands alone But after a day of dead ends and testing, testing, testing it will have to wait. index.php3 just makes one call to open the database. It doesn't matter if the user is editing a live page or a copy. Several other pages no longer make calls to open the database. I've tested this new version on the DBM and Postgresql bases over and over, and it looks good. I can load pages, edit copies, do diffs, info, title and fulltext searches, and RecentChanges works. Now, another thing that has really troubled me over the weekend: On Thu, 10 Aug 2000, Jeff Dairiki wrote: > If we are going to move to a new OO database API, it seems to me that there's > no point in putting too much effort into implementing features in the > old API. I looked through the code base Jeff wrote, and it's so amazing... but it defines 57 classes, and is quite inpenetrable! It works so well though that it really deserves its own release. Jeff, would you like to release this as a special verion of PhpWiki? Perhaps a 1.3 branch? It's so far removed from the 1.1 branch that I don't think they can be merged (which was never your goal anyway). I've really anguished over what to do about the differences between the code bases; I think they both deserve release. 1.1 is so close to being finished, and we have so many ideas it's tempting to keep racing ahead, but I think that's what happened to Project Xanadu, and they never released anything. I'm anxious myself to start on a 2.0 code base. After today's hacking I see the kruft creeping in everywhere in the 1.1 code. sw ...............................ooo0000ooo................................. Hear FM quality freeform radio through the Internet: http://wcsb.org/ home page: www.wcsb.org/~swain |