dairiki [Fri, 21 Feb 2003 04:20:09 +0000 (04:20 +0000)]
Big refactor. Formatting now done by the stuff in PageType.php.
Split the template into two separate ones: one for the add comment form,
one for comment display.
carstenklapp [Thu, 20 Feb 2003 18:13:38 +0000 (18:13 +0000)]
Workaround for recent changes to WikiPlugin->getPlugin.
Made admin restriction for viewing this page optional.
Now defaults to any user may view this page (mainly for PhpWiki Demo site).
Minor code changes & reformatting.
dairiki [Tue, 18 Feb 2003 21:52:07 +0000 (21:52 +0000)]
Fix so that one can still link to wiki pages with # in their names.
(This was made difficult by the introduction of named tags, since
'[Page #1]' is now a link to anchor '1' in page 'Page'.
Now the ~ escape for page names should work: [Page ~#1].
dairiki [Tue, 18 Feb 2003 20:24:13 +0000 (20:24 +0000)]
Some fixes for nested nestled markup.
The nestled markup starting delimiter can now be immediately
preceded by any of
- " ' / : ( { < _ = * (or white-space, of course)
If it is preceded by any of the balanced openers: ( { < _ = *,
the the starting delimiter can not be immediately followed
by the matching closer: ) } > _ = *.
dairiki [Tue, 18 Feb 2003 02:49:20 +0000 (02:49 +0000)]
Finish tight/loose list refactor.
If this works, you should notice (if you have a modern CSS aware
browser) that the vertical spacing in lists should look more or
less like what you put in. (E.g. If you put a blank line between two
list items, you'll get more space between them than if you don't.)
TO FIX: I've probably screwed up rendering in the older marginally
CSS-aware browsers, e.g. NS4. I don't have NS4 installed right now
to play with. I'll try to play around with that soon...
dairiki [Mon, 17 Feb 2003 06:06:33 +0000 (06:06 +0000)]
Refactor & code cleanup.
Added two new plugin arguments:
min_age - only display pages which have been "deleted" for at
least this many days. (Use min_age=none to get all
pages, even non-deleted ones listed.)
max_age - automatically check the checkboxes of pages which
have been "deleted" this many days or more.
("Deleted" means the current version of the page is empty.
For the most part, PhpWiki treats these "deleted" pages as
if they didn't exist --- but, of course, the PageHistory is
still available, allowing old versions of the page to be restored.)
dairiki [Mon, 17 Feb 2003 05:58:42 +0000 (05:58 +0000)]
Fix form action URI and hidden inputs.
Eliminated "Sign In" button when javascript is enabled.
(It's unneccesary, and as it was there were two
identical "Sign In" buttons when javascript was disabled.)
dairiki [Mon, 17 Feb 2003 05:56:26 +0000 (05:56 +0000)]
New method getPostURL() to get URL for use in form POST actions.
Method requiredAuthority(): add hook by which plugins can request
that PhpWiki request login for form POSTs. (This is used by
my refactor of the WikiAdminRemove plugin which I will commit
shortly.)
dairiki [Sun, 16 Feb 2003 19:49:18 +0000 (19:49 +0000)]
When redirecting to a page, use an absolute URL.
This fixes a bug when redirecting from a sub-page (since,
in that case the redirect happens before the <base> element gets
sent.)
dairiki [Sun, 16 Feb 2003 19:43:10 +0000 (19:43 +0000)]
New methods:
WikiDB::set($key, $val)
WikiDB::get($key)
To support global meta-data. Before you make use of these methods,
please consider that they are implemented in a somewhat
hackish manner, and are not likely to be very efficient.
New methods:
WikiDB::getTimestamp()
WikiDB::touch()
To support the notion of a global timestamp on the WikiDB.
In WikiDB_Page::set():
Delete special magic for setting 'pref'. Currently, this appears to
be either unused or broken (since 'pref' seems to be set to a
serialized value.) In any case, this magic shouldn't be here.
If you need special handling put it before the call
to WikiDB_Page::set().
dairiki [Sun, 16 Feb 2003 05:09:43 +0000 (05:09 +0000)]
Starting to fix handling of the HTTP validator headers, Last-Modified,
and ETag.
Last-Modified was being set incorrectly (but only when DEBUG was not
defined!) Setting a Last-Modified without setting an appropriate
Expires: and/or Cache-Control: header results in browsers caching
the page unconditionally (for a certain period of time).
This is generally bad, since it means people don't see updated
page contents right away --- this is particularly confusing to
the people who are editing pages since their edits don't show up
next time they browse the page.
Now, we don't allow caching of pages without revalidation
(via the If-Modified-Since and/or If-None-Match request headers.)
(You can allow caching by defining CACHE_CONTROL_MAX_AGE to an
appropriate value in index.php, but I advise against it.)
Problems:
o Even when request is aborted due to the content not being
modified, we currently still do almost all the work involved
in producing the page. So the only real savings from all
this logic is in network bandwidth.
o Plugins which produce "dynamic" output need to be inspected
and made to call $request->addToETag() and
$request->setModificationTime() appropriately, otherwise the
page can change without the change being detected.
This leads to stale pages in cache again...
These deal with setting the Last-Modified and ETag headers of the
HTTP response. They also parse and handle the conditional request
headers 'If-Modified-Since', 'If-Unmodified-Since', 'If-Match',
and 'If-None-Match'.
dairiki [Sat, 15 Feb 2003 23:32:57 +0000 (23:32 +0000)]
Usability improvements for the RedirectTo plugin.
(Mostly this applies when using RedirectTo with a page=OtherPage
argument to redirect to another page in the same wiki.)
(Most of these ideas are stolen verbatim from UseModWiki.)
o Multiple redirects (PageOne -> PageTwo -> PageThree) not allowed.
o Redirects are not activated except when action == 'browse'.
o When redirections are disabled, (hopefully understandable)
diagnostics are displayed.
o A link to the redirecting page is displayed after the title
of the target page. If the user follows this link, redirects
are disabled. This allows for easy editing of the redirecting
page.
FIXME: Stylesheets, and perhaps templates other than the defaults
will probably have to be updated before this works well in other
styles and/or themes.
dairiki [Sat, 15 Feb 2003 23:25:48 +0000 (23:25 +0000)]
New method WikiPlugin::disabled($message).
For use when expansion of a plugin is disabled.
This displays a message (like WikiPlugin::error()), and also
displays the text of the plugin invocation.
See lib/plugins/RedirectTo.php for usage examples.
dairiki [Sat, 15 Feb 2003 02:24:23 +0000 (02:24 +0000)]
Fix for API change in WikiUser constructor.
However it seems that the only code affected is this file is currently
unused. I commented out the vestigal code --- if no one screams about
it, then whoever looks at it next can delete it.
dairiki [Sat, 15 Feb 2003 02:21:54 +0000 (02:21 +0000)]
API Change! Explicit $request argument added to contructor for WikiUser.
This seemed the best way to fix a problem whereby the WikiDB
was being opened twice. (Which while being merely inefficient
when using an SQL backend causes hangage when using a dba backend.)
dairiki [Sat, 15 Feb 2003 01:59:47 +0000 (01:59 +0000)]
Theme::getCSS(): Add Default-Style HTTP(-eqiv) header in attempt
to fix default stylesheet selection on some browsers.
For details on the Default-Style header, see:
http://home.dairiki.org/docs/html4/present/styles.html#h-14.3.2
carstenklapp [Wed, 29 Jan 2003 21:43:17 +0000 (21:43 +0000)]
Added note about www permissions for wiki_access.log.
Added links to Fink website.
Updated instructions for use with keychain-2.0.2.
Updated my e-mail address.
Other minor rewording.
zorloc [Tue, 28 Jan 2003 21:09:17 +0000 (21:09 +0000)]
The get_cfg_var() function should only be used when one is
interested in the value from php.ini or similar. Use ini_get()
instead to get the effective value of a configuration variable.
-- Martin Geisler
zorloc [Tue, 28 Jan 2003 21:07:16 +0000 (21:07 +0000)]
The regexp that matches InterWiki links was too greedy; it didn't
stop before a !. So Google:Hello! would search for 'Hello!' whereas
Google:Hello? only searches for 'Hello'. -- Martin Geisler
zorloc [Tue, 28 Jan 2003 21:06:05 +0000 (21:06 +0000)]
A fix for problems when file_exists($file) triggers a warning
because $file lies outside the area that PHP allows you to access
when running in Safe Mode. -- Martin Geisler
zorloc [Wed, 22 Jan 2003 03:21:40 +0000 (03:21 +0000)]
Modified WikiUser constructor to move the DB request for the homepage to
the end of the logic to prevent it from being requested and then dropped.
Added more phpdoc comments.
zorloc [Tue, 21 Jan 2003 07:40:50 +0000 (07:40 +0000)]
Modified WikiUser::_ok() -- Inverted the logic so the default is to return
false and to return true only in the desired condition. Added phpdoc
comments