Search some standard locations for PEAR library code if DB.php is
not found in PHP's include_path.
Added some workarounds for a bug in the PEAR DB code which ships
with PHP 4.0.6.
(I have now tested the MySQL backend with PEAR code from PHP 4.0.4pl1,
PHP 4.0.5 and PHP 4.0.6. Only the 4.0.6 code is buggy. With the new
fixes, all three versions seem to work fine. The bug is reported
to be fixed in the CVS version of the PHP source code.)
This is a major change, to say the least. Some highlights:
o Completely new database API.
WARNING: all database schemas (currently MySQL, Postgres and DBA
support is working) use completely revised schema, so you must
start this new code with a new blank database...
o WikiPlugins
o New template engine.
In addition, some more incremental changes:
o Cascading Style Sheets reworked.
o Expanded syntax for text search: e.g. "wiki OR wacky AND NOT page".
o PhpWiki should now work with register_globals off. (Security issue.)
o Edit preview button.
(and probably more, which I'm forgetting about now.)
Much of this code is still in a state of flux (particularly
the new template engine code, and to a lesser extent the API
for the plugins.)
Feel free to play and hack on this, just be warned that some of it may
still change quite a bit...
See pgsrc/ReleaseNotes for a few more notes.
And feel free to post questions or comments either publicly on
<phpwiki-talk@lists.sourceforge.net>, or privately, to
<dairiki@dairiki.org>.
Added link to PhpWikiAdministration. This is really for the person who
first installs PhpWiki, because we've gotten a lot of questions about
this. I would think most people will remove this link when they
personalize the HomePage, so putting it here should be fine.
wainstead [Sun, 12 Aug 2001 23:57:37 +0000 (23:57 +0000)]
Undefined links will now have a question mark at the start instead of
at the end of the link; this idea comes from the book The Wiki Way and
it's supposed to be a bit clearer to the user.
Added support for bogo-logins.
One can now "login" using any WikiWord as a user ID.
(Unless logging in as the admin user, any password will work.)
Currently, the sole effect of logging in is that the
the logged-in user ID is recorded as the author of any
page edits. Thus, "logging in" allows one to control
the author which appears in RecentChanges and the page
info display.
Initial file for an abstract base class. For now I copy/pasted the
methods suggested in WikiDatabase
(http://phpwiki.sourceforge.net/phpwiki/index.php) as a starting
point, though there were a few that were undecided and I left those
out.
At least for now the class can support retrievePage() and insertPage()
and a few other basic methods, so rudimentary work can start.
The flowerbox reads:
/*
* Abstract base class for the database used by PhpWiki.
* This should be extended by classes for DB/dbx, dba and
* flat file.
*/
Fixed the table names. Here is an example of duplicate information,
where the table names are stored both in schema.mysql and
mysql.php. Of course I failed to notice this and the nightly build was
broken. Task #34376.
uckelman [Tue, 26 Jun 2001 18:14:41 +0000 (18:14 +0000)]
Removed EditCopy link.
Removed minor edit code, but I will be adding it back Real Soon(tm).
Added ###IF !CURRENT### block to notify user when editing an archived page.
Added ###CURRENT_VERSION### to handle concurrent edit checking.
uckelman [Tue, 26 Jun 2001 18:08:32 +0000 (18:08 +0000)]
lib/editpage.php
- Added $version to RetrievePage calls.
- Removed EditCopy, since it's no longer needed.
lib/loadsave.php
- Changed call to InsertPage to ReplaceCurrentPage.
- Changed call to SaveCopyToArchive to SavePageToArchive.
- Added $version to RetrievePage calls.
lib/savepage.php
- Changed call to InsertPage to ReplaceCurrentPage.
- Changed call to SaveCopyToArchive to SavePageToArchive.
- All old versions of pages are now saved to archive.
- Added $version to RetrievePage calls.
lib/stdlib.php
- Changed call to InsertPage to ReplaceCurrentPage.
- Added $version to RetrievePage call.
- Added $WikiPageStore as global in GeneratePage.
- Added CURRENT as _iftoken. This is needed so users can edit from archived pages, but still be prevented from completing their edit if the current page version changes while they are editing. VERSION doesn't work for this anymore, since the version being edited might not be CURRENT.
uckelman [Tue, 26 Jun 2001 18:04:54 +0000 (18:04 +0000)]
Added $version to RetrievePage call.
Added code to determine which pagestore to check when displaying pages, since user could be requesting something from the archive.
uckelman [Tue, 26 Jun 2001 18:01:01 +0000 (18:01 +0000)]
Lots of changes here:
- Added $clobber as argument to InsertPage. If $clobber, then use 'replace '; otherwise use 'insert'i. Pages going into the current store should clobber, but pages going into the archive should not. (Assuming that an unlimited number of pages are kept. I still need to implement archive limiting...)
- Created function ReplaceCurrentPage.
- Moved link updating from InsertPage to ReplaceCurrentPage.
- Renamed SaveCopyToArchive to SavePageToArchive.
- Created function RetrievePageVersions. Returns an arary of page hashes that contains all versions of the specified page.
- Added $version as argument to RetrievePage. It needs to know which version to get. Version 0 (zero)is magic, and always refers to the current version.
- Created function GetMaxVersionNumber. This is used mostly to determine which version to get for the diffs against current pages.
- Created function IsVersionInWiki.
- Created function IsVersionInArchive.
- Created function SelectStore. Given a page name and a version, this function returns the store where that page resides.
wainstead [Fri, 22 Jun 2001 21:24:40 +0000 (21:24 +0000)]
Converted white space only; I ran indent-region on the whole buffer in
Emacs while in PHP mode; then I hunted through the file for any
inconsistencies (there were a couple), then ran untabify on the whole
buffer. This is largely what the code style should look like.
Restrict the conditions under which we try to load initial page
contents from pgsrc.
Now we only load pgsrc iff the user is attempt to browse the HomePage.
This allows some hope of fixing things if the configured pgsrc, e.g.
doesn't include a HomePage. (Without this patch, one gets stuck in a
loop --- every attempt to do anything with the wiki results in a
load of pgsrc.)
dairiki [Wed, 14 Mar 2001 19:48:29 +0000 (19:48 +0000)]
Attempt to fix the recognition of international characters within
WikiWords.
Older (pre 3.x) PCRE libraries, which are used by some PHPs do not
support POSIX named character classes (e.g. [:alnum:]).
I've added a new function, pcre_fix_posix_classes(), which
(only if necessary) will replace POSIX named classes in a regexp
with an enumerated equivalent.
dairiki [Wed, 7 Mar 2001 16:45:20 +0000 (16:45 +0000)]
Recognize international characters in WikiWords.
We do this by using POSIX character classes (like [[:upper:]]) in the
perl regexps. Getting this to work involves calling setlocale().
(See comments in lib/config.php for more details.)
I suspect my current hacks will not work in all PHP environments. I'd
appreciate success/failure reports.
dairiki [Fri, 2 Mar 2001 00:24:17 +0000 (00:24 +0000)]
Attempts to clean up generated HTML.
WikiTransform::SetHTMLMode():
Eliminate the $tagtype argument, since somewhere along the line it
had lost all meaning.
Check when pushing nested elements that the top-level element is of
a type which can contain other block-level elements. Elements of type
<p>, and <pre>, among others, are not allowed to contain other
block-level elements.
wtm_list_dl:
Fix bug (which manifested itself only with non-empty <dt>s).
Some remaining problems which perhaps should be addressed:
Wtm_title_search, wtm_fulltext_search, wtm_mostpopular as well
as some of the the magic phpwiki: links (the ones which generate
forms) all generate some sort of block-level HTML element (either
<form>s or <dl>s.) As noted above, these are not allowed within
<p> elements (and others).
Bold/italics: __Bold ''BoldItalic__ Italic''
... it's contrived, but it will generate improperly nested HTML.
dairiki [Thu, 1 Mar 2001 01:59:00 +0000 (01:59 +0000)]
SF Patch #404963:
Updated German pgsrc by Jörg Rathlev <jrathlev@users.sourceforge.net>
I've done some work to complete the german translation
of the files in locale/de/pgsrc/. I've also slightly
modified some of the already translated german pages.
The only pages I've not (yet) translated are GuterStil
(english GoodStyle - hard to do since it's only a
quotation), PhpWikiAdministration and WabiSabi. All
other pages are included in the attached zip archive.