From: Steve W. <sw...@wc...> - 2000-09-21 20:44:40
|
On Thu, 21 Sep 2000, Arno Hollosi wrote: > > > 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!!) > > > No, I haven't encountered this yet. > > Could you verify that? Also, could you verify that my fix in wiki_transform > doesn't break things at your end? (try pre-formatted text and see if > erroneous empty lines are displayed) I will try to test it tonight after 10pm EST... any chance you can create an error on Sourceforge? http://phpwiki.sourceforge.net:80/phpwiki/index.php3?TestPage or here: http://wcsb.org:80/~swain/phpwiki1/index.php3?TestPage This version runs on mSQL and I just ran a cvs update -d on it. > > > The current form of OpenDataBase is silly. It should be split into a > > > "ConnectDataBase" and "SelectDataBase". > > hmm. Perhaps I don't understand. Open the database, and interact with the > > database. > > As it is now, OpenDataBase connects to e.g. mySQL every time it is called. Wow, I must have missed something entirely. There should be only one call to OpenDataBase, and that should be in index.php3. [swain@boojie phpwiki1]$ grep OpenDataBase *php3 index.php3: $dbi = OpenDataBase($WikiPageStore); test_dbmlib.php3: // OpenDataBase() test_dbmlib.php3: $dbi = OpenDataBase($WikiPageStore); test_dbmlib.php3: echo "Return type from OpenDataBase($WikiPageStore): $vartype<br>\n"; wiki_db_filesystem.php3: OpenDataBase($table) wiki_db_filesystem.php3: function OpenDataBase($dbname) { wiki_db_filesystem.php3: $hcdb = OpenDataBase($WikiDB['hitcount']); wiki_db_filesystem.php3: $hcdb = OpenDataBase($WikiDB['hitcount']); wiki_dbmlib.php3: OpenDataBase($table) wiki_dbmlib.php3: function OpenDataBase($dbname) { wiki_diff.php3:// $dba = OpenDataBase($ArchivePageStore); wiki_editpage.php3: // $cdbi = OpenDataBase($WikiPageStore); wiki_msql.php3: OpenDataBase($dbname) wiki_msql.php3: function OpenDataBase($dbinfo) { wiki_mysql.php3: OpenDataBase($dbname) wiki_mysql.php3: function OpenDataBase($dbname) { wiki_mysql.php3: $adbi = OpenDataBase($ArchivePageStore); wiki_pageinfo.php3: // $dbi = OpenDataBase($WikiPageStore); --- done by index.php3 wiki_pageinfo.php3: // $dbi = OpenDataBase($ArchivePageStore); wiki_pgsql.php3: OpenDataBase($table) wiki_pgsql.php3: function OpenDataBase($table) { Sigh. I am going to have to install MySQL to run tests on. The quickest way to debug this is to put an echo statement in OpenDataBase for all libs and make sure it only appears once. > The inconsistence I'm complaining about is: some functions rely on the > pagestore opened by OpenDataBase($pagestore) (e.g. the search functions), > some are using a 3rd argument (e.g. RetrievePage), and some are splitted into > two separate functions alltogether (InsertPage, SaveCopyToArchive). > This is bad and will lead to obscure errors. Yes... I agree, and we'll rectify it. > A possible solution: get rid of multiple functions and 3rd arguments, and > split OpenDateBase in two functions: a real OpenDB that connects to resp. > opens the DB, and a SelectPageStore(). Or use 3 arguments throughout. That would mean: OpenDataBase() SelectPageStore() InsertOrUpdatePage() RetrievePage() > Going to correct another bug now: search results display lines without > safeguarding against HTML - try a fulltext search on wiki and look for the > results of TestPage and you see what I mean. Heh. On wcsb.org search boxes don't render at all at the moment. They work on SF... I'll add search boxes to TestPage. > Oh, and of course the entire documentation could need an overhaul. > Any volunteers? ;o) The lowest of activities! Of course I'll do it :-) sw ...............................ooo0000ooo................................. Hear FM quality freeform radio through the Internet: http://wcsb.org/ home page: www.wcsb.org/~swain |