From: Steve W. <sw...@wc...> - 2000-09-20 23:51:30
|
Strange your email hasn't come through... > I've slightly modified wiki_mysql.php3 so that it runs with OpenDataBase as > intended. > > Are we using "lib/*" yet? index.php3 still uses wiki_*.php3, so I fixed those > files. No, I only added the directory and tested it on my home box. I read through a lot of CVS docs and couldn't find a good way to rename files, so the log information will be broken up unfortunately. > It looks like the current CVS MAIN branch isn't in good shape. > > E.g. I got a strange bug, where if you edit a file and write > > word1 > word2 > > it would be rendered as "word1word2" (no space!!) > > The cause: Jeff's change in version 1.1.3 of wiki_savepage > He modified > $pagehash["content"] = explode("\n", $content); > to > $pagehash["content"] = preg_split('/[ \t\r]*\n/', chop($content)); > in order to get rid of all unnecessary spaces. > Actually this removed the trailing '\r' our lines used to have in the > pagehash[content] array - that's why some parts may behave strange. > > This (IMHO serious) bug was introduced 2000/07/20 (I don't blame Jeff, these > things just happen). But it got unnoticed until now - or can't you reproduce > the bug? No, I haven't encountered this yet. In the last week or two I did see a link that didn't link, but didn't have time/energy to investigate... I should start using the bug tracking software on SF for that. Now I'll have to go find it again. > Next, "admin/" is broken - it doesn't use the latest DB interface. > > The current form of OpenDataBase is silly. It should be split into a > "ConnectDataBase" and "SelectDataBase". Also, I find the change of 3 > arguments for RetrievePage() questionable. Either use OpenDataBase > throughout, or use 3 argument fucntions throughout, but don't mix the two > cases. This is a Bad Thing to do. hmm. Perhaps I don't understand. Open the database, and interact with the database. But there is a third argument now to specify the table (page or archive). I realized there is an inconsistency that there is one RetrievePage and two functions for inserting pages (InsertPage and SaveCopyToArchive) and that it's a mess and needs cleaning up... since PhpWiki is a fairly small application (that does an awful lot though), it's not too late to munge these things. I think we need to differentiate the page store and the archive, otherwise the archive format has to be the same as the page store format (or schema, if you prefer). It seems to me that in the long run we want either one page store entirely, or two separate stores that differ in schema/format/attributes/whatever. I think I lean towards the latter camp (if we decide that archived pages are stored only as diffs, why store them in the page table?) because the small amount of duplication now will pay off in the long run. > > So what I'm saying is: before Steve releases 1.1.8 we should get our act > together and do some cleanup and testing. Aye! :-) sw ................................ooo0000ooo................................. Hear FM quality freeform radio through the Internet: http://wcsb.org/ home page: www.wcsb.org/~swain |