2005-12-13  Alex Schroeder  <alex@gnu.org>

	* modules/tables-long.pl (TablesLongRule): Fix problem with extra
	hr element or missing last cell if the table was the last thing on
	the page.
	(TablesLongRule, TablesLongRow): Implement rowspan.

2005-12-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ValidId): Return when $id is undefined before doing a
	replacement in order to not get a warning.

2005-12-08  Alex Schroeder  <alex@gnu.org>

	* modules/toc.pl (TocRule): Only set $TocShown if $TocAutomatic is
	true, and therefore a table of contents has in fact been shown.
	This solves the problem of <toc> only working before the first
	heading (and requiring no headings in the sidebar).
	(TocRule, TocHeadings): Change how anchor names are determined to
	rule out conflicts with included pages such as the sidebar.

2005-12-07  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPageLock): No longer print a separate error if the id
	parameter is missing.  Rely on ValidIdOrDie instead.
	(DoPost, ValidId): Refactor.

2005-12-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitVariables): Set $LastUpdate on every request and
	reinitialize some variables in case the server runs several
	mod_perl processes.

2005-11-07  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NewNamespaceScriptLink): Do not mangle
	actions matching $FullUrlPattern, as that breaks localnames.pl.
	Since $action is already URL-encoded, however, we do the same test
	as in ScriptLink: $UrlProtocols followed by the URL-encoded colon:
	%3a.

	* modules/usemod.pl (UsemodRule): Allow attributes in HTML tags as
	proposed by Peter Gervai.

2005-10-29  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetFooterTimestamp): Don't show diff link for new pages
	as suggested by Aaron Hawley.

2005-10-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PageDeletable): Empty pages should be deleted, but
	usually they contain exactly one newline.  All pages consisting of
	whitespace only shall now be deletable.

	* modules/namespaces.pl (NewNamespaceScriptLink): Do not mangle
	actions matching $FullUrlPattern, as that breaks localnames.pl.

	* modules/localnames.pl (NewLocalNamesReInit): New.

	* modules/namespaces.pl: Call NamespacesInitVariables as early as
	possible.

	* wiki.pl (ReInit): Reset $PermanentAnchorsInit if forced.

2005-10-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ReInit): New.
	(Save): Use it.
	(DeletePage): Use it, and fix IndexHash and IndexList.

	* modules/namespaces.pl (NamespacesInitVariables): Rewrite after
	the changes to the main script regarding initialization.  Always
	force a reinit (in a mod_perl context we cannot reuse the info).

	* plinks.js (addpLinks): Only mark up the first div.content in the
	document.

2005-10-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetCommentForm, DoEdit): Added p hotkey for preview at Perry
	Nguyen's suggestion.

2005-10-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintHtmlDiff): Don't use $revNew-1 as the default for
	the old revision if no new revision was specified, as suggested by
	Markus Lude on the wiki.
	(DoSearch): When replacing, quote metacharacters in the
	replacement text before searching for the replacement.
	(Replace): Rewrote replacement such as to solve quoting issues.

	* modules/localnames.pl (LocalNamesInit, LocalNamesNewNearInit):
	Merged LocalNamesNewNearInit with LocalNamesInit.
	
2005-10-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (BrowseResolvedPage): Visiting non-existing comment
	pages is ok, even if $NotFoundPg is set.

2005-10-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetFormStart): Use start_multipart_form instead of
	start_form, because CGI.pm 3.04 does not default to the correct
	encoding for forms.

2005-10-15  Victor Osadci  <vic_site@xhtml.md>

	* modules/translations/romanian-utf8.pl: Translate more strings,
	mostly error handling.

2005-10-14  Alex Schroeder  <alex@gnu.org>

	* modules/markup.pl (MarkupRule): Prevent forced markup from
	spanning empty lines when start and end tag are the same.  This is
	specially tricky when // is used on a file path, for example.

	* wiki.pl (ApplyRules): Add HTML entities to the default rules.
	(QuoteHtml): No longer unescape HTML entities.
	(GetSummary): Strip [URL text] from default summaries.
	(GetSummary): Only limit to default length after stripping URLs.

2005-10-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PageDeletable): Reverse order of statements such that
	empty pages can be deleted.
	(QuoteHtml): Make regexp stricter such as not to break the
	markdown module.

2005-10-10  Alex Schroeder  <alex@gnu.org>

	* wikiput (wikiput): Status code 200 is no error.

	* wiki.pl (InitVariables): Reorder calls so that $InterMap gets
	translated before it is read.
	
2005-10-09  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Test for $OpenPageName before comparing it
	with $StyleSheetPage or $ConfigPage.
	(Cookie): Just encode $FS since both keys and values are already
	encoded in CookieData.

	* modules/markup.pl (MarkupRule): Fix regexp for forced pairs,
	because it used to crash if no matching end was found for
	thousands of characters.
	(MarkupRule): Make sure empty elements are not created, eg ____
	stays ____ and does not turn into an empty (and thus invisible)
	element.

	* modules/tables-long.pl: 
	* modules/sidebar.pl: 
	* modules/referrer-tracking.pl: 
	* modules/portrait-support.pl: 
	* modules/page-trail.pl: Removed $DefaultStyleSheet.

	* modules/linebreaks.pl (LineBreakRule): Fixed the same typo we
	had in the main script many ages ago with a s* instead of \s*.

2005-10-08  Alex Schroeder  <alex@gnu.org>

	* modules/calendar:
	* modules/crumbs:
	* modules/dynamic-comments:
	* modules/irc: Removed $DefaultStyleSheet.
	
	* modules/edit-cluster: Removed $DefaultStyleSheet and tons of
	changes I do not understand anymore.  I don't even know what this
	module is for.  I should delete it.
	
	* OddMuse.pm: Require instead of do wiki.pl.

	* wiki.pl (ApplyRules): Close HTML environments before printing
	anything on pages containing files.

2005-10-07  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (handler): Removed mod_perl handling code.

	* modules/big-brother.pl (DoBigBrother): Make sure only unique
	targets are listed.

	* wiki.pl ($SummaryDefaultLength): New option as suggested by "ch"
	on the wiki, default to 150 instead of hard-coding 100.
	(GetSummary): Use it.

	(GetFormStart): No longer support the first parameter, encoding.
	Use the default provided by CGI.pm always.  Providing an encoding
	used to confuse newer versions of CGI.pm, resulting in invalid
	XHTML.
	(GetSearchForm, DoEdit): Fix call to GetFormStart.

2005-10-05  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($InterSiteInit): Renamed to $InterInit.
	($NearSiteInit): Renamed to NearInit.

	(InitVariables): No longer initialize $InterSiteInit, %InterSite,
	$NearSiteInit, %NearSite, %NearSearch, %NearSource, $IndexInit,
	$RssInterwikiTranslateInit, %PagePermanentAnchors,
	%RssInterwikiTranslate.  Instead, call AllPagesList, NearInit,
	PermanentAnchorsInit, and move CreateDir before the call to
	AllPagesList.
	(RSS): Don't test for $RssInterwikiTranslateInit before calling
	RssInterwikiTranslateInit.
	(RssInterwikiTranslateInit, NearInit): Return if already
	initialized.  Do the reset of global variables here.
	(InterInit, PermanentAnchorsInit): Ditto.
	(GetDownloadLink, ResolveId, OpenPage): Don't call AllPagesList.
	(GetPageContent): Ditto.
	(ResolveId, DoIndex, DeletePermanentAnchors): Don't call
	ReadPermanentAnchors.
	(ResolveId, GetSisterSites, DoIndex): Don't call NearInit.
	(DoSearch, SearchNearPages, $RssInterwikiTranslateInit): Ditto.
	(DoShowVersion): Ditto.
	(Save): Reset $IndexInit, $NearInit, $InterInit, and
	$RssInterwikiTranslateInit.

	($StyleSheetPage): Default value 'css'.
	(@CssList): New.
	(DoCss): New.
	(%Action): Added css action.
	(GetCss): Use the mime-type parameter and separate action if
	StyleSheetPage exists instead of inlining.
	(DoAdminPage): Add css action.

	(GetHeader): Add logo class to link.

	(ApplyRules): Don't call NearInit.  Print $StyleSheetPage and
	$ConfigPage in a pre tag.

	Switch to Apache2 and mod_perl2 support!
	(handler): Don't call Apache->request($r).  Use
	Apache2::Const::OK.
	
2005-10-02  Alex Schroeder  <alex@gnu.org>

	* modules/weblog-3.pl (DoCategories): Go to the edit page when
	submitting the form.

2005-10-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHeader): Add logo class to the logo link.

2005-09-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: Get rid of $DefaultStyleSheet.
	(GetCss): Don't use $DefaultStyleSheet; use
	http://www.oddmuse.org/oddmuse.css instead.

	(ReportError): Support arbitrary HTML fragments as an explanation.
	(DoEdit, DoPost): Use ReportError to report Edit Denied errors.
	Don't use the form "Editing Denied".

2005-09-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (BrowsePage): When the page consists of one clean block
	only, $Page{flags} is '0', so testing for it yields false.  This
	caused pages consisting of a single clean block to not be cached.
	At the same time, there should always be flags when $Page{blocks}
	is arround, so the test was simply removed.
	(Init): Call InitCookie before calling InitVariables.

2005-09-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetSummary): UnquoteHtml.
	(GetHttpHeader): Introduced mime-type parameter.
	(DoEdit): UnquoteHtml for the summary.
	(GetRcHtml): Correctly initialize variables.

2005-09-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPost): Creating empty pages still results in a 400
	Bad Request error, but saving no changes will result in a 200 Ok.
	(%RulesOrder): Initialize correctly.
	(ReportError): QuoteHmlt (maybe not necessary?)
	(Init): Copy $lib in order to untaint.
	(GetParam): HtmlQuote all parameters!  <-- major change.
	(QuoteHtml, UnquoteHtml): Return immediately if $html is empty.
	(BrowseResolvedPage): Test for undefined $class before comparing.
	(RcHeader): Initialize $action.
	(GetRc): No revision for the lastet revision shown for all=1.
	(GetRcHtml): Inizialize $html and $inlist.  Also make sure other
	variables are set to the empty string instead of being
	uninitialized.
	(GetRcRss): Remove extra my $username.
	(GetParam): Quote HTML after determining the default value.
	(QuoteHtml, UnquoteHtml): Do not shortcut.
	(DoPost): Unquote text and aftertext parameters.

	* modules/markup.pl (MarkupRule): Fix multiline problem.

2005-09-24  Alex Schroeder  <alex@gnu.org>

	* modules/search-freetext.pl (SearchFreeTextTitleAndBody): Added
	result list at the bottom of the search.  Added p.top and p.bottom
	to the result pages p.

	* wiki.pl (DoSearch): Added p.result and p.links for div.search.

	* modules/despam.pl (DespamMenu): Added entry to the
	administration page.

2005-09-18  Alex Schroeder  <alex@gnu.org>

	* modules/webdav.pl (lock, unlock): Fake them.
	(%implemented): List lock.
	(options): Use DAV: 1 header.

	* modules/referrer-tracking.pl (RefererTrack): No refererrers
	unless there is a page id they belong to.

2005-09-14  Alex Schroeder  <alex@gnu.org>

	* modules/toc.pl (TocRule): Try to avoid empty element shorthand
	for anchor id when $UseModMarkupInTitles is set.

2005-09-10  Alex Schroeder  <alex@gnu.org>

	* modules/markup.pl (MarkupInit): Simplified code by making it
	less tight.
	(MarkupForcedPairs): Removed.

2005-09-09  Alex Schroeder  <alex@gnu.org>

	* modules/weblog-3.pl (NewGetGotoBar): Append $UserGotoBar.

2005-09-07  Alex Schroeder  <alex@gnu.org>

	* modules/weblog-3.pl (CategoriesNewOpenPage): Handle extra tag
	parameter.
	(NewGetGotoBar): Add extra tag parameter where necessary.
	(CategoryInit): Use FreeToNormal on menu entries.

2005-09-05  Alex Schroeder  <alex@gnu.org>

	* modules/weblog-3.pl (NewGetGotoBar): Link to current page as
	well.  Don't use pipe as separator.
	(GotoBarInit): First link, not last link is what matters.

	* upgrade-files.pl (rewrite): Added my %page.
	(read_file): Removed my %page.

	* modules/weblog-3.pl (DoCategories): Use GetEditLink instead of
	GetPageLink.
	(NewGetGotoBar): Add Categories to GotoBar.
	(CategoriesNewOpenPage): Bugfix.
	(NewGetGotoBar): Chnange Order.
	(CategoriesNewOpenPage): Fix journal regex.

2005-09-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitLinkPatterns): Small change to $InterLinkPattern as
	suggested by Markus Lude.

	* modules/toc.pl (TocRule): Revers order of match and InElement
	check as suggested by Markus Lude.  Without this patch, single
	equal signs are eaten when $UseModMarkupInTitles is true.

	* modules/usemod.pl (UsemodRule): Revers order of match and
	InElement check as suggested by Markus Lude.  Without this patch,
	single equal signs are eaten when $UseModMarkupInTitles is true.

2005-09-02  Alex Schroeder  <alex@gnu.org>

	* modules/markup.pl (%MarkupForcedPairs): Changed definition for
	triple braces.
	(@markup_forced_pairs_re): Replaces $markup_forced_pairs_re as
	internal variable.
	(MarkupForcedPairs): New.
	(MarkupInit): Use it to set @markup_forced_pairs_re.

	* wiki.pl (UrlDecode): New.
	(InitCookie): Decode cookie.
	(PageEtag, Cookie): Encode cookie.

	* modules/static-copy.pl (StaticFileName): Use UrlDecode.
	(StaticUrlDecode): Removed.

2005-08-31  Alex Schroeder  <alex@gnu.org>

	* info-ref (ShowForm): Add CVS keyword.

	* wiki.pl (InitLinkPatterns): Quote $, %, and @ in
	$InterLinkPattern and $FreeInterLinkPattern.

	* info-ref (ShowForm): Added form.
	(ShowForm): Fix input.
	(Initialize): Don't strip last segment of path.
	(Initialize): Report successful completion.
	(Initialize): Patches to process old elisp HTML from 2002.

2005-08-30  Alex Schroeder  <alex@gnu.org>

	* modules/webdav.pl ($WebDavCache): New option.
	(propfind_data): Use cached data if appropriate.
	(propfind): Add support for displayname and getetag properties.
	Use propfind_data() to cache data.  Add etag to the response even
	though the RFC says PROPFIND should not be cached.  No longer use
	libraries for decoding and escaping.
	(DavNewOpenPage): Add 'created' property to all pages.
	(propfind): Handle UTF-8 correctly because the displayname is not
	URL encoded.

2005-08-29  Alex Schroeder  <alex@gnu.org>

	* modules/webdav.pl (options): Don't send DAV header, since we're
	not even a class 1 server.
	(put): Handle image/jpeg files using magic bytes.
	(no_content): New.
	(put): Add support for image/png.

2005-08-28  Alex Schroeder  <alex@gnu.org>

	* modules/webdav.pl (get): Removed cookie code.

	* modules/toc.pl (TocRule): Added <toc> rule.  Fixed some markup
	bugs such that the toc div will now come after the closing of the
	portrait div instead of nested within.
	(TocHeadings): Protected pos in order to make this sub usable in
	TocRule without the pos remembering workaround.
	($TocAutomatic): New option to control whether the table of
	contents is inserted automatically.

2005-08-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcRss): Allow XSL stylesheets for the RSS feed, too.

2005-08-25  Alex Schroeder  <alex@gnu.org>

	* modules/toc.pl (TocRule): Move TOC to just before the first
	header.
	(NewTocGetHeader): Deleted. 
	(TocHeadings): No longer take an argument.

2005-08-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($RssStyleSheet, GetRcRss): New option, use it.
	(GetHtmlHeader, GetCss): Moved CSS determining code out into
	separate function.
	(TextIsFile): Don't use /m for the match (an uploaded file MUST
	start with #FILE and the MIME type).
	(GetRcRss): Allow multiple licenses using an array ref for
	$RssLicense.
	(TextIsFile): Fix bug.

	* modules/markup.pl (MarkupForcedPairs): New.
	(MarkupRule, MarkupInit): Handle new option.
	(MarkupRule): Fix %MarkupLines handling.

	* wiki.pl (DoHistory): Use GET instead of POST for history links.
	(GetFormStart): Fix class for forms.
	(GetKeptDiff): Handle identical revisions.

2005-08-22  Alex Schroeder  <alex@gnu.org>

	* modules/usemod.pl (ISBN): Small fix declaring $len.

2005-08-07  Alex Schroeder  <alex@gnu.org>

	* modules/edit-cluster.pl (GetRc): Handle ordinary changes.
	(EditClusterNewRcHeader): Display checkbox for ordinary changes.
	(GetRc): Exclude clustered changes if no parameter is given.
	(EditClusterNewRcHeader): Bugfix.

2005-07-29  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (EncodePage): Don't modify the data in place; make a
	copy first.

2005-07-27  Alex Schroeder  <alex@gnu.org>

	* modules/big-brother.pl ($US): New separator variable.
	($VisitorTime): Moved here from the main script.
	(BigBrotherVisitors): New sub to create the appropriate admin menu
	item in @MyAdminCode.
	(AddRecentVisitor): Store both pagename and url in the log.
	(DoBigBrother): Extrac both pagename and url from the log.

2005-07-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RcHeader, GetFilterForm, GetRc): Add page title filter
	using the match parameter.  Make the form GET instead of POST.

	(DoIndex): Changed pattern parameter to match, so that
	it matches the parameter used in the calendar extension.
	($Visitors, $VisitorTime): Removed.
	(%Action): Removed visitors action.
	(DoAdminPage): Removed recent visitors item.
	(DoSurgeProtection, WriteRecentVisitors): Simplified: No longer
	take $Visitors into account.
	(DoShowVisitors): Removed.
	
	(RSS, GetRcHtml): Replaced &ndash; with &#8211; for XML conformance.
	(PageHtml): Accept size limit and error message; return error
	message instead of HTML if the raw text of the page is too big.
	(GetRcRss): Pass a limit and a message to PageHtml.

2005-07-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoUnlock): Don't cache.
	(DoIndex): Add pattern parameter.
	(DoIndex): Added pattern form.

2005-07-24  Alex Schroeder  <alex@gnu.org>

	* modules/big-brother.pl (IsDownload): Removed.
	(DelayRequired): Fix array reference.
	(WriteRecentVisitors): Fix truncation.
	(DoBigBrother): Don't show names with dots in them -- ie. IP
	numbers and host names.
	(DoBigBrother): Reverse sort order.

2005-07-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PageFresh, FileFresh): New, use entity tags instead of
	if-modified-since.
	(PageEtag): New, produce entity tag based on LastUpdate and CookieData.
	(DoDownload): Use FileFresh.
	(BrowsePage): Cache using code moved to DoBrowseRequest.
	(DoBrowseRequest): Use PageFresh and return cashed pages for all
	actions if possible.
	(GetHttpHeader): Generate entity tag (ETag) for caching instead of
	last-modified header.
	(CookieData): New, used by PageEtag.
	(Cookie): Moved some code to CookieData.

	(GetHeader): Pass the third parameter on to GetGttpHeader.
	(ReportError): Make clear that we don't want to cache this
	response in our call to GetHeader using the third parameter in the
	call to GetHeader.
	(DoHistory): Refactoring; remove third parameter in call to
	GetHeader since it was always the empty string.
	(DoRollback, DoAdminPage): Ditto.
	(DoUnlock, DoEdit, DoPassword, DoIndex, DoSearch): Ditto.
	(DoSearch, DoPrintAllPages, DoMaintain, DoEditLock): Ditto.
	(DoPageLock, DoShowVersion, DoShowVisitors): Ditto.

	* modules/usemod.pl (ISBN): Changed B&N ISBN search URL.

	* wiki.pl (@MyMaintenance): New option.
	(DoMaintain): Call each sub on @MyMaintenance.

2005-07-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcRss): A test for $limit eq 'all' got lost in the
	transition to RSS 2.0 so I added it back.
	($DefaultStyleSheet): Add div.search.
	(ApplyRules): Add new rule for <search "pattern">

2005-07-20  Alex Schroeder  <alex@gnu.org>

	* modules/journal-rss.pl (DoJournalRss): Switch MIME type to
	application/xml now that we produce RSS 2.0.

2005-07-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcRss): Fixed some URL encoding issues.

	* modules/tags.pl (TagsRule): Remove Clean() call around returned
	text.

2005-07-17  Alex Schroeder  <alex@gnu.org>

	See http://www.emacswiki.org/cw-de/WikiModule.

	* wiki.pl (RSS): Accept RSS 2.0 wiki module authorship.
	(GetRcRss): Use RSS 2.0 with wiki module code.
	(DoRss): Changed MIME type to application/xml because we're no
	longer using RDF.
	(TimeToRFC822): New sub using the POSIX module (which comes
	bundled with Perl).
	($RssContributor, $RssPublisher): Removed as they make little
	sense on a wiki.
	($RssImageUrl): Default to $LogoUrl.

2005-07-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoDownload): Fix download caching.

	* modules/usemod.pl (ISBN): ISBN numbers can be 10-14 digits, in
	preparation of 2007-01-01 and beyond.
        http://www.isbn-international.org/en/download/implementation-guidelines-04.pdf

2005-07-14  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ScriptLink): Use $UrlProtocols for check for URLs.

	* modules/dynamic-comments.pl (DynamicCommentsNewGetPageLink):
	Make sure p and div elements are correctly nested.

	* wiki.pl (ScriptLink): Not only url-encoded "http:" starts a
	valid URL; any combo of letters followed by a colon (protocol) or
	any string starting with a slash (relative path) are treated as
	URL.  This assumes no colons and slashes in page names.

2005-07-13  Alex Schroeder  <alex@gnu.org>

	* modules/dynamic-comments.pl (DynamicCommentsNewGetPageLink):
	Offer direct link if no comments exist.

2005-07-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetTextArea): Add id to textarea.
	($RssDir, $RssCacheHours): New options.
	(RSS): Use GetRss.
	(GetRss, GetRssFile): New.
	(DoMaintain): Clean files in $RssDir.

2005-07-07  Alex Schroeder  <alex@gnu.org>

	* modules/fckeditor.pl (WysiwygScript): Change $FCKeditorRows to
	$FCKeditorHeight.

2005-07-06  Alex Schroeder  <alex@gnu.org>

	* modules/fckeditor.pl (WysiwygScript): Use an option for the
	height.
	(WysiwygRule): Don't allow script tags.

2005-07-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Don't allow double quotes in the css
	parameter because it allows javascript injection as described by
	Pierre Gaston -- he added "><script>...</script><meta" to a public
	link and tricked users into clicking it.

2005-07-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (TimeToW3): Bugfix.

2005-06-29  Alex Schroeder  <alex@gnu.org>

	* modules/commentcount.pl (NewCommentcountScriptLink): Undo
	urlencode for the first parameter when using it to get the page
	content.

	* modules/namespaces.pl (NamespaceRcLines): Fix handling of
	cluster and other attributes.

2005-06-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetPageOrEditLink): No longer handle near links
	specially.
	(ScriptLink): Handle resolved URLs specially, eg. from near links.
	(PrintSearchResultEntry): Just pass it on to ScriptLink.  Don't
	test $action for %2f -- I wonder what this was supposed to do?

2005-06-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Init): Maintain %MyInc separate from %INC for mod_perl
	compatibility.
	(%MyInc): New variable.

2005-06-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($SummaryHours): New option.
	(DoEdit): Use it.

2005-06-12  Alex Schroeder  <alex@gnu.org>

	* modules/sitemap.pl: New file.

2005-06-02  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NamespaceRcLines): Remove trailing
	newline when reading rc.log file.  This removes an incompatibility
	between the module and page clusters (otherwise all pages end up
	in the "\n" cluster).

	* wiki.pl (DoPost): Don't create empty pages.

2005-05-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DeletePage): Delete page-lock file, too.
	(DoEditLock, DoPageLock): Saved a line in each by removing the my
	declaration at the very beginning.

2005-05-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ScriptLink): Add another parameter to generate
	rel="nofollow" links.
	(RcHeader): Use nofollow links because RecentChanges is FOLLOW by
	default.  This might help cut bandwidth.
	
	* modules/search-freetext.pl (SearchFreeTextMenu): New, added to
	@MyAdminCode.
	(SearchFreeTextIndex): Catch error if module is missing.
	($SearchFreeTextNum, $SearchFreeTextMax): Reintroduced these
	variables, but not as options (not configurable).
	(SearchFreeTextTitleAndBody): Add paging.
	(SearchFreeTextIndex): Don't allow to rebuild the index more than
	once every 12h.

2005-05-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetSummary): For new pages, use the beginning of the
	text if no summary was provided.
	(GetFooterTimestamp): Default to diff=2 in the footer, since that
	matches author name and timestamp visible.

2005-05-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetCommentForm): Don't provide summary in the form.
	(DoPost): Get summary from GetSummary.
	(GetSummary): New function that takes a substring from aftertext
	if available.

	* modules/sidebar.pl (NewSideBarGetHeader): Set $OpenPageName to
	$SidebarName while rendering the sidebar.  This should enable the
	form extension on the sidebar.

	* wiki.pl (DoEdit): Use $KeepDays instead of 24h for "summary
	expiration".
	($SummaryLines): Remove option again and replace with hard-coded
	two lines.
	
2005-04-30  Alex Schroeder  <alex@gnu.org>

	Implementation of DigestedChanges, as inspired by discussion on
	Meatball.
	
	* wiki.pl ($SummaryLines): New option.
	(DoEdit): If the last edit was less than 24h ago, use its summary
	as the default.
	(GetTextArea): Optional parameter for the number of rows added.
	Default is still 25.

2005-04-29  Ingo Belka  <grimmen@mvnet.de>

	* modules/headlines.pl (HeadlinesRule): Accept optional number of
	headlines.
	(HeadlinesPrint): Use dl instead of span+br to print the list.

2005-04-26  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NewNamespaceDoRc): Added header back.
	Correcly sort lines.
	(NamespaceRcLines): Split into all fields and add namespace to
	username, too.
	(NamespaceValidId): New dummy to disable the test.
	(NewNamespaceDoRc): Add parameter local to restrict main RC to the
	local namespace only.  Fixed bug in condition that led to the
	printing of an HTML fragment when requesting RSS.

	* wiki.pl (ApplyRules): Removed the final oldpos hack required
	because now $bol no longer uses regexp matching.

2005-04-25  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NewNamespaceDoRc): Expanded a lot, now
	parsing all the log files recursively instead of doing the RSS
	thing.
	(NamespaceBrowseRc, NamespaceInternalRc): Deleted.
	(NamespaceRcLines): New.  Splices namespace into the rc lines.
	(NewNamespaceScriptLink): New.  Splices namespace out of the link
	into the script name.

2005-04-24  Alex Schroeder  <alex@gnu.org>

	* modules/moin.pl (MoinRule): Added alternative whiespace
	handling, numbered lists, and indented text.

2005-04-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PageDeletable): Delete empty pages, too.
	(ApplyRules): Changed the way $bol is computed to a substring
	comparison instead of a regular expression match.

	* modules/moin.pl (MoinRule): Fix moin list rule.

2005-04-16  Alex Schroeder  <alex@gnu.org>

	* modules/tags.pl: New.

	* modules/tables-long.pl (TablesLongRule): Fix bug that prevented
	second table from not showing up if its labels were different.
	Also fix bug with empty p element.  Also fix bug with unnecessary
	colspan="2" in the last column.

2005-04-15  Alex Schroeder  <alex@gnu.org>

	* modules/tables-long.pl (TablesLongRule): Handle newlines
	correctly: avoid duplicating them.
	(TablesLongRow): Get the label-count right, avoid colspan=2 for
	the last column.

2005-04-13  Alex Schroeder  <alex@gnu.org>

	* Makefile (fix): New convenience target.

	* wiki.pl (LinkRules): Make sure named entities such as < > and &
	are handled correctly at the end of an URL.
	(TimeToW3): New.
	(GetRcText): Use TimeToW3 instead of CalcDay.
	(GetRcRss): Use TimeToW3 instead of doing it manually.
	(ExpireKeepFiles): Handle lastmajor like oldmajor.
	(DoShowVersion): Report mod_perl.

2005-04-11  Flavio Poletti <frodo72@savannah.gnu.org>

	* wiki.pl (ApplyRules, GetDiff, DoEdit, DoDownload)
	(SearchTitleAndBody, PrintSearchResult, Save): Concentrated #FILE
	tests all over the  script inside new function TextIsFile.
	(TextIsFile): New.

	
2005-04-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetKeptDiff): Use GetTextRevision instead of
	duplicating code.
	(Save): Fix handling of oldmajor by introducing a new key,
	lastmajor.
	(UpdateDiffs): Changed argument list, changed to also handle new
	oldmajor.

2005-04-05  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Save): Fix handling of oldmajor.

2005-04-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetCurrentRequest): Deleted.
	(GetCurrentPageName): Deleted.
	(GetId): New, returns the id as set in the request, like
	GetCurrentRequest used to do, but don't return a "dirty_id" and
	"error".  Split info_path and set all parameters with these names
	to 1.  This is more generic than specialcasing "raw".
	(DoBrowseRequest): Call GetId.

2005-03-31  Alex Schroeder  <alex@gnu.org>

	* modules/anchors.pl (AnchorsRule): Allow [[#foo|bar]] as
	suggested by Manni.

2005-03-28  Alex Schroeder  <alex@confusibombus.emacswiki.org>

	* modules/crumbs.pl (CrumbsRule): Independent of GetCluster and
	therefore no longer requires $PageCluster to be set.  Call
	FreeToNormal on all clusters.
	
2005-03-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Use LWP::Parallel::UserAgent if available.

2005-03-25  Flavio Poletti  <frodo72@savannah.gnu.org>

	* wiki.pl (DoDiff): New function with code from GetDiff.  This is
	the place where diff is actually called.
	(GetDiff): Moved functionality to DoDiff.  Call it.
	(DiffMarkWords): Call DoDiff.
	(DoShowVersion): Only print diff info if $UseDiff == 1; this
	allows modules overriding DoDiff to set UseDiff to higher values
	and void invocation of programs while still setting DoDiff to a
	true value.

	* wiki.pl (DoBrowseRequest): Move functionality to determine page
	id to GetCurrentRequest.
	(GetCurrentRequest, GetCurrentPageName): New sub.
	
2005-03-24  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NamespacesInitVariables): Set
	$InterWikiMoniker.

2005-03-18  Alex Schroeder  <alex@confusibombus.emacswiki.org>

	* wiki.pl: Removed the global $first variable, since it made no
	sense when ApplyRules was called for cached HTML fragments.
	(ApplyRules): Removed $first, moved link rules to new sub, call
	RunMyRules with $locallinks, $withanchors parameters.
	(LinkRules): Moved all link rules to new sub.
	(@MyRules): Initialize with LinkRules.
	(RunMyRules): Call the various rules with $locallinks and
	$withanchors parameters.

2005-03-16  Flavio Poletti  <frodo72@savannah.gnu.org>

	* wiki.pl (PrintHtmlDiff): Use $old_is_image instead of
	$old_is_file when calling GetDownloadLink.

2005-03-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPageLock): Add link back to the page.

2005-03-08  Sebastian Blatt  <sblatt@havens.de>

	* modules/static-copy.pl (StaticWriteFile): added "chmod 0644" to
	uploaded static images.

2005-03-06  Alex Schroeder  <alex@confusibombus.emacswiki.org>

	* wiki.pl (ApplyRules): Removed debug warnings that got checked
	in...

2005-03-01  Sebastian Blatt  <sblatt@havens.de>

	* modules/image.pl (ImageGetInternalUrl): Modified to support
	overriding of relevant parts from within Static Copy Extension.

	* modules/static-copy.pl (ImageGetInternalUrl): Added Image
	Extension support.

2005-02-03  Alex Schroeder  <alex@emacswiki.org>

	* wikicopy: Updated usage.
	(GetRaw): Always print status.
	(copy): Handle replacement text.
	(main): Accept replacement text.

2005-02-02  Alex Schroeder  <alex@emacswiki.org>

	* wiki.pl (DoBrowseRequest): Added CGI error message suggested by
	Tim Jenness.

2005-02-02  Alex Schroeder  <alex@gnu.org>

	* wikicopy (GetRaw): Warning if GET fails.
	(PostRaw): Print status code when POST fails.
	(copy): Don't encode id when posting.

	* wiki.pl (BrowsePage): Report 404 for non-existing pages even
	when using raw=1.

2005-02-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Fix typo found by Flavio Poletti.

2005-01-26  Johan Adler <alltid.foo@bar.nyfiken.org>

        * modules/translations/swedish-utf8.pl (translation): Corrected
	typo in Swedish translation.

2005-01-25  Alex Schroeder  <alex@gnu.org>

	* modules/live-templates.pl (LiveTemplateRule): Quote HTML before
	passing it to ApplyRules.

2005-01-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (CreateDir): Add error if mkdir fails.

2005-01-24  Alex Schroeder  <alex@emacswiki.org>

	* modules/admin.pl (AdminPowerRename): Add more tests because
	ReportError will remove locks before exiting, unlink index file at
	the beginning.

2005-01-20  Alex Schroeder  <alex@emacswiki.org>

	* modules/search-freetext.pl (SearchFreeTextTitleAndBody): Handle
	double-quoted phrases.
	(SearchFreeTextNewHighlightRegex): Strip double-quotes from terms
	before highlighting.

2005-01-20  Tilmann Holst   <spam@tholst.de>

        * wiki.pl (ReportError): Added missing "start_html"

2005-01-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Fix rfc 822 date parsing regular expression.

2005-01-10  Alex Schroeder  <alex@emacswiki.org>

	* localnames-server.pl: New.
	(debug): New.
	(html): Use CSS to layout.

2005-01-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (handler): Added no strict "refs" pragma after a report
	by Ross Thomas.

2005-01-07  Alex Schroeder  <alex@emacswiki.org>

	* wikicopy (GetRaw, PostRaw): Simplified LWP::UserAgent call.
	(copy): Get encoding right, test for data.

	* wiki.pl (handler): Typo: Use my.

2005-01-07  Alex Schroeder  <alex@gnu.org>

	* changelog-to-rss (output): Add span.chunk around chunks.

	* wiki.pl (handler): Set all sort of variables from environment
	variables.

	* modules/referrer-tracking.pl: Moved from wiki.pl.
	(RefererNewPrintFooter): Removed $RefererTracking.

	* changelog-to-rss (output): Handle parentheses on their own.

	* wiki.pl: Moved referrer tracking into a module.  Removed
	appropriate values from several variables.
	(InitVariables, BrowsePage): Related changes.
	(DoAdminPage, DoMaintain, DeletePage): Ditto.
	(GetRefererFile, ReadReferers, ExpireReferers, GetReferers)
	(UpdateReferers, WriteReferers, RefererTrack)
	(DoPrintAllReferers, PrintAllReferers): Removed.

	* modules/page-type.pl (PageTypeInit): Test @AdminPages before
	pushing something onto the list because of mod_perl.

	* modules/localnames.pl (LocalNamesInit): Test @AdminPages before
	pushing something onto the list because of mod_perl.

	* wiki.pl: mod_perl stuff, suggested by Ross Thomas.
	(InitDirConfig): New, set all directories here.
	(Init): Call it.
	(handler): New.

2005-01-06  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl: Improve $DefaultStyleSheet.
	(CalendarRule): Return new open p tag instead of using Clean.

	* test.pl: Updated calendar.pl tests.

	* modules/calendar.pl (CalendarRule): Use Clean instead of print
	for the p element that opens after the dirty blocks.

	* changelog-to-rss: Fix regular expression for filenames.
	(output): Strip leading br.
	(output): Only (foo) followed directly by ':' deserves a newline.
	(to_date): Days start at 1, not 0.

	* wiki.pl (ApplyRules): Use Clean instead of print for the p
	element that opens after include, rss, and journal tags.
	(RSS): Use div instead of strong for descriptions containing HTML.

	* changelog-to-rss (output): Remove leading tabs from log entries.
	(output): Highlight parentheses.

2005-01-06  Alex Schroeder  <alex@emacswiki.org>

	* wiki.pl (GetHttpHeader): Added handling of HEAD requests.

2005-01-05  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS, GetRcHtml): Use ndash to separate summary from the
	rest of the item.  The dash is in a new span.

	* changelog-to-rss (quote_html): New.
	(output): Use it.
	(to_date): Fix RFC 822 format.
	Use the right MIME type.
	(output): Use link pattern, conditionalize all elements.

	* wiki.pl (RSS): Take dash out of the strong element with the description.

	* changelog-to-rss.pl: New.

	* wiki.pl (@MyAdminCode): New option.
	(@AdminBlocks): Removed option.
	(DoAdminPage): Rewritten to take advantage of the new @MyAdminCode.

	* modules/admin.pl (AdminPowerDelete): Fix log message, unlink
	$IndexFile.
	(AdminPowerRename): Call FreeToNormal on both parameters, don't
	test the new filename using ValidIdOrDie.
	(NewAdminPowerGetAdminBar): Deleted.
	(AdminPower): New, using @MyAdminCode.

2005-01-04  Alex Schroeder  <alex@gnu.org>

	* modules/localnames.pl (LocalNamesInit): Add $SidebarName to
	@AdminPages.

	* modules/weblog-2.pl: Use @MyInitVariables.

	* modules/weblog-1.pl: Use @MyInitVariables.

	* modules/smiley-dir.pl: Use @MyInitVariables.

	* modules/namespaces.pl: Use @MyInitVariables.

	* test.pl (clear_pages): Removed references to
	OldUsemodInitVariables.

	* modules/usemod.pl: Use @MyInitVariables.

	* modules/markup.pl: Use @MyInitVariables.

	* modules/sidebar.pl: Add $SidebarName to @AdminPages.

	* wiki.pl (@AdminPages, @AdminBlocks): New options.
	(%Action): Register admin action.
	(InitVariables): Set @AdminPages.
	(DoAdminPage): New.
	(PrintFooter): No longer print admin bar.
	(GetAdminBar): Deleted.
	(GetFooterLinks): Link to admin page.
	(DoIndex): Add menu for the various parameters.
	(DoEditLock, DoPageLock): Touch index file (invalidate the cache).
	(DoAdminPage): Use edit links for non-existing important pages.
	(DoAdminPage): Add more actions.
	(DoUnlock, DoMaintain): Changed title.
	(DoAdminPage): Treat space.
	(@MyInitVariables): New option.
	(InitVariables): Use it.
	(DoAdminPage): Bugfix.
	(GetFooterLinks): Add class.

2005-01-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitLinkPatterns): Remove "" delimiter from
	$FreeLinkPattern and $FreeInterLinkPattern.
	(ApplyRules): Unquote URLs in include and rss rules.

	* modules/tables-long.pl (TablesLongRule): Allow multiple CSS
	directives.

2005-01-01  Alex Schroeder  <alex@emacswiki.org>

	* modules/tables-long.pl (TablesLongRule, TablesLongRow): Added
	CSS and table headers.
	($DefaultStyleSheet): Added some simple text-align, font-weight,
	and mark stuff.
	(TablesLongRow): Close th elements.
	(TablesLongRow): Close environments at the end of a cell.

2004-12-29  Alex Schroeder  <alex@emacswiki.org>

	* modules/static-copy.pl (StaticWriteFile): Add support for html=0
	parameter.

2004-12-27  Alex Schroeder  <alex@gnu.org>

	* modules/search-freetext.pl (SearchFreeTextIndex): Take HTML tags
	out of the text.

2004-12-27  Alex Schroeder  <alex@emacswiki.org>

	* wiki.pl (RSS): Add RFC 822 Parsing for RSS 2.0.
	(DoDownload): Fix regexp for #FILE.
	(DoShowVisitors, DoPrintAllReferers): Add content div.

2004-12-26  Alex Schroeder  <alex@emacswiki.org>

	* modules/markup.pl (MarkupRule): More checks to prevent bugs when
	one of the hashes is empty.

	* modules/static-copy.pl (StaticFileName, StaticWriteFile): Regexp fix.
	(StaticFilesNewDoPost, StaticNewDeletePage, StaticDeleteFile): New.
	($StaticUrl): New.
	(StaticDeleteFile): New.
	(GetDownloadLink): New, override the one from wiki.pl.
	(GetDownloadLink): Use StaticFileName.

2004-12-25  Alex Schroeder  <alex@gnu.org>

	* test.pl: Calendar tests.

	* modules/search-freetext.pl (SearchFreeTextNewDoSearch): Added
	$SearchFreeTextNewForm back.

2004-12-25  Alex Schroeder  <alex@emacswiki.org>

	* modules/search-freetext.pl (SearchFreeTextIndex): Bugfix.
	(SearchFreeTextNewDoSearch): Call old DoSearch, but maybe locally
	bind SearchTitleAndBody and HighlightRegex.
	(SearchFreeTextTitleAndBody): SearchTitleAndBody replacement.
	(SearchFreeTextNewHighlightRegex): HighlightRegex replacement.

	Eventually, a lot of stuff was deleted:
	($Action{search}): No longer define the search action.
	(SearchFreeTextNewForm): Deleted.
	(SearchFreeTextNewGetSearchLink): Replacement for GetSearchLink.
	(SearchFreeTextNewGetSearchLink): Deleted.
	(SearchFreeText): No longer take $SearchFreeTextNum and
	$SearchFreeTextMax into accout.  Instead, hook into the existing
	search facilities by redefining SearchTitleAndBody and calling
	DoSearch.
	(SearchFreeText): Deleted.

2004-12-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPost): Only determine new authors if there is an old
	revision that is being changed.

2004-12-21  Alex Schroeder  <alex@gnu.org>

	* modules/search-freetext.pl (SearchFreeTextIndex): The page title
	should be part of the document.

	* modules/namespaces.pl ($NamespacesSelf): New variable.
	(NewNamespacesInitVariables): Set it.
	(NewNamespacesInitVariables): Make "Self" forbidden, too.

2004-12-20  Alex Schroeder  <alex@emacswiki.org>

	* modules/namespaces.pl (NamespaceInternalRc): "No items foundin
	foo" removed.

	* modules/calendar.pl (DoCollect): Use content class.
	(CalendarRule): Print calendar in a div.
	(PrintYearCalendar): Don't print div here.
	(DoYearCalendar): Print div here.

	* modules/namespaces.pl (NewNamespacesInitVariables): Set
	$NamespaceCurrent; don't change $Action{rc}.
	(NewNamespacesInitVariables): Don't print header and footer.
	(NewNamespaceDoRc): New replacement for DoRc.

2004-12-20  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NamespaceBrowseRc, NamespaceInternalRc,
	NewNamespacesInitVariables):  Support for recent changes for all
	namespaces.

2004-12-19  Alex Schroeder  <alex@emacswiki.org>

	* wiki.pl (Save): Moved automatic lock creation back to after the
	SavePage call in order to make sure the directory exists.
	(ApplyRules): Locally set $OpenPageName when including local
	pages.

	* modules/calendar.pl (CalendarRule, PrintYearCalendar): Close
	HTML environments before printing and open new p after printing.

	* wiki.pl (PrintPageHtml, BrowsePage): Don't print cache if using
	$UseCache=-1.
	(PrintHtmlDiff): Take cache=0 and cache=-1 into account when
	serving diffs.
	(DiffMarkWords): Append trailing newlines.
	(InitVariables): Removed handling of $HtmlHeaders.
	(GetHtmlHeader): Add site RSS and page RSS if $HtmlHeaders is not
	set.

2004-12-18  Alex Schroeder  <alex@emacswiki.org>

	* Makefile (upload-translations): Fix bug.

	* modules/search-freetext.pl (SearchFreeTextNewForm): Only use new
	form if $SearchFreeTextNewForm is set.
	($SearchFreeTextNewForm): New option.

	* wiki.pl (PrintFooter): Changed 'time' parameter to 'timing' to
	avoid collision with Timezone Extension.

2004-12-16  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (AddComment): Prefix http:// if necessary.
	(Save): Moved some variable settings up.

2004-12-15  Alex Schroeder  <alex@gnu.org>

	* modules/search-freetext.pl (SearchFreeText): Added much improved
	user interface.

2004-12-14  Alex Schroeder  <alex@emacswiki.org>

	* wiki.pl (Save): Handle existing index file that cannot be
	unlinked.

2004-12-12  Alex Schroeder  <alex@emacswiki.org>

	* wikiput (wikiput): Better error reporting.

	* wiki.pl (ApplyRules): Fix bug that prevented pages containing a
	file from displaying correctly.

2004-12-10  Alex Schroeder  <alex@emacswiki.org>

	* modules/search-freetext.pl (SearchFreeText): New form.

2004-12-05  Alex Schroeder  <alex@emacswiki.org>

	* wiki.pl (InitVariables): Use the link to the RSS feed as the
	default for $HtmlHeaders.
	(GetHtmlHeader): Don't add RSS feed.  It should be part of
	$HtmlHeaders.
	(Clean, Dirty, ApplyRules): Print clean blocks in Dirty() instead
	of Clean().  Remove empty p elements.
	(ApplyRules): Exchanged order of print and Dirty for one of the
	rules.

	* modules/usemod.pl (UsemodRule): Used /o for one of the rules.
	Fixed a bug that added paragraphs in titles if
	$UseModMarkupInTitles was set.

	* Makefile (test): Changed test script to test.pl.

	* modules/setext.pl (SeTextRule): Fix bug with h3 headers.

	* modules/usemod.pl (UsemodRule): AddHtmlEnvironment('p')

	* modules/toc.pl (TocRule): AddHtmlEnvironment('p')

	* modules/tables.pl (TablesRule): AddHtmlEnvironment('p')

	* modules/setext.pl (SeTextRule): AddHtmlEnvironment('p')

	* modules/portrait-support.pl (PortraitSupportRule): AddHtmlEnvironment('p')

	* modules/partial-journal.pl (PartialCutRule): AddHtmlEnvironment('p')

	* modules/live-templates.pl (LiveTemplateRule): AddHtmlEnvironment('p')

	* modules/headlines.pl (HeadlinesRule): AddHtmlEnvironment('p')

	* modules/headers.pl (HeadersRule): AddHtmlEnvironment('p')

	* modules/forms.pl (FormsRule): AddHtmlEnvironment('p')

	* modules/compilation.pl (CompilationRule): AddHtmlEnvironment('p')

	* modules/beautify.pl (BeautificationRule): AddHtmlEnvironment('p')

	* wiki.pl (ApplyRules): Add print AddHtmlEnvironment('p') in
	various places where CloseHtmlEnvironments() is called -- after
	includes, journals, rss feeds, and conflicts.

2004-12-03  Alex Schroeder  <alex@gnu.org>

	* modules/usemod.pl (UsemodRule): Fix hr handling.

	* modules/headers.pl (HeadersRule): Fix hr handling.

	* modules/usemod.pl (UsemodRule): Reset $PortraitSupportColor
	after headers and hr.

	* modules/toc.pl (TocRule): Reset $PortraitSupportColor after
	headers.

	* modules/portrait-support.pl ($MyColor, $PortraitSupportColor):
	$PortraitSupportColor replaces $MyColor.
	(PortraitSupportRule): Reset color after hr, handle closing div,
	use $PortraitSupportColor.

	* modules/headers.pl (HeadersRule): Reset $PortraitSupportColor
	after the header.

	* modules/commentcount.pl (NewCommentcountAddComment): Handle
	comments and comment.
	(NewCommentcountScriptLink): Adapt to changes in edit bar.  Add
	code for configurable plural handling (if num == 1).

	* Makefile (*-utf8.pl): Interface with CVS and wiki.

2004-11-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintWikiToHTML): Fix typo.

2004-11-28  Alex Schroeder  <alex@gnu.org>

	* wikiput (main): Add force option.  Disallow posting of empty
	pages unless set.
	(usage): Document it.

	* wiki.pl (PrintWikiToHTML): Don't save revision 0 files.  These
	can appear if showing the full RSS for deleted pages.

2004-11-27  Alex Schroeder  <alex@gnu.org>

	* modules/irc.pl ($IrcRegexp): Renamed to $IrcNickRegexp.
	(IrcRule): Fixed output, defined default CSS.

	* modules/setext.pl (SeTextRule): Applied changes from headers.pl.

	* modules/usemod.pl (UsemodRule): Added PortraitSupportColorDiv support.

	* modules/toc.pl (TocRule): Added PortraitSupportColorDiv support.

	* modules/headers.pl (HeadersRule): Set $PortraitSupportColorDiv = 0.

	* modules/portrait-support.pl ($MyColorDiv): Renamed to
	$PortraitSupportColorDiv.

	* modules/headers.pl (HeadersRule): Added PortraitSupportColorDiv
	support.

	* modules/portrait-support.pl ($MyColorDiv): Export variable.
	(PortraitSupportRule): Removed handling for headings.  This should
	be handled by all the other packages that do headings (toc,
	portrait-support, markup).

	* wiki.pl (ReportError): Use $q->Dump.

2004-11-27  Alex Schroeder  <alex@emacswiki.org>

	* modules/toc.pl ($TocCounter): New variable.
	(TocRule): Use it to provide an ID to the toc entry.
	(TocWikiHeading): Deleted.
	(TocHeadings): Use ID instead of encoded text.

	* wiki.pl (GetTextAtTime): Check whether all changes from now to
	then are minor or not.  Use GetKeepRevisions.
	(DoRollback): Save rollbacks as minor or major changes using this
	info.
	(DoPost): Take change in GetTextAtTime into account, but do
	nothing with the new info.
	(GetKeepRevisions): New.
	(DoHistory, ExpireKeepFiles): Use GetKeepRevisions.

2004-11-26  Alex Schroeder  <alex@gnu.org>

	* modules/despam.pl (DespamPages): Only check files mentioned in
	rc.log.
	(DoDespam): Added list parameter.
	(DespamPages): Added days parameter.
	(DespamPage): Added debug parameter.

2004-11-25  Alex Schroeder  <alex@emacswiki.org>

	* modules/toc.pl (TocHeadings, TocWikiHeading): Use FreeToNormal
	on the anchor name.
	(TocWikiHeading): Don't UrlEncode the anchor name.

	* wiki.pl (DoShowVersion): Link to dependencies=1 and links=1.

2004-11-23  Alex Schroeder  <alex@emacswiki.org>

	* modules/html-template.pl (HtmlTemplateRc): Added wrapper
	function so that action=rc works.

2004-11-23  Alex Schroeder  <alex@gnu.org>

	* modules/html-template.pl: New package prototype.  Browsing and
	editing works.

	* wiki.pl (GetFooterLinks): Move the "Back to %s" link to the
	front of the bar.  Put the entire text into the link.  Change
	"Comments on this page" to "Comments on %s".

2004-11-20  Alex Schroeder  <alex@gnu.org>

	* modules/commentcount.pl (NewCommentcountAddComment)
	(NewCommentcountScriptLink): Use \d+ as suggested by Fletcher
	Penney.
	(NewCommentcountScriptLink): Handle access key as suggested by
	Fletcher Penney.

2004-11-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetAdminBar, GetFooterLinks, GetGotoBar): Add bar
	class.
	(BrowsePage): Remove extra end_div().
	(DoIndex): Add extra end_div().
	(GetReferers): Put hr() from RefererTrack inside the div().
	(RefererTrack): Remove the hr() here and move it to GetReferers.
	(BrowsePage): Removed content class from the rc div.

	* modules/weblog-1.pl (NewWeblog1InitVariables): Removed vertical
	bar.

	* modules/link-all.pl (NewLinkAllGetGotoBar): Removed vertical
	bar.

	* wiki.pl (PrintJournal, BrowsePage, GetHeader, PrintFooter,
	PrintAllPages): Use start_div() and end_div() instead of strings.
	(DoHistory, DoRollback, DoEdit, DoPassword, DoIndex, DoSearch,
	DoMaintain, DoShowVersion):  Use div.
	(GetGotoBar): Added $UserGotoBar back.

2004-11-14  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RcHeader): Removed vertical bars.
	(PrintFooter): Classes are added in the respective subroutines.
	(GetNearLinksUsed, GetFooterTimestamp): Don't join the result of a
	map operation; instead pass it as a list to the CGI module.
	(GetAdminBar): Removed vertical bars.
	(GetFooterLinks, GetGotoBar, DoaboutSearch): Removed vertical bars.

2004-11-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetFormStart): Fix syntax error. (?)
	(GetKeptDiff): Pass old revision to GetDiff.
	(GetDiff): Handle situation where old or new revision is a file.

2004-11-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ReportError): Add a third parameter to request logging
	of the error.
	(SavePage): Request logging when trying to save bogus pages.
	(PrintWikiToHTML): Only save the page if the cache actually
	changes.
	(GetFormStart, DoHistory, GetCommentForm, GetFilterForm)
	(GetSearchForm, DoEdit, DoPassword): Add form class.

2004-11-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: Use q{...} instead of here-documents in some places.
	(%CookieParameters): Add homepage parameter.
	(GetCommentForm): Add homepage input field.
	(AddComment): Take homepage parameter into account.
	(ApplyRules): Add rule for merge conflicts.
	(DoPost): Don't put pre tags around merge conflicts.

2004-10-31  Alex Schroeder  <alex@gnu.org>

	* modules/toc.pl (TocRule): Call TocWikiHeading instead of
	WikiHeading.
	(TocHeadings): If the first subtitle is a H1, assume that this is
	the "start".

2004-10-31  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (ApplyRules): Save pos when determining $bol to fix a
	bug.
	(SmileyReplace): Simplified.

2004-10-28  Alex Schroeder  <alex@confusibombus>

	* modules/despam.pl: New.

2004-10-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoSearch): Accesskey 'f'.

2004-10-23  Alex Schroeder  <alex@confusibombus>

	* modules/compilation.pl (PrintCompilation): Return the pages printed.
	(DoCompilation): Print how many pages got printed.

2004-10-22  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (PageDeletable): Never delete pages if $KeepDays is set
	to 0.

2004-10-20  Alex Schroeder  <alex@gnu.org>

	* modules/headers.pl (HeadersRule): Relax requirements for headers
	-- just require === or --- at the beginning of a line.

2004-10-19  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (GetDownloadLink): Change look of download link if the
	page does not exist.

2004-10-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Require space after * all list items, not
	just the first.
	(GetRaw): Simplify.
	(PrintAllPages): Page titles with spaces.

	* modules/usemod.pl ($UseModMarkupInTitles): New option.
	(UsemodRule): Use it.

2004-10-16  Alex Schroeder  <alex@gnu.org>

	* modules/headers.pl (HeadersRule): Add code for horizontal rules.

2004-10-16  Alex Schroeder  <alex@confusibombus>

	* modules/usemod.pl ($UseModSpaceRequired, UsemodRule): Added a
	copy of the unnumbered list rule and a new option.  If this option
	is set to 0, the space after *, #, :, and ; is also no longer
	required.

2004-10-15  Alex Schroeder  <alex@gnu.org>

	* modules/download.pl (DownloadSupportRule): Allow alternate
	title.

	* wiki.pl (InitVariables): Bugfix -- handle '_' at the endo of
	$CommentsPrefix as well.
	(RSS): Warning if feed contains no item (even if no parsing
	error...).
	(RSS): Don't add closing ul unless an opening one was added.

2004-10-13  Alex Schroeder  <alex@gnu.org>

	* modules/tables.pl (TablesRule): Fix search'n'replace bug.

	* wiki.pl: No provide $DefaultCSS for tables.
	(InitVariables): Handle $CommentsPrefix.
	(GetHeader): Simplified.
	(AddComment): Added extra newlines.

	* modules/usemod.pl: Add $DefaultCSS for tables.

	* modules/tables.pl: Add $DefaultCSS for tables.

	* modules/static-copy.pl (StaticFileName): Add <br/>.
	(StaticHtml): Add h1 title, limited goto-bar, and footer.
	(StaticScriptLink): Don't link to non-existing pages.
	(StaticHtml): Handle comment pages.

2004-10-13  Alex Schroeder  <alex@confusibombus>

	* Makefile (upload): Fix upload target.

2004-10-13  Alex Schroeder  <alex@gnu.org>

	* wikiupload (main, usage, wikiput): Add password support.

	* modules/headlines.pl (HeadlinesRule): Clean close HTML
	environments.

	* modules/calendar.pl (NewCalendarGetHeader): Skip monthly
	calendar on the yearly calendar and on edit pages.

2004-10-12  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl (NewCalendarGetHeader): Show calendar only
	for browse action.

	* modules/sidebar.pl: $DefaultStyleSheet change to hide sidebar
	@media print.

	* wiki.pl: $DefaultStyleSheet change for textarea.

	* modules/sidebar.pl: Set $DefaultStyleSheet.

2004-10-10  Alex Schroeder  <alex@confusibombus>

	* modules/journal-rss.pl (DoJournalRss): Handle rsslimit=all and
	default showedit=1.

	* modules/paragraph-link.pl: Resolve conflict with
	portrait-support.pl

	* modules/portrait-support.pl: Set $DefaultStyleSheet.
	(PortraitSupportRule): All rules work only at the beginning of a
	line ($bol).

	* modules/journal-rss.pl (DoJournalRss): Use rsslimit instead of
	num and match instead of regexp, and reverse=1 instead of
	type=reverse.

	* modules/atom.pl (GetRcAtom): Use $CollectingJournal to
	avoid infinite loops when including the full RSS.

	* wiki.pl (RSS): Use $CollectingJournal as well.
	(PrintJournal): Cosmetic.

	* modules/journal-rss.pl (DoJournalRss): Use $CollectingJournal to
	avoid infinite loops when including the full RSS.
	(DoJournalRss): Cosmetic.

	* wiki.pl (DoPost): remove "DeletePage" when a comment is added.
	(PageDeletable): Simplify.

2004-10-08  Alex Schroeder  <alex@gnu.org>

	* modules/static-copy.pl (StaticFileName): Don't die on unreadable
	files.
	(StaticFile): Use binmode.
	(StaticHtml): Take $LogoUrl and $SidabarName into account.

	* modules/forms.pl (FormsRule): Close HTML environments before
	starting the form.

2004-10-07  Alex Schroeder  <alex@confusibombus>

	* modules/static-copy.pl: Rewrite to correctly extract and link
	uploaded files.
	(StaticFileName): Fix encoding issue.  When called from
	StaticScriptLink, the $id is already UrlEncoded, so we have to
	decode it again to get the filename.
	(StaticUrlDecode): New.

2004-10-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Handle list start tag for feeds without dates.
	(DoSurgeProtection): Verbose error message if the first visitor
	lock cannot be created.

2004-10-04  Alex Schroeder  <alex@gnu.org>

	* modules/tables.pl: Renamed UsemodTableAttributes to TableAttributes

	* modules/headers.pl: New.

	* modules/page-trail.pl (UpdatePageTrail): Eliminate duplicates.

2004-10-02  Sebastian Blatt  <sblatt@havens.de>

	* modules/dynlogo.pl: Fixed configuration and added example.

2004-09-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetAdminBar): Moved GetGotoBar($id) out of this sub and
	renamed $revisions to $html.
	(PrintFooter): Moved GetGotoBar($id) here.
	(ApplyRules): Accept @tags parameter to put the first paragraph in
	a p element.  Pass along p to ApplyRules calls.
	(PrintWikiToHTML):  Pass along p to ApplyRules calls.
	(PrintAllPages): Put pages into a separate div.

2004-09-29  Alex Schroeder  <alex@gnu.org>

	* modules/latex.pl (LatexRule): Don't require newlines when using
	the $$ and $ rules.

2004-09-27  Alex Schroeder  <alex@confusibombus>

	* modules/markup.pl (%MarkupLines): New option.
	(%MarkupSingles): Unquote HTML.
	(NewMarkupInitVariables): Use %MarkupLines.
	(MarkupTag): New, factored out of MarkupRule.
	(MarkupRule): Use MarkupTag and support %MarkupLines.
	(MarkupRule): Remove stray call to warn.

2004-09-21  Alex Schroeder  <alex@gnu.org>

	* modules/admin.pl (AdminPowerRename): Use FreeToNormal and
	ValidOrDie to make sure no invalid filename can be used.

2004-09-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintPage): Print title instead of id.
	(BannedContent): Return text matched in the original page.
	(DoPost): Changed text printed when BannedContent returns text.

2004-09-17  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (ApplyRules): New local variable $first.

2004-09-16  Alex Schroeder  <alex@gnu.org>

	* modules/image.pl (ImageSupportRule): Support full urls for the
	image.

2004-09-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: Fixed default CSS.

2004-09-09  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl (Cal): Highlight current day in the yearly
	calendar as well.  No longer accept $mday as a parameter.
	(PrintYearCalendar): No longer pass $mday parameter.

2004-09-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Remove guid handling.
	(RSS): Fix pubDate bug, handle feeds mith titles, description,
	and/or link.

2004-09-05  Alex Schroeder  <alex@confusibombus>

	* modules/image.pl (ImageSupportRule): Local images don't get the
	"local" class, because they already have the "image" class, and
	the default rule in wiki.pl doesn't add the local class, either.
	They are always local.  We just add the "outside" class when an
	external URL was given.

	* wiki.pl (ApplyRules): Disallow | in the alternate text of
	the [[image:page|text]] rule.  It
	prevented [[image:page|text|page]] from reaching image.pl.
	(GetDownloadLink): Use

	* modules/image.pl (ImageSupportRule): Changed regular expression
	a bit.

	* modules/usemod.pl (UsemodRule): Better matching of indented pre.

2004-09-04  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl: Add to $DefaultStyleSheet.
	(Cal): Translate month names.
	(Cal): Translate weekdays.

	* wiki.pl ($DefaultStyleSheet): New option.
	(GetHtmlHeader): Use it.

2004-09-02  Alex Schroeder  <alex@gnu.org>

	* modules/markup.pl (%MarkupPairs): No longer use the u element.
	Use em with a style attribute instead.
	(MarkupRule): Handle arrays in %MarkupPairs.

	* wiki.pl (GetUpload): Don't return a p element.

	* modules/setext.pl (SeTextRule): No longer use the u element.
	Use em with a style attribute instead.

2004-09-01  Alex Schroeder  <alex@gnu.org>

	* modules/usemod.pl (UsemodTableAttributes): New.
	(UsemodRule): Use it.

2004-08-31  Alex Schroeder  <alex@gnu.org>

	* modules/static-copy.pl (DoStatic): Produce valid XHTML.

2004-08-22  Alex Schroeder  <alex@confusibombus>

	* modules/templates.pl ($TemplatePattern): New option.
	(TemplateList): Translate _ to space when printing links.

2004-08-19  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (GetRcText): Bugfix for action=rc;raw=1;all=1.
	(GetRcRss): Use $ScriptName instead of $FullUrl.  Take
	$UsePathInfo into account.  When the all parameter is not set,
	don't add revision to the URL.
	(GetAuthorLink): Remove _ from author names.

2004-08-17  Alex Schroeder  <alex@gnu.org>

	* modules/anchors.pl (AnchorsRule): Allow free link pattern for
	anchor names.

2004-08-16  Alex Schroeder  <alex@gnu.org>

	* modules/atom.pl (AtomTime): Fix format.
	(AtomTag): Add escaped parameter.
	(GetRcAtom): Fix person entities, don't call AtomPage anymore.
	(AtomPage): Deleted.
	(GetRcAtom): Take $RssExclude into account, UrlEncode pagenames.
	(GetRcAtom): Only print content when full=1.

	* modules/footnotes.pl (NewFootnotePrintFooter): Use a <p> for
	each footnote item, instead of separating them via <br>.

2004-08-15  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (PrintPageDiff): New.
	(PageHtml): Call it.
	(BrowsePage, PrintHtmlDiff): Remove $id from parameters to PrintHtmlDiff.
	(GetRcRss): UrlEncode $RCName.

2004-08-13  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (DoHistory): XHTML conformance.

	* Makefile (package-upload): Fix curl command.

	* modules/usemod.pl (UsemodRule): XHTML conformance, use
	InElement.

	* modules/lang.pl (NewLangGetNearLinksUsed): XHTML conformance.

	* modules/portrait-support.pl (PortraitSupportRule): Bugfix.

	* wiki.pl (ApplyRules): Close all HTML environments before
	include, rss and journal.
	(AddHtmlEnvironment): Bugfix.
	(GetFilterForm, ImproveDiff, DiffAddPrefix): XHTML conformance.

	* modules/portrait-support.pl (PortraitSupportRule): Bugfixes and
	XHTML support.

	* wiki.pl (InElement): New.
	(ApplyRules): Use it.  Try to use environments for paragraphs,
	too.
	(CloseHtmlEnvironmentUntil): New.
	(AddHtmlEnvironment, Ts, ValidId, FreeToNormal): Eliminate
	warning.
	(GetRcHtml, GetRcText, GetRcRss, DoEdit): Eliminate case in
	variable name.
	(GetAuthorLink): Simplify.
	(GetFilterForm, DoHistory, GetHtmlHeader, GetCommentForm,
	GetSearchForm, DoEdit, DoPassword): XHTML conformance.
	(ApplyRules): Remove trailing emptry lines from the content.

2004-08-12  Alex Schroeder  <alex@confusibombus>

	* wiki.pl ($RssExclude): New option.
	(InitVariables): Apply FreeToNormal to \$RssExclude.
	(GetRcRss): Take $RssExclude into account.
	(PrintPageHtml): New.
	(PageHtml, PrintAllPages): Moved code to PrintPageHtml.

2004-08-11  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (ApplyRules): Eliminate a warning.
	(GetRcRss): Support full parameter for RSS feeds.
	(DoRss): Use application/rss+xml instead of text/plain.
	(PageHtml): New.

	* modules/atom.pl (GetRcAtom): Fix entry link.

2004-08-09  Alex Schroeder  <alex@confusibombus>

	* modules/paragraph-link.pl (ParagraphLinkRule): "anchor first
	defined here" uses print instead of return.

2004-08-07  Alex Schroeder  <alex@confusibombus>

	* modules/anchors.pl (AnchorsRule): Add support for named anchors
	in free links.

2004-08-06  Alex Schroeder  <alex@confusibombus>

	* modules/anchors.pl (AnchorsRule): Added invisible anchor
	definition.

	* modules/portrait-support.pl (PortraitSupportRule): Duplicate the
	horizontal rule and the heading stuff from usemod.pl, but only
	enable them if usemod.pl is loaded (when UsemodRule is defined).
	(NewPortraitSupportWikiHeading): Deleted.

	* wiki.pl (GetHttpHeader): Fix typo related to last_modified
	header, thanks to Andrés Martinelli.

	* modules/toc.pl (TocHeadings): Quote text in TOC, as noted by
	Ronnie Bashra.

	* modules/beautify.pl (Beautify): Use UnquoteHtml, as suggested by
	an anonymous user on the wiki.

2004-07-16  Sebastian Blatt  <sblatt@havens.de>

	* modules/admin.pl (AdminPowerDelete): added missing parenthesis

	* modules/throttle.pl: Added. Module to limit the number of
	parallel Oddmuse instances by keeping track of the script's
	process ids.

2004-07-14  Alex Schroeder  <alex@gnu.org>

	* modules/link-all.pl: Set %RuleOrder.

	* wiki.pl (%RuleOrder): New variable.
	(RunMyRules): Moved the adding of \&MyRules to @MyRules to InitVariables.
	(InitVariables): Code from RunMyRules, and use %RuleOrder to order rules.

2004-07-09  Alex Schroeder  <alex@gnu.org>

	* merge-list (Main): Don't filter empty lines.

2004-07-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitVariables): Set @LockOnCreation here, after
	translating spaces to underscores, and after reading the config
	file.
	(ParseData): Accept a space as the first character as well.

2004-07-06  Alex Schroeder  <alex@gnu.org>

	* modules/usemod.pl (UsemodRule): New regexp for the whitespace
	prefix rule.

	* wikiput (main): Added user and password option.
	(parse_wiki_location): Added support for path info.

2004-07-05  Alex Schroeder  <alex@confusibombus>

	* modules/usemod.pl (NewUsemodInitVariables): Bugfix -- call
	OldUsemodInitVariables().

2004-07-05  Nikolay A. Fetisov  <naf@monsy.mpei.ac.ru>

	* wiki.pl (InitVariables, ApplyRules, PrintJournal, OpenPage):
	Initialize some variables.
	(Save): Reset $IndexInit.

2004-06-29  Alex Schroeder  <alex@confusibombus>

	* modules/calendar.pl (Cal): The year can be part of the link for
	the month, or link to the year calendar.
	(PrintYearCalendar): When printing the year calendar, the year
	should not link to the same page.

	* modules/usemod.pl: New.

	* wiki.pl (RFC, ISBN, WikiHeading): Moved to modules/usemod.pl.
	(PrintSearchResult): No longer strip common HTML tags (since those
	are now defined in modules/usemod.pl).
	(ApplyRules): Moved many rules to modules/usemod.pl.
	(InitLinkPatterns): No longer set $RFCPattern and $ISBNPattern.
	(InitVariables): No longer set @HtmlTags
	($RFCPattern, $ISBNPattern, @HtmlTags, $HtmlTags, $HtmlLinks)
	($RawHtml): Moved to modules/usemod.pl.

	* modules/setext.pl: Unshift rule to the front.

2004-06-28  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (ApplyRules): Don't allow empty headers.
	(DoDownload): Use unquoted type for messages.
	(DoPost): Save unquoted type, use unquoted type for messages.

2004-06-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($bol): New global variable.
	(ApplyRules): Use local $bol instead of my $bol, so that
	extensions can use it as well.

	* modules/setext.pl (SeTextRule): Use the local $bol variable.

2004-06-26  Alex Schroeder  <alex@confusibombus>

	* test-markup.pl: New markup module tests.

	* modules/markup.pl (MarkupRule): Added zero-width look-ahead
	assertion.  Fix ~/elisp/ and /usr/bin/ example.

	* wiki.pl (ApplyRules): Require a space after list items (after
	*, #, :, ;).

	* modules/not-found-handler.pl (WriteLinkDb): Removed lock.
	(DoLinkDb): Added Lock.
	(RefreshLinkDb): Rewrite.  It was full of bugs.
	(NewNotFoundHandlerSave): Rewrite.
	(NotFoundHandlerCacheUpdate): Rewrite.

	* wiki.pl (ApplyRules): Require a space after bullet points (after
	and #).

	Don't override $ModuleDir if it is already set (since this is used
	before $ConfigFile is run).

2004-06-23  Alex Schroeder  <alex@gnu.org>

	* modules/markup.pl: A sequence of words may not start with a
	number in order to prevent "6/22/2004" -> "6<i>22</i>2004" instead
	of "6/22/2004".

2004-06-22  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (DoPost, DoDownload): Call quotemeta on the MIME type to
	allow image/svg+xml.

2004-06-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRc): Experimenting with revision clusters: By
	starting the summary with a page link, you can cluster one
	revision only.

2004-06-21  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (ApplyRules): New regepx → allow a bit more skipping of
	words.

2004-06-20  Alex Schroeder  <alex@confusibombus>

	* wiki.pl: Removed link action.
	(DoLinks, PrintLinkList, GetFullLinkList, GetLinkList): Gone.
	(ApplyRules): Small cleanup: Moved #FILE rule up, made words
	optimization less greedy by requiring a trailing space.

	* modules/markup.pl (MarkupRule): Use en dash and em dash, changed
	patterns slightly.

	* test-markup.pl: Added tests for the markup module.

	* modules/links.pl: Moved DoLinks from the main script into a
	module.

	* modules/markup.pl (MarkupRule): Numbers are allowed in words.

2004-06-19  Alex Schroeder  <alex@gnu.org>

	* modules/image.pl (ImageSupportRule): Support external images as
	well.
	($ImageUrlPath): New option.
	(ImageSupportRule): Use alt text as title attribute as well.

	* modules/markup.pl (MarkupRule): Don't use characters directly;
	use numerical character references instead.  Else this corrupts
	UTF-8 data!!
	(MarkupRule): Fix em dash rule.

	* wiki.pl (ApplyRules): Special case ''''' to render correctly.
	(RunMyRules): Only call MyRules if it is defined.
	(ApplyRules): Optimize smiley rule.
	(RunMyRules): Bugfix -- don't add \&MyRules a gazillion times.
	Optimize -- No eval to catch errors.
	(ApplyRules): Another optimization -- this one will disable all
	rules that start with lowercase ascii letters!

2004-06-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RunMyRules): Only run MyRules if it is actually
	defined.

2004-06-17  Alex Schroeder  <alex@confusibombus>

	* anchors.pl
	* calendar.pl
	* download.pl
	* faq.pl
	* footnotes.pl
	* forms.pl
	* headlines.pl
	* image.pl
	* lang.pl
	* latex.pl
	* link-all.pl
	* portrait-support.pl
	* signature.pl
	* thread.pl
	* translations.pl: Adapted to the bugfix in the RunMyRules sub.

	* wiki.pl (Clean, SmileyReplace, RunMyRules): Important change in
	handling rules: Rules are expected to return undef when they did
	not match, and the empty string if a dirty block was produced.
	(QuoteHtml, UnquoteHtml): Cosmetic.
	(ApplyRules): Several changes: 1. Use /o for more pattern matches.
	2. Don't call MyRules() here, add in RunMyRules instead.
	3. Removed some superfluous /i and /s options.  4. Fixed handling
	of ''''' by splitting the '' rule into two separate blocks.

2004-06-15  Alex Schroeder  <alex@confusibombus>

	* modules/calendar.pl (Cal): Accept year and month as parameters.
	Link month names.
	(PrintYearCalendar): Use Cal instead of near-duplication of code.
	(DoYearCalendar): New action 'calendar' used to print yearly
	calendar.
	(Cal): The year now links to an overview of the entire year.
	(CalendarRule): New rule for month:2004-06.
	(CalendarRule): New rule for month:+1 or month:-1.
	(PrintYearCalendar): Add div.year.

2004-06-15  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl (Cal): Support for Date::Calc and Date::Pcalc.
	($CalendarUseCal): New option.

2004-06-13  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoLinks): Pass parameters onto GetFullLinkList.
	(GetFullLinkList): Accept parameters instead of using GetParam.
	Move most of the code to GetLinkList.
	(GetLinkList): New, extract links from one page only.
	(ReadPermanentAnchors): Simplified, accept both $FS and space as
	separator.
	(WritePermanentAnchors): Use spaces instead of $FS to write the
	file.

	* modules/not-found-handler.pl ($LinkFile, %LinkDb): New variables.
	(ReadLinkDb, WriteLinkDb, RefreshLinkDb): New.
	(DoClearCache, DoLinkDb): New.
	(NewNotFoundHandlerDoMaintain): Deleted.
	(NewNotFoundHandlerSave): Use the new functionality.
	Major rewrite using a link database!

	* wiki.pl (RSS): Handle encoding of 'diff' and 'history' texts.
	(DeletePage): Bugfix.
	(RSS): No longer print square brackets around links to feeds
	without interwiki moniker.  This can be added using CSS.

2004-06-12  Alex Schroeder  <alex@confusibombus>

	* modules/not-found-handler.pl (NewNotFoundHandlerDeletePage): New
	function to delete cached copies of pages that are deleted.
	(NewNotFoundHandlerDeletePage, NewNotFoundHandlerSave): Delete
	both the page, and the page with language extension due to content
	negotiation, ie. PageName.en, PageName.de, etc.
	(NewNotFoundHandlerDeletePage): Deleted again.
	(NewNotFoundHandlerDoMaintain): New function.

	* modules/admin.pl (AdminPowerDelete): Only write rc log when
	delete was successful.  Depends on the change to DeletePage in
	wiki.pl.

	* wiki.pl (ApplyRules): Bugfix, lone *, #, and : in the middle of
	lines caused the creation of list items.
	(GetRcHtml): Show '(new)' instead of '(diff)' when revision == 1.
	(DoMaintain): Handle error reporting from DeletePage here.
	(DeletePage): Simplified.  Return error string or empty string on
	success.

2004-06-10  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (ApplyRules): Lists separated by whitespace are
	joined (affects *, #, and : at the beginning of a line).

2004-06-05  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (GetRedirectPage): Use $ScriptName instead of $FullUrl.

2004-06-04  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (PrintPage): Use GetPageOrEditLink to print pages.

2004-06-03  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl (CalendarRule): The CalendarRule is a dirty
	rule.
	(PrintYearCalendar): Handle spacing differently, provide an
	additional span for CSS.

2004-06-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ResolveId): Do not link achors that are on the same
	page as the their own name.

2004-05-31  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (PrintFooter, GetFooterLinks): Moved hr from inside
	span.edit to div.footer.

2004-05-31  Alex Schroeder  <alex@gnu.org>

	* modules/image.pl (ImageSupportRule): [[image/class:page name|alt
	text|target]] support as discussed on the oddmuse wiki

	* simplify.pl: Added use encoding 'utf8'; no idea what it does to
	non-UTF-8 scripts.
	(munge_rss): different presentation suggested by Björn Lindström.

2004-05-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetFullLinkList): Use alternate text for interlinks if
	provided, use FreeToNormal only when printing raw links.

2004-05-29  Alex Schroeder  <alex@gnu.org>

	* modules/admin.pl (AdminPowerRename): Bugfix.

2004-05-29  Alex Schroeder  <alex@confusibombus>

	* wiki.pl: Removed -w again because it is hell to 'make test'.
	(GetParam): Simplified (tried to remove -w warning but failed).
	(UrlEncode): Do not encode '#' as it is forbidden in page names
	and allows us to return anchors from ResolveId.
	(ResolveId): UrlEncode resolved for anchors ('alias'), and link to
	near pages directly ('near').
	(BrowseResolvedPage): Take changes in ResolveId into account.
	(ReBrowsePage): No longer accept third argument.
	(RcHeader): days parameter only added to the menu actions, not to
	all actions.
	(GetHttpHeader, GetRemoteHost): Reorganized to remove -w warning.
	(GetPermanentAnchor): Handle different info from ResolveId.
	(GetPageOrEditLink): Don't use the urls returned for nearlinks as
	scriptlinks.

2004-05-26  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (PrintFooter): Pass $id and $rev to GetAdminBar.
	(GetFooterLinks): Remove pagelock action from here.
	(GetAdminBar): Put pagelock action here.

2004-05-24  Alex Schroeder  <alex@confusibombus>

	* wiki.pl (PrintFooter): More spans.
	(DoSurgeProtection): Report $SurgeProtectionViews and
	$SurgeProtectionTime when surge protection is triggered.
	(RcHeader): Fixed text bug.

2004-05-21  Alex Schroeder  <alex@confusibombus>

	* wiki.pl: Run with -w.
	(GetPageOrEditLink): Reworked usage of ResolveId.
	(BrowseResolvedPage): Reworked usage of ResolveId.
	(DoEdit): Copy newText to oldText earlier when previewing so that
	preview works even when the old version is a file.
	(PrintPage): Reworked usage of ResolveId.
	(PrintSearchResultEntry): Reworked usage of ResolveId.

2004-05-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPrintAllPages): Admin-only.
	(RcHeader): Make all, showedit, and days explicit, so that they
	can be set and unset even if they are added to %CookieParameters.

2004-05-11  Alex Schroeder  <alex@gnu.org>

	* modules/portrait-support.pl (PortraitSupportRule): Better
	support for text browsers.

2004-05-10  Alex Schroeder  <alex@gnu.org>

	* latin-1.pl (translate): Do not rely on automatic encoding to
	latin-1.

	* wiki.pl ($BannedContent): New option.
	Add it to @LockOnCreation, apply FreeToNormal.
	(BannedContent): New sub.
	(DoPost): Call it, unless user is an editor.
	(DoWikiRequest): Editors can edit even when banned.

2004-05-09  Alex Schroeder  <alex@gnu.org>

	* upgrade-files.pl (basic_data): Extract summary from text instead
	from section.

2004-05-08  Alex Schroeder  <alex@gnu.org>

	* latin-1.pl (translate): Added '?', ';', '&' to the "safe" chars,
	ie. not encoded chars.

	* modules/lang.pl (NewLangInitCookie): Remember old theme
	parameters, taking care to separate normal values from language
	values (exactly two letters).
	(NewLangGetNearLinksUsed): New hidden parameter so that we know
	when no languages are set.

2004-04-28  Alex Schroeder  <alex@gnu.org>

	* modules/portrait-support.pl (NewPortraitSupportWikiHeading)
	(NewPortraitSupportApplyRules): Toggle $MyColor when adding a
	closing div tag.
	(PortraitSupportRule): Use CSS to alternate background colors.

2004-04-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetUrl): Test for image extension is case-insensitive.
	(GetHttpHeader): Allow $UseCache = -1.

2004-04-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoMaintain): Don't sort the output of AllPagesList(),
	since that did not work for at least one user.

2004-04-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoMaintain): Print error message only when $data is empty.

2004-04-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoShowVersion): Added LWP::UserAgent::VERSION printout.

2004-04-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($FullUrlPattern): New.
	(InitLinkPatterns): Set it.
	(ApplyRules): Use it.
	(GetFullLinkList): Fix the links action.

2004-04-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (AllPagesList): Find dotfiles, too.
	(GetRaw): Return nothing if LWP::UserAgent is not available.
	(RSS): Handle missing LWP::UserAgent and parser errors gracefully.
	Fix HTML output bug.
	(SearchNearPages): Use GetRaw instead of duplicating LWP code.
	(DoMaintain): Dito.
	(ApplyRules, GetDownloadLink): Allow image links with alternate text.
	(InitLinkPatterns): Add "()'" to free interwiki links.

2004-04-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPost): Fix raw=2 bug.
	(GetTextAtTime): Fix bug for rollback action where only the pages
	were rolled back that were changed at the exact moment!
	(ApplyRules, GetInterSiteUrl, GetInterLink): Don't always quote
	interlink pages.

2004-04-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoRollback): Fixed old bug: Rollback action has been
	unusable for a very long time!

	* test-markup.pl: added tests for rollback action.

	* wiki.pl (GetDownloadLink): Don't use the upload class for 'a'
	when linking to an inlined image.

	* modules/simple-rules.pl (NewSimpleRulesApplyRules): Added
	download links to uploaded images.
	(NewSimpleRulesApplyDirtyInlineRules): Added [[image:foo]] rule.

2004-04-10  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($FreeInterLinkPattern): New variable
	(InitLinkPatterns): Set it.
	(ApplyRules): Support new interlinks with spaces in the pagename.
	(GetInterSiteUrl): Encode the page name.

2004-04-09  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ScriptLink, GetEditLink, GetFooterLinks): Add accesskey.
	(GetCommentForm, DoEdit, DoPassword): Add accesskey.

2004-04-07  Alex Schroeder  <alex@gnu.org>

	* modules/namespaces.pl (NewNamespacesInitVariables): Add entries
	to %InterSite even if we are not in a subwiki right now.

2004-04-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Save): Specify 'time' instead of relying on 'undef', as
	one user reported that was a problem with his Perl build.

2004-04-05  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (UpdateReferers): Replace $q->url() with $ScriptName,
	since that's the default value.
	(GetHtmlHeader): Replace $q->url() with $ScriptName in the default
	body class (aka theme).
	(DoBrowseRequest): New handling, so that modules/namespaces.pl
	works.

2004-04-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (AllPagesList): Produce an error if the pageidx file
	exists and cannot be overwritten.

2004-04-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ResolveId): Fix bug when return existing link.

	* modules/toc.pl (TocHeadings): Return nothing if two headings or
	less.

2004-04-02  Alex Schroeder  <alex@gnu.org>

	* modules/weblog-2.pl (NewWeblog2InitVariables): Switch from
	gmtime to localtime.

	* modules/weblog-1.pl (NewWeblog1InitVariables): Switch from
	gmtime to localtime.

	* modules/calendar.pl (Cal): Switch from gmtime to localtime.

	* wiki.pl (ApplyRules): [url] is a dirty rule.

2004-03-31  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ResolveId): Permanent anchors now take precedence over
	existing pages.  Allow override using anchor parameter.
	(GetPermanentAnchor): Show warning when duplicating an existing
	permanent anchor.  Show link when duplicating an existing page.
	(ResolveId): Return as a third list item whether the page exists
	even if a permanent anchor is found.
	(GetPermanentAnchor): Use it.

2004-03-28  Alex Schroeder  <alex@gnu.org>

	* modules/calendar.pl (Cal): Link to the date, not the day, when
	there are no matches.
	(PrintYearCalendar): Add div.year class.
	(Cal): Add div.month class.

	* wiki.pl (InitLinkPatterns): add irc to $UrlProtocols.

	* modules/calendar.pl (Cal): Added support for multiple partial matches.
	(DoCollect): Added collect action.
	(CalendarRule): New rule.
	(PrintYearCalendar): Code to do the work.
	($CalendarOnEveryPage): New option.

2004-03-20  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RunMyRules, PrintCache): Start with 0 again.
	(GetInterLink, GetUrl, GetPageOrEditLink): Due to RunMyRules changes...
	(PrintFooter): Split into several new functions.
	(GetSisterSites, GetNearLinksUsed, GetFooterTimestamp)
	(GetAdminBar, GetFooterLinks, GetCommentForm): New functions.

2004-03-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintWikiToHTML, PrintCache): Start with
	$FootnoteNumber = 1.
	(BracketLink): New.
	(GetInterLink, GetUrl): Use it, and add "outside" class if
	necessary.
	(GetPageOrEditLink): Use it.
	(GetHtmlHeader): Default CSS for a.outside.
	(GetPageParameters, GetPageOrEditLink): Add UrlEncode thanks to wctang.
	(ScriptLink, GetAuthorLink, GetDownloadLink): Dito.
	(GetAuthorLink, PrintFooter, PrintPage, PrintSearchResultEntry): Dito.

2004-03-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitVariables): Add $RssInterwikiTranslate.
	(PrintFooter): Added admin bar inspired from UseMod 1.0.
	(ReBrowsePage): Third parameter is the anchor, UrlEncode all parameters.
	(DoPost): No longer encode id.

	(BrowseResolvedPage): Add third parameter to call to ReBrowsePage.

	(RSS): Use three-digit numbers to number items without a
	timestamp, so that the number is not recognized as a valid
	date (year-only) when printing the lines.

	Support for Chinese pages, thanks to Ray and wctang.
	(GetDownloadLink, BrowseResolvedPage, DoEdit): UrlEncode the page
	id in the action.
	(GetSearchLink): UrlEncode the name.
	(DoPost): UrlEncode the page when calling ReBrowsePage..

2004-03-13  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Print "UTC" only when time was provided.

2004-03-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Some more default CSS tinkering; hide
	form and div.refer when printing.
	(DoEdit): Put preview at the top of the page.
	(RSS): Parse more dates: Time, day, and month are optional.

2004-03-10  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Fixed default CSS.

2004-03-09  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetInterLink, GetUrl, GetPageOrEditLink, GetEditLink)
	(GetPageLink, GetRcHtml, GetOldPageLink, ScriptLinkDiff)
	(GetHistoryLink, GetRCLink, PrintAllPages, GetInterLink, GetUrl):
	Use more CSS classes.
	(GetDownloadLink): Link to image page, if necessary.

2004-03-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($RssInterwikiTranslate): New.
	(@LockOnCreation): Lock it upon creation.
	(RssInterwikiTranslateInit): New.
	(RSS): Call RssInterwikiTranslateInit if required.
	(%RssInterwikiTranslate, $RssInterwikiTranslateInit):  New
	(InitVariables): Initialize the two.
	(PrintFooter): Add lock and unlock links for admins.
	(Upload, GetDownloadLink, ApplyRules): Renamed from Upload to
	GetDownloadLink.  Add edit link if image doesn't exist.

2004-03-07  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetInterLink): Add more spans to interlinks.
	(RSS): Use $RssInterwikiTranslate on the URL if no interwiki was specified.
	(ApplyRules): RSS rule, fix whitespace splitting that breaks new RSS functionality.
	(ApplyRules, GetPageOrEditLink): Take brackets correctly into account for free links.
	(GetPageLink): Don't test for $FreeLinks before applying FreeToNormal.
	(GetEditLink, BrowseResolvedPage, GetPageParameters): Ditto.
	(DoPost, GetPermanentAnchor): Ditto.
	(GetHttpHeader): Don't send last-modified header when $UseCache is less than 2.
	(PrintFooter): Link to password action when a page is read-only.
	(ApplyRules): Added image inlining.
	(Upload): Use FreeToNormal on inlined images.

2004-03-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetFormStart): Second parameter to choose GET instead of POST.
	(GetSearchForm): Choose GET instead of POST.

2004-02-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoDownload, DoPost): Only test for MIME type matches if
	@UploadTypes is not empty.
	(Upload): Use download/pagename links if possible.

2004-02-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetReferers): Convert escapes back to bytes for the
	title (at least if they use the same coding system it will look
	good).
	(ReportError, BrowsePage, GetHeader, GetHttpHeader): Add error status.
	(DoWikiRequest, InitVariables, DoBrowseRequest, ValidIdOrDie)
	(BrowseResolvedPage, DoRollback, SavePage, ReadFileOrDie)
	(WriteStringToFile, AppendStringToFile, RequestLockDir)
	(DoEdit, DoDownload, UserIsAdminOrError, DoPost)
	(DoSurgeProtection): Added specific HTTP status codes.

2004-02-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%Action): New option.
	(DoBrowseRequest): Use it.  Major change in how actions are handled!
	(BrowseResolvedPage): Special treatment for non-existing pages: 'new' status.
	(BrowsePage, GetHeader): Pass 'new' status on.
	(GetHttpHeader): Return 404 status code if 'new'.

2004-02-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetAuthorLink): Use ScriptLink to link to author.

2004-02-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($HtmlHeaders): New option.
	(GetHtmlHeader): Use it.

2004-02-20  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Init): Only load modules and config file if they
	haven't been loaded already, so that sub redefinitions don't cause
	havoc in a mod_perl environment.

2004-02-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (@KnownLocks): New variable.
	(DoUnlock): Use it.

2004-02-09  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoShowVersion): Print diff and diff3 dependencies.

2004-02-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Init): Use binmode raw for STDOUT.
	(ApplyRules): Use binmode utf8 for STDOUT if $HttpCharset is
	'UTF-8' (the default).  Reset to raw immediately.
	(RSS): Don't downgrade anymore.

2004-02-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Cookie): The cookie is considered to have changed under
	the following condition: If the value was already set, and the new
	value is not the same as the old value, or if there was no old
	value, and the new value is not the default.

2004-02-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Cookie): Eliminate uninitialized variable warning.
	(ValidId): Added a specific error text if the id is empty.
	(DoBrowseRequest): Handle wiki/download/page and wiki/raw/page.

	* forms.pl (FormsRule): Add %this% rule.

2004-02-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (SearchNearPages): Print "Near pages:" only when there
	actually are any.

2004-01-31  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoEdit): Bugfix with conditional declaration: my
	$header = ... if $foo; If not $foo, $header will not be
	initialized and in a mod_perl environment this caused Oddmuse to
	keep showing the old header.
	(CloseHtmlEnvironment): Similar suspicious code.
	(InitCookie): Get rid of uninitialized variable warnigs.
	(ApplyRules): Rewrite handling to avoid using m//m when matching
	lines, local HtmlStack to get rid of uninitialized variable
	warnigs.
	(BrowsePage, ScriptLinkDiff): Get rid of uninitialized variable warnigs.
	(Cookie, GetTextRevision, GetCluster): Ditto.
	(DeletePermanentAnchors): Ditto, by removing relying on $_.
	($RunCGI): Can be set outside the script.
	(Cookie): Fix again.

2004-01-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($ModulesDescription): New variable.
	(InitVariables): Use it.
	(@MyRules): New option.
	(RunMyRules): New function.
	(ApplyRules): Call it.

2004-01-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%InvisibleCookieParameters): New option.
	(Cookie): Use it.

2004-01-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoUnlock, PrintSearchResultEntry): Use extra
	parenthesis around the qw() for Perl 5.005.

2004-01-23  Alex Schroeder  <alex@gnu.org>

	* weblog-tracking.pl (PingTracker): Added forking on each request.

	The entire weblog notification was moved into a separate module.

	* wiki.pl ($NotifyTracker, %NotifyJournalPage): Removed.
	(DoBrowseRequest): Removed ping action.
	(DoPost): Don't call PingTracker anymore.
	(PingTracker): Moved.
	(DoPingTracker): Moved.

	* weblog-tracking.pl (NewSave): Call OldSave instead of Save.

	* wiki.pl ($DataDir): Allow setting it via the environment
	variable "WikiDataDir" (for mod_perl).
	($ModuleDir): New variable.
	(Init): Load modules in $ModuleDir.

2004-01-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Print error message when parsing fails.
	(PrintFooter): Comments are no longer minor edits.
	(BrowsePage): Implement comment preview.
	(PrintFooter): Implement comment preview.
	(DoPost): Put comment munging into new sub AddComment, and call
	either BrowsePage or Do Edit when previewing depending on whether
	we are previewing a comment or an edit.
	(AddComment): New.

2004-01-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: No longer use bytes pragma, because after printing RSS
	feeds Perl will be messed up and some texts such as Links and text
	in the footer containing Umlauts will print as bytes instead of
	UTF-8 strings.  They are double-encoded.
	(RSS): Use utf::downgrade to downgrade the data received from the
	network.  This is sad, since printing Latin-1 encoded RSS feeds in
	a UTF-8 wiki no longer works, but protecting the rest of the page
	from corruption when an UTF-8 feed is printed in a UTF-8 wiki is
	more important.

2004-01-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DiffMarkWords): Use WriteStringToFile.
	(ApplyRules): Remove no longer used variable.
	(InitRequest): Don't call binmode on STDOUT.

	At the top: use bytes pragma added to disable all unicode features.
	A byte is a byte and not potentially part of a multi-byte character.

2004-01-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetPageOrEditLink): Add class to edit links.
	(ApplyRules): Removed binmode call, since that led to weird errors
	in perl 5.8.0 and 5.8.2 when printing large amounts of data (seen
	when using action=all).
	(InitRequest): Use binmode :utf8 for the entire session.

2004-01-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($PermanentAnchorsInit): New variable.
	(ResolveId): Use it to ReadPermanentAnchors() only once per
	session.
	(ReadPermanentAnchors): Set it.
	(DeletePermanentAnchors): Use it.
	(UserIsEditor): Change parameters; permanentanchors=2 no longer
	works, instead there is links=0 to disable ordinary links; near=1
	is new to include near links.
	(GetFullLinkList): Change parameters; url=2 no longer works,
	instead there is links=0 to disable ordinary links, and inter=1
	for interlinks.
	(DoIndex): Rework how the subtitle is created.
	(PrintFooter): Use "Back to X".
	(PrintAllPages): Allow filtering by language.
	(DoMaintain): Determine languages, too, if cache.
	(PrintFooter): Text change.
	(PrintAllPages): Refresh languages, too, when cache=0 is used.
	(DoMaintain): No longer handle cache parameter.

2004-01-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintSearchResult): Bugfix.
	(GetTextRevision): New function, factored out of BrowsePage.
	(BrowsePage, DoEdit, DoDownload): Use it.

2003-12-31  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintSearchResult): Bugfix -- quote HTML only after all
	the other stuff has been replaced.

2003-12-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Better error message when XML::RSS or
	LWP::UserAgent are not available.

2003-12-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoShowVersion): Print Perl version.
	(RSS): Improved handling of feeds without dates by using a numeric
	counter when necessary.

2003-12-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetInterSiteUrl): Bugfix: Return nothing if the site is
	not found on the intermap.
	(PrintSearchResultEntry): More elaborate linking for wikis that use subpages.

2003-12-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (HighlightRegex): New.
	(DoSearch, SearchNearPages, PrintSearchResultEntry): Use it.
	(PrintSearchResult): Extract HighlightRegex, SearchHighlight and
	SearchExtract.
	(SearchHighlight, SearchExtract): New.

2003-12-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcText): Use link instead of uri.
	(PrintFooter): Only print sister sites and edit near links when $id is set.
	(DoUnlock): Removed surplus parenthesis.
	(PrintPage): Only use minimal RSS 3.0 when searching.
	(DoSearch): Add head item for raw output.
	(SearchNearPages): Skip head item.  Append search string to search url if no %s found.
	(PrintSearchResultEntry): Use RcTextItem.
	(DoSearch): Change default to near=1 and offer link to near=2.
	(SearchNearPages): Change default to near=1.
	(SearchNearPages): Switched order of near searches.
	(PrintSearchResultEntry): Only print the info provided.

2003-12-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%NearSearch): New variable.
	(InitVariables): Init it.
	(NearInit): Read three fields instead of two from the near map.
	(PrintFooter): Removed third argument to GetAuthorLink.
	(PrintPage): If raw and context, use RSS 3.0 format.
	(DoSearch): Call SearchNearPages, too.
	(SearchString, SearchNearPages): New.
	(SearchTitleAndBody): Use SearchString.
	(PrintSearchResultEntry): New.
	(PrintSearchResult): Use it.

2003-12-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (NearInit): NearSource now uses a list as value.
	(ResolveId): Resolve to the first source in the list.
	(PrintFooter): Use list.
	(BrowseResolvedPage): Use title attribute.
	(DoShowVersion): More debugging of near links.

2003-12-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($SisterSiteLogoUrl): New variable.
	(PrintFooter): Use it.
	(GetHtmlHeader): More CSS for div.near and div.sister.

2003-12-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($NearSiteInit, %NearSite, %NearSource, %NearLinksUsed,
	$NearDir, $NearMap): New variables.
	(@LockOnCreation): Added $NearMap.
	(InitVariables): Init $NearSiteInit, %NearSite, %NearSource,
	%NearLinksUsed, $NearMap.
	(NearInit): New.
	(ApplyRules): Call NearInit.
	(InterInit): New.
	(GetSiteUrl): Moved some code to InterInit, moved rest to
	GetInterSiteUrl.
	(GetInterSiteUrl): New, replaces GetSiteUrl.
	(GetInterLink): Use GetInterSiteUrl.
	(ResolveId): Added near-link handling.
	(PrintFooter): Added near-link handling.
	(DoMaintain): Added near-link handling.
	(GetHtmlHeader): Added a.near:link and a.near:visited to default
	stylesheet.
	(UserCanEdit): No edit when the page is in @LockOnCreation.
	(DoIndex): Fix raw handling.
	(DoShowVersion): Added debugging info for interlinks and
	nearlinks.

2003-12-07  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (BrowsePage): When a page cluster is self-contained, and
	no rcclusteronly is provided, set the parameter to the page name.
	(SetParam): New sub.
	(InitCookie, BrowsePage, DoPost): Use SetParam instead of setting
	$NewCookie directly.

2003-12-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPost): Fix raw handling.
	(GetFullLinkList): Implement listing orphans only.

2003-11-29  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoIndex): Print how many pages there are in this sub,
	then call PrintPage on every item in the list instead of passing
	the list to PrintPageList.
	(PrintPageList): Removed.
	(PrintPage): New, replaces PrintPageList.
	(DoSearch): Print how many pages there are at the end of the list,
	then call PrintSearchResult or PrintPage on every item in the list
	instead of passing the list to PrintSearchResults.
	(PrintSearchResults): Removed.
	(PrintSearchResult): New, replaces PrintSearchResults.
	(DoPost): Some refactoring, and making sure that no there is no
	conflict warning when a comment is being appended.

2003-11-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (SearchTitleAndBody, GetRc): Tweaking handling of "none".
	(DoSearch): Only replace when lang is not given.
	(PrintPageList): Handle raw parameter.
	(DoBrowseRequest): Call DoIndex without raw parameter.
	(DoIndex): Print header only when no raw parameter; retrieve it here.
	(GetSearchForm, GetFilterForm): Use lang parameter as default.
	(PrintPageList): Handle lang attribute.
	(DoIndex): Add lang to the header.
	(RcHeader, GetRc, SearchTitleAndBody): Rename $langFilter -> $lang;
	(DoSearch, Replace): Replacement is language sensitive.
	(GetRcRss): Some refactoring.
	(PrintSearchResults): Elipsis no longer bold.

	(%CookieParameters): Added 'lang'.
	(RcHeader, GetFilterForm, GetRc): Changed 'rclang' to 'lang'.
	(GetSearchForm): Add language textfield.
	(SearchTitleAndBody): Filter by languages.

	($UseCache): New variable.
	(BrowsePage): Check it before allowing the use of the cache.
	(PrintAllPages): Check it before allowing the use of the cache.

	(GetRc): When a page has no languages, it will be
	assigned the language 'none'.
	(Save): Save languages as part of the page.
	(GetLanguages): Return the languages in a string instead of a listref.
	(WriteRcLog): Use the languages string directly.

2003-11-20  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoShowVersion): Print server software as well.

2003-11-16  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Tss): @_[0] -> $_[0]
	(PrintSearchResults): \1 -> $1
	(DoMaintain): Bugfix; the call to sort was borked.
	(SaveKeepFile): Set keep-ts when moving a page to the keep file.
	(ExpireKeepFiles): Use keep-ts to decide whether to expire or not.

2003-11-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DiffHtmlMarkWords): Be even more restrictive.  If the
	change extends past the first hundred words, don't mark it.
	(OpenPage): No text if this a comment page.

2003-11-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%RssInterwikiTranslate): New variable.
	(RSS): Use 'diff' instead of '(diff)' for translating; change
	order of attributes per line; separate by days if supported, print
	time if supported; use %RssInterwikiTranslate.
	(GetRcHtml): Use 'diff' instead of '(diff)' for translating;
	change order of attributes per line.
	(GetHistoryLine): Change order of attributes per line.
	(CalcTime): Use leading zero for hours.

2003-11-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoIndex): Add new parameter permanentanchors.
	(DoIndex): Sort pages.
	(PrintPageList): Use ResolveId to get link class correct.
	(AllPagesList): Don't sort list.
	(DoMaintain): Sort pages.

2003-11-10  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitVariables): Set $FullUrl to $ScriptName
	if unset.

2003-11-09  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetInterLink): Support %s in the interwiki link.

2003-11-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcRss): Provide diff link only if the wiki can handle it.
	(GetFilterForm): Use a table.
	(RSS): Handle diff and history links.
	(RSS): Simplified date handling a bit.
	(Save): Only call UpdateDiffs when the new revision is > 1.
	(PrintWikiToHTML): Not fatal if we can't get the main lock.

2003-11-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%NotifyJournalPage): New variable.
	(PingTracker): Use it.
	(RSS): Print interwiki link if provided and RSS feeds are being merged.
	(RSS): RDF namespace taken into account.
	(DoRc): Append filter form.
	(RcHeader): Fix stickiness of showedit attribute, make days sticky.
	(GetFilterForm): New.

2003-11-05  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (WriteRcLog): Check whether $langref is empty before dereferencing.

2003-11-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintHtmlDiff): Call GetKeptDiff without lock
	parameter.
	(GetKeptDiff): No longer accept lock parameter.
	(GetDiff): No longer accept lock parameter.  Just use the diff
	lock always.
	(UpdateDiffs): No longer use lock parameter.
	(Save): Make sure the old text is not encoded when it sent to the
	diff.
	(SmileyReplace): New class.  Suggested by BjÃ¶rn LindstrÃ¶m.
	(InitVariables): Set $FullUrl unless set by user.
	(GetRcRss): No need to set $FullUrl anymore.
	(GetFormStart): Use $FullUrl instead of $ScriptName.  Suggested by
	BjÃ¶rn LindstrÃ¶m to get URL rewriting to work.
	(GetRedirectPage): No need to set $FullUrl anymore.  Take
	$UsePathInfo into account.  Suggested by BjÃ¶rn LindstrÃ¶m.
	(GetDiff): Removed debugging output.
	(InitRequest): Use binmode on STDOUT for UTF-8 printing of RSS.
	(RSS): No more encoding and decoding stuff.  Rely on Perl 5.8 to
	do this.
	(DoShowVersion): Add more debugging information by using the
	dependencies parameter.
	(GetRedirectPage): Only use / when not using query syntax but
	keyword syntax.
	(ApplyRules): Use binmode to tell Perl that the RSS output can be
	printed as UTF-8.  Everywhere else we are just using raw bytes
	ourselves.
	(ReadFileOrDie): Use ReportError instead of die.
	(WriteStringToFile): Dito.
	(GetPermanentAnchor): Don't always write permanent anchors, and
	don't double-encode page ids.
	(DoRc): Remove timestamp.
	(RcHeader): Remove computation of lastTs, and simplify the link to
	"list later changes".
	(ReportError): Don't cache errors.
	(GetHeader): Use $Now if no caching specified.
	(DoShowVisitors): Don't cache.

2003-11-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoHistory): Extract revision numbers from the keep file
	names.
	(GetRefererFile): Changed name of referer files.
	(ApplyRules): Permanent anchors are printed using a special span
	element when $withanchors is not used (eg. when showing older
	revisions of a page).

2003-11-02  Alex Schroeder  <alex@gnu.org>

	Major Rewrite!  This version uses a completely new file format,
	and it stores kept revisions in separate files instead of one big
	keep file.  Before upgrading to this revision or later, you MUST
	run the upgrade-files.pl script.

2003-10-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Clean): Fix "eating of zero" bug.
	(Dirty): Ditto.
	(ApplyRules): Optimize regexp matches by working around /m, and
	fix "eating of zero" bug.
	(GetRcRss): Replace & with ; in URLs.
	(ScriptLinkDiff): Ditto.
	(DoPost): Optimize regexp matches by working around $'.
	(Clean, ApplyRules, SmileyReplace): Fix the handling of '' and 0
	in Clean().

2003-10-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($PageCluster): New variable.
	(GetRc): Only cluster when $PageCluster is set.
	(GetRcHtml): Only cluster when $PageCluster is set.
	(GetCluster): Only cluster when $PageCluster is set.  Main page
	has to stand on its own on the first line.

2003-10-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Skip contributor if empty.
	(RSS): Add ' -- ' between page link and summary.
	(DoPost): Handle raw=2 edits again.
	(GenerateAllPagesList): Don't sort intermediary list.
	(ApplyRules): Use /o flag for many regular expressions that didn't
	use it.
	(GetPageLinks): Deleted.
	(DoLinks): Allow raw output.
	(PrintLinkList): exists=1 only works for raw output now, names
	parameter removed, editlink param removed.
	(GetFullLinkList): unique, inter, and sort param removed, these
	settings are default, now.  page and search param removed.  exists
	param handled in PrintLinkList for raw output only. empty param
	removed, empty pages are not listed anymore.

2003-10-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (Clean): Return nothing if empty block (due to
	unsuccessful call to MyRules).
	(RcHeader): Inherit rclang as well.
	(GetRc): Inherit rclang as well.
	(PrintFooter): Space after the username label.
	(DoEdit): Space after the username label.

2003-10-24  Alex Schroeder  <alex@gnu.org>

	Major rewrite of rules -- if you use DirtyBlock in your config file,
	then you will have to rewrite your code.

	* wiki.pl ($Fragment, @Blocks, @Flags): New globals used by ApplyRules.
	(Clean): New.
	(Dirty): New.
	(ApplyRules): Major rewrite, use Clean and Dirty.
	(DirtyBlock): Deleted.  Any MyRules in config files must be rewritten.

2003-10-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitLinkPatterns): $InterSitePattern may start with
	non-ASCII letters as well.

2003-10-20  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (NotModified): Protect use of Time::ParseDate with an
	eval.
	(InitVariables): Set $LastUpdate here, if it is not set already.
	(BrowsePage): Move the remaining code from NotModified here.  No
	longer use Time::ParseDate.
	(NotModified): Deleted.
	(GetHttpHeader): Send $LastUpdate as Last-modified header.  No
	longer send an Expires header (no support for HTTP/1.0 caching).

2003-10-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitVariables): Do not reset $IndexInit anymore.
	(Upload): Don't test for $IndexInit before calling AllPagesList.
	(BrowsePage): Return if NotModified().
	(NotModified): New.
	($LastUpdate): New.
	(Save): Touch $IndexFile in any case, and set $LastUpdate.
	(DoMaintain): Unset $IndexFile when cleaning the cache.
	(DoMaintain): Redirect stdout only when required.

2003-10-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetPageOrEditLink): ResolveId returns more data.
	(ResolveId): Return more data.
	(BrowseResolvedPage): Use it.
	(GetHtmlHeader): Add CSS for a.alias.


2003-10-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Added RSS autodiscovery.
	(DoBrowseRequest): Renamed &MyAction to &MyActions.
	(GetRcRss): Simplification.
	(@MyMacros): New.
	(DoPost): Apply macros.

2003-10-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Add new ! rule.
	(RcHeader): Add interface for all and showedit parameters to recent changes.
	(RSS): Rewrote encoding handling (depends on Unicode::MapUTF8, now!).
	Fixed keyhandling.
	(WriteReferers): Unlink empty files.

2003-10-16  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RcHeader): Do not double rcclusteronly.
	(DoBrowseRequest): Simplify call to DoPost.
	(DoPost): Call FreeToNormal on the pagenamee, and check for validity here.

2003-10-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoRc): Extract header printing into RcHeader.
	(RcHeader): New.
	(GetRc): Implement rcfilteronly parameter (ie. filtered recent
	changes).
	(DoSearch): Add link to filtered recent changes.
	(RcHeader): Remember rc parameters when printing the header.
	(BrowsePage): Fix detection of #REDIRECT bug.
	(ScriptLink): Add title parameter.
	(GetSearchLink): Add title parameter.
	(GetHeader): Add title to header.
	(GetPermanentAnchor): Add title to permanent anchor definition.

2003-10-13  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoRc): Rewrite in a more compact call to map.
	(GetRc): Rewrite in a more compact call to map.
	(DoMaintain): Prune referrers.
	(DeletePage): Rewrite in a more compact loop.
	(ReadReferers): Call ExpireReferers.
	(ExpireReferers): New function extracted from UpdateReferers.
	(UpdateReferers): Don't expire referrers, since that happens upon
	reading.

2003-10-12  Alex Schroeder  <alex@gnu.org>

	(SearchTitleAndBody): Support "and" and "or".
	(PrintSearchResults): Support "and" and "or".

2003-10-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($SurgeProtectionTime, $SurgeProtectionViews): Doubled
	defaults.
	(InitVariables): $NotFoundPg also passed through FreeToNormal.
	(ApplyRules): Removed rule for pointing to permanent
	anchors [##like this].
	(GetPageOrEditLink): Call ResolveId.
	(DoBrowseRequest): Call BrowseResolvedPage.
	(DoBrowseRequest): If MyAction is defined, it is called instead of
	doing the default error reporting.
	(BrowseResolvedPage): New.
	(ResolveId): New.
	(BrowsePage): Simplified #REDIRECT handling.
	(GetRedirectPage): Removed third parameter since it was unused.
	(ReBrowsePage): Removed third parameter since it was unused.
	(DoPost): Removed third parameter since it was unused.
	(DoRandom): Removed extra parameters from call to ReBrowsePage.
	(GetSearchLink): Take class and name parameters.
	(GetHtmlHeader): Removed CSS rules for a.link from the default CSS.
	(GetPermanentAnchor): Simplified.
	(GetPermanentAnchor): Removed; use GetSearchLink for rendering.
	(Cookie): Make the message more readable.

2003-10-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcHtml): Don't show "(diff)" link for clusters.
	Show the label "Cluster:" instead.

2003-10-10  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (T): Simplified.
	(BrowsePage): Print list of recent changes if parameter
	rcclusteronly is set.
	(DoRc): Print header if rcclusteronly is set.
	(GetRc): Implement page clustering logic.
	(GetRcHtml, GetRcText, GetRcRss): New parameter cluster.
	(GetRcRss): Fix bug with less than 15 items in the history.
	(GetOldPageParameters): Renamed to GetPageParameters.
	(GetPageParameters, GetOldPageLink): New parameter cluster.
	(Save): Determine page cluster when saving.
	(GetCluster): New sub.
	(WriteRcLog): New parameter cluster.
	(DoSurgeProtection): Fix bug allowing unlock action if unable to
	get visitor lock.
	(DoRc): Adapt the header for clustered pages.

2003-10-10  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ExpireKeepFile, WriteStringToFile, AppendStringToFile):
	Spelling: cant->cannot.
	(DoPost): Use diff3 for conflict merging, and use a pre block for
	the conflict itself.
	(GetPermanentAnchor): New text.
	(DoPost): Rewrote conflict handling again.

2003-10-07  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ValidId): Only avoid spaces in filenames when not $FreeLinks.

2003-10-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoUnlock): Added merge back.
	(DoEdit): Added oldtime back.
	(DoPost): If new author and oldtime is given, attempt a merge.
	Use a message if the merge fails.  Use a message if conflict
	markers are detected.
	(MergeRevisions): Added back.
	(MergeRevisions): Redirect stderr output of merge.

2003-10-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%CookieParameters): Added 'msg'.
	(BrowsePage): Display the content of the 'msg' parameter, and
	remove it from the cookie.
	(Cookie): Changes to the 'msg' parameter only will not cause the
	cookie to be shown.
	(Init): Fixed typo in the error message for config pages.
	(DoEdit): Less parameters.
	(DoBrowseRequest): Call DoEdit with less parameters.
	(DoBrowseRequest): Get rid of the oldtime parameter and use Save
	instead (the name of the save button).  Get rid of raw=2.
	(PrintFooter): Get rid of oldtime and oldconflict parameters.
	(DoUnlock): No longer consider the merge lock.
	(DoEdit): Get rid of conflict handling.
	(DoPost): Don't handle raw=2.  Get rid of conflict handling.  Just
	use add the 'msg' parameter to the cookie if somebody else changed
	the page in the last two minutes.
	(CalcTimeSince): New, moved from DoShowVisitors.
	(DoShowVisitors): Call CalcTimeSince.
	(DoPost): Increase timespan to 10 minutes and call CalcTimeSince.

2003-10-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RequestLockDir): Added return back in for the case
	where no error is reported.
	(DoPost): Report errors if the browser does not provide enough
	information.

2003-10-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Reinitialize the RSS parser and the HTTP user
	agent for every URI.
	(ApplyRules): No longer require quotes for RSS rule.
	(RSS): Remove extra quotes around URIs.  'title' is no longer
	guaranteed.  Use 'guid' if available.  But it back in a list.
	(GetRcRss): Default is 15 not 14.
	(RSS): Take care not to make the list larger!

2003-10-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Allow uptional maxitems argument for RSS
	feeds, and allow multiple RSS feeds to be merged.
	(RSS): Implement it.
	(ApplyRules): Allow any whitespace, not only spaces, inside rss,
	include, and journal pseudo-tags.
	(GetRcRss): Use rsslimit-1 instead of rsslimit.

2003-09-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: Moved use CGI and use CGI::Carp to the top.
	(%Lock): New variable.
	(InitVariables): Set it.
	(ReportError): Exit upon an error.  Clean up locks behind us.
	(RequestLockDir): Don't return after ReportError.  Add current
	lock to %Locks.
	(ReleaseLockDir): Remove lock from %Locks.
	(DoBannedReading): Deleted.
	(DoWikiRequest): Don't use DoBannedReading, don't return after
	ReportError.
	(DoRollback): Don't return after ReportError.
	(DiffHtmlMarkWords): No highlighting if more than 50 words.  There
	was a case where highlighting from 1 to 1739 caused a crash that
	was not caught by fatalsToBrowser.
	(UpdatePageVersion): Deleted.
	(OpenPage): Don't use UpdatePageVersion, don't return after
	ReportError.
	(DoPost): Check for $UploadAllowed before accepting uploads.
	(ExpireKeepFile, ValidIdOrDie): Don't return after ReportError.
	(DoEdit, DoDownload, DoPost): Don't return after ReportError.
	(DoPost): Catch empty string returned by MergeRevisions, eg. if
	/usr/bin/merge is missing.
	(WriteRcLog): Don't die; use ReportError instead.
	(DoPageLock): Don't return after ValidIdOrDie.
	(DoSurgeProtection): Don't exit after ReportError.
	(RequestLockOrError): Renamed from RequestLock.
	(PrintWikiToHTML): Renamed RequestLock.
	(DoRollback): Renamed RequestLock, don't return.
	(UserIsAdminOrError): Use ReportError.
	(Replace): Renamed RequestLock, don't return.
	(DoPost): Renamed RequestLock, don't return.
	(DoPost): Don't call ReleaseLock before ReportError.
	(DoMaintain): Renamed RequestLock, don't return.
	(DoConvert): Renamed RequestLock, don't return.  Don't return upon
	failed UserIsAdminOrError.
	(GetPermanentAnchor): Don't specify separate wait values.
	(DeletePermanentAnchors): Don't specify separate wait values.

2003-09-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoPost): Release lock on errors.

2003-09-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%CookieParameters): Added 'css'.
	(GetHtmlHeader): Use it.
	(DoHistory): Removed a br tag.
	(GetHtmlHeader): Encoding multiple style sheets.
	(PrintHtmlDiff): Fixed extent of the 'diff' div.
	($PrintedHeader): New variable.
	(InitVariables): Set it.
	(GetHttpHeader): Set it.
	(ReportError): Use GetHttpHeader to print header.
	(DoRollback): No error message required.
	(ExpireKeepFile): Rewrote some conditions.
	(ExpireKeepFile): Use ReportError instead of die.
	(RequestLockDir): Use ReportError instead of die.
	(PrintPageList): Rewrote lock handling.
	(DoPost): Rewrote lock handling.
	(DoMaintain): Rewrote lock handling.
	(DoConvert): Rewrote lock handling.
	(DoSurgeProtection): Rewrote lock handling.
	(WriteReferers): Rewrote lock handling.
	(GetPermanentAnchor): Rewrote lock handling.
	(DeletePermanentAnchors): Rewrote lock handling.
	(RequestLockDir): Print error at all times without relying on a
	specific errno.
	(SearchTitleAndBody): Skip uploaded files.
	(PrintSearchResults): Show files with MIME-type if search string
	starts with ^#FILE.
	(ApplyRules, DoEdit): Fix #FILE handling.
	(GetHtmlHeader): Change default StyleSheet for a.upload links.

2003-09-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Removed the [image:foo] and the [link:foo]
	rules again.

2003-09-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHttpHeader): Use Cache-Control header.
	(DoDownload): If the revision requested is the same as the current
	revision there is no need to open the keep file.
	(DoPost): Do encoding in a separate eval block.

2003-09-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcHtml): Uncommented rollback code.
	(BrowsePage): Don't pass modification date to GetHeader.
	(GetHeader): Don't accept modification date anymore.
	(GetHttpHeader): Simplified handling of modification date.
	(DoDownload): Only pass modification date to GetHttpHeader if no
	revision.

2003-09-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ReportError): Simplified some.
	(Init): New setup, make sure $MaxPost takes effect.
	(DoIndex): Simplified some.
	(PrintSearchResults): Remove subpage specific code.
	(GetFullLinkList): Simplified some.
	(BrowsePage): Removed 304 response, because the status of the
	page also depends on the status of *other* pages.
	(DoBrowseRequest): Removed parameters to BrowsePage.

2003-09-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Accept two more parameters, with anchors,
	and revision, use Upload for the picture rule, extend include rule
	to accept a with-anchors instead of text parameter, two new rules
	to handle uploaded files, take the new parameters into account.
	(AddHtmlEnvironment): Simplified slightly.
	(CloseHtmlEnvironments): Simplified slightly.
	(PrintWikiToHTML): New parameter cacheok.
	(Upload): New function.
	(PrintCache): Use new parameters for ApplyRules.
	(DoBrowseRequest): Pass new parameters to BrowsePage when
	appropriate.
	(BrowsePage): New parameter $cacheok, return 304 NOT MODIFIED if
	appropriate, pass new parameter to GetHeader.
	(GetHeader): New parameter timestamp, pass it on to GetHttpHeader.
	(GetHttpHeader): New parameters modified and cacheok.
	(GetHtmlHeader): New CSS to downloadable files.
	(DoEdit): Reset edit box if it used to be a file, only provide
	upload link if you are allowed to use it, no longer pass 'preview'
	as a revision to PrintWikiToHTML.
	(DoDownload): Return 304 NOT MODIFIED if appropriate, pass new
	parametesr to GetHttpHeader.
	(PrintAllPages): New parameter comments, to print link to comments
	page if required.
	(DoMaintain): New parameters for PrintWikiToHTML.

2003-09-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($UploadAllowed, @UploadTypes): New variables.
	(InitRequest): Uploads are allowed, now.
	(ApplyRules): New rule to render uploaded files as links or
	images.
	(DoBrowseRequest): New download action.
	(GetHttpHeader): New parameter to offer 24h caching instead of the
	default 10s.
	(GetFormStart): New parameter for multipart/form-data required for
	file uploads.
	(OpenNewText): Removed newauthor field from the database.
	(DoEdit, DoPost): Handle uploading of files -- large change!
	(GetUpload, DoDownload): New functions.
	(DoRollback, DoSearch): UserIsAdminOrError requires HTTP Headers
	printed.
	(Save): Replaced newAuthor parameter with upload parameter.  No
	diff and no language info is generated for uploads.
	(DoMaintain): Removed forgotten provision for subpages.
	(DeletePage): Deleting pages no longer edits the rclog.
	(EditRecentChanges): Removed.
	(EditRecentChangesFile): Removed.

2003-09-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (OpenHtmlEnvironment): Fix closing of all tags when the
	list type changes.
	(GetPageOrEditLink): Change &amp; to ; to separate parameters.
	(GetEditLink, DoRc, GetRcRss): Ditto.
	(GetHistoryLink, GetRCLink, GetPermanentAnchor): Ditto.
	(DoBrowseRequest): New action 'rollback'.
	(GetRcHtml): Show rollback link for administrators.
	(RollbackPossible): New.
	(DoRollback): New.

2003-09-20  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules, OpenHtmlEnvironment): Rewrote list
	handling.
	(GetPageOrEditLink): & -> &amp;
	(GetEditLink): Ditto.
	(DoRc): Ditto.
	(GetPermanentAnchor): Ditto.

2003-09-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoMaintain): Delete permanent anchors file and page
	index when the cache is going to be regenerated.

	* test-markup.pl: Added tests for the cache refresh during
	maintenance.

	* wiki.pl (SavePage): Added error for missing pagenames.
	(DoSearch): Indicate the replacement text, too.
	(Replace): Do replacement in an eval so that backreferences work.
	(PrintWikiToHTML): Don't do locking if the calling context has
	already locked the wiki.
	(DoMaintain): When cache=1, refresh the cache, too.

	* test-markup.pl: Added tests for search and replace.

2003-09-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Add optional text parameter to the include
	markup.

2003-09-13  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Added CSS for div.journal h1.

2003-09-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: Replaced many occurences of || with or.
	(GetHtmlHeader): The index of all pages gets robot INDEX
	tagged so that you can submit it to a search engine to spider your
	entire site, together with your recent changes page.
	(DoMaintain): Removed useless parameters.
	(DeletePage): Removed useless parameters.

2003-09-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl: Many little CGI changes, changes of local
	declarations (coding style), stripped some extra newlines.
	($WikiDescription): Can no longer be set in the config file.
	(Init): Restructured.  Call InitRequest at the beginning and
	InitVariables at the end.
	(InitRequest): Split into two, InitRequest and InitVariables.
	(InitVariables): Set $WikiDescription here.
	(DoLinks): No longer use pre tags.
	(PrintLinkList): Add colon after page name if page names are
	listed.
	(DoRc): Add rcuseronly and rchostonly parameters.
	(GetRc): Ditto.

2003-09-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetSearchLink): Do not encode page title.
	(GetHtmlHeader): Simplified default CSS since the validator seems
	to be less picky about foreground and background colors.
	(DoPost): In summaries with multiple lines, replace newline
	characters with spaces.

2003-09-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitLinkPatterns): Small refactoring.
	(BrowsePage): Small refactoring.
	(GetRc): Small refactoring.
	(SaveKeepSection): Small refactoring.
	(SearchTitleAndBody): Small refactoring.
	(PrintSearchResults): Small refactoring.
	(ScriptLinkDiff): Allow new parameter for the old revision to use.
	(GetRcHtml): Removed rcchangehist parameter which had no effect.
	If parameter all=1 is given, the diff link uses the new
	ScriptLinkDiff parameter.
	(PrintHtmlDiff): Simplified substantially.  Removed author diffs.
	Removed links to alternate diffs.
	(GetCacheDiff): Removed author diffs.
	(ExpireKeepFile): Removed author diffs.
	(UpdateDiffs): Simplified substantially.  Removed author diffs.
	(GetSearchLink): Do not url-escape the plus sign used to replace
	spaces.

2003-09-03  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoEdit): Print the rule that matched when somebody is
	banned.
	(UserIsBanned): Bug fix; used $host twice.

2003-09-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoMaintain): Don't change rclog files if not required.
	(PrintFooter): Print username of last author.

2003-08-29  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcHtml): Link to older revisions when using the all
	parameter.
	(GetRCLink): New function.
	(PrintFooter): Add new item, using it.
	(GetRCLink): Add showedit=1.

2003-08-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Extend journal rule to allow reverse parameter.
	(PrintJournal): New parameter to reverse journals.

2003-08-19  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetReferers): Don't quote HTML in href to avoid having
	&amp; in the links.

2003-08-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Fix ISBN rule.

2003-08-16  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($AllNetworkFiles): New variable.
	(GetUrl): Allow file:/// if $AllNetworkFiles is set.
	(ApplyRules): The RSS rule restores pos after calling the RSS sub.
	($UsePathInfo): New variable.
	(ScriptLink): Use it.
	(DoBrowseRequest): Use it.
	(DoBrowseRequest): Make sure to ignore path_info if $UsePathInfo
	is not set.

2003-08-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitLinkPatterns): Simplify $UrlPattern and take more of
	RFC 2396 into account.
	(ApplyRules): ISBN rule now produces a dirty block.  Cleaned up
	many other rules to remove extra setting of $oldmatch.

2003-08-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoBrowseRequest): Remove all the stuff up to and
	including a slash, fixing the problems reported by Roland Gruen.

2003-08-14  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitRequest): @HtmlTags are only initialized within
	this sub in order to read the config files, first.
	(ApplyRules): New rule for empty tags such as <br />.

2003-08-02  Pierre Gaston  <pgas@intracom.gr>

	* wiki.pl (ApplyRules): Pass $block, @blocks, and @flags to
	MyRules so that dynamic rules can be written.
	(DoShowVisitors): Fix typo.

2003-06-30  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RcTextItem): New.
	(GetRcText): Switched to RSS 3.0.

2003-06-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoHistory): Removed $canEdit.
	(GetHistoryLine): Ditto.
	(DoPassword): Removed some newlines.
	(UserCanEdit): Rewrote more compactly.  Thanks, Pierre, for suggesting it.

2003-06-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (UrlEncode): Added more safe characters according to RFC
	2396.
	(DoBrowseRequest): Use join(' ', $q->keywords) to deal with link
	that include encoded spaces (%20) instead of underlines.
	(DoBrowseRequest): Join using '_' instead of the space character.
	(DoEdit): No longer limit the length of the summary.

2003-06-20  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PingTracker): Switched to blo.gs.
	(DoPost): Pass $id along.
	(UserCanEdit): UserIsEditor() overrides $EditAllowed=1.

	* test-markup.pl: Added another set of tests to tests
	$BracketWiki.

2003-06-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetPageOrEditLink): UrlEncode all page ids.
	(GetPageLink, GetEditLink, DoRc, GetOldPageParameters): Ditto.
	(GetSearchLink, ScriptLinkDiff, GetHistoryLink): Ditto.
	(PrintFooter, PrintAllReferers): Ditto.
	(GetPermanentAnchorLink, GetPermanentAnchor): Ditto.
	(UserCanEdit): Take care of $EditAllowed==2.

2003-06-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitRequest): ScriptName defaults to $q->url().
	(ScriptLink): Prefer syntax using path_info().
	(GetHtmlHeader): Removed ref. to path_info.
	(PingWeblogs): Switched to blogrolling.com.
	(DoPost): Rebrowse after pinging.
	(PingWeblogs): Use & instead of ; to separate parameters.
	(DoPingWeblogs): Pass the value of the id parameter or RCName to
	DoPingWeblogs.
	($NotifyWeblogs): Renamed to $NotifyTracker.
	(DoPingWeblogs): Renamed to DoPingTracker.
	(PingWeblogs): Renamed to PingTracker.

2003-06-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRandomLink): Removed.
	(ApplyRules): Include local pages using GetPageContent, if possible.
	(GetRaw): Simplified.
	(DoPost): Append comment it necessary.
	(GetRcRss): To normal to free on page titles.
	(DoPost): Bugfix: Do not rebrowse if $comment is set.
	($NewComment): New.
	(PrintFooter): Use it.
	(OpenNewText): Check whether $CommentsPrefix is set before matching.
	(DoPost): Reorder and rewrite the comment handling code.
	(PrintJournal): Default regexp now requires the name to start with the ISO date.
	(PrintFooter): Add link to original if appropriate.
	(DoPost): Use undefined default $comment to distinguish '' $comment from no $comment.
	(DoBrowseRequest): Accept path_info as well as keywords.
	(PingWeblogs): Use path_info for the URI.

2003-06-15  Pierre Gaston  <pgas@intracom.gr>, Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($CommentsPrefix): New.
	(PrintFooter): Added easy submission code.
	(OpenNewText): Only add if not commenting.
	(DoPost): Extract comments from aftertext parameter.

2003-06-13  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintJournal): Use the subroutine JournalSort if
	defined to sort pages.

	* test-markup.pl: Added Journal tests.

	* test-wrapper.pl: Use the new Init function.

	* test.pl ($UseConfig, $ConfigPage, $AdminPass): Set them.


	* wiki.pl ($CollectingJournal): New variable.
	(DoWikiRequest): Move all the init calls into Init.
	(Init): Moved all the init calls from DoWikiRequest here.
	(ApplyRules): Added journal rule.
	(PrintJournal): New.
	(GetGotoBar): Use GetPageLink.
	(DoPrintAllPages): Use 0 parameter when calling PrintAllPages.
	(PrintAllPages): Take extra parameter to say whether to link to
	the pages or not.
	(PrintJournal): Slice only if too large.
	(%CookieParameters): Get rid of linkrandom.
	(ScriptLinkTitle): Deleted.
	(GetAuthorLink): Include code from ScriptLinkTitle and add
	span.author.
	(GetTextArea): Parameter editwide has no effect anymore.

2003-06-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PingWeblogs): Use the edited page instead of the recent
	changes page for pinging weblogs.com.

2003-06-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitRequest): Convert spaces to underscores for
	$HomePage, $RCName, $BannedHosts, $InterMap, $RefererFilter,
	$StyleSheetPage, and $ConfigPage.
	(InitRequest): Set @UserGotoBarPages here instead of on startup.
	(FreeToNormal): No more ucfirst.
	(InitRequest): Removed test statement.

2003-06-10  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (@UserGotoBarPages): Set to $HomePage and $RcName.
	(GetGotoBar): Just use @UserGotoBarPages as-is.
	(DoEdit): Get rid of $editCols, $editRows, and the editcols and
	editrows parameters.  Call GetTextArea without 'em.
	(GetTextArea): Hardcode the rows and columns.  Don't use the style
	attribute.
	(BrowsePage): The hr before referers is not added here.
	(RefererTrack): Add the hr here.
	(GetGotoBar): Use FreeToNormal on the link.

2003-06-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoWikiRequest): Cannot use $q->p($@) because of some
	bad interaction of $@ with CGI.  The resulting "<p>$ConfigFile:
	$@</p>" seems *very* brittle, so change with care.  It was also
	impossible to concat the result with the result of a call to
	ScriptLink.
	($UseSubpage): Removed.
	($MainPage): Removed; was used for subpages.
	($FreeUpper): Removed.
	(InitRequest): Removed $MainPage.
	(InitLinkPatterns): Removed $UseSubpage.
	(GetPageOrEditLink): Removed $MainPage.
	(GetPageLink): Removed $MainPage.
	(GetEditLink): Removed $MainPage.
	(BrowsePage): Removed $MainPage.
	(GetSearchLink): Removed $MainPage.
	(GetGotoBar): Removed MainPage handling.
	(ValidId): Removed $UseSubpage.
	(GenerateAllPagesList): No longer do subpages.
	(FreeToNormal): Removed $UseSubpage and $FreeUpper.
	(DoEdit): Removed $MainPage.

2003-06-05  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoWikiRequest): $UseConfig does not control
	$ConfigPage.
	(InitLinkPatterns): Moved FS settings into new sub.
	(Init): New.
	(InitRequest): Moved it around in the file.
	(GetParam): Ditto.
	(InitCookie): Ditto.  No longer called from InitRequest but from
	DoWikiRequest directly.
	(GetHtmlHeader): Changed permanent_def to definition and
	permanent_link to link.
	(GetPermanentAnchor): Changed permanent_def to definition.
	(GetPermanentAnchorLink): Changed permanent_link to link.
	($UseConfig): Only set when undefined, so that it can be set to 0
	in the wrapper.
	($AdminPass, $EditPass): Only set when undefined.
	(InitRequest): Only set when undefined.
	(GetRc): Removed pagecount.
	(GetRcHtml): Removed pagecount and link changed name from (n
	changed) to (history).
	(GetRcText): Removed pagecount.

2003-06-04  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($ConfigPage): New.
	(@LockOnCreation): Added it.
	(DoWikiRequest): Use it, set $Message here for potential error.
	(InitRequest): Don't set $Message here.

2003-06-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Fix bug that prevented URL from
	appearing in the body class.
	(@UserGotoBarPages): New.
	(GetGotoBar): Use it.
	(%CookieParameters): Added 'linkrandom'.

2003-06-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($StyleSheetPage): New, default to empty.
	(@LockOnCreation): Added it.
	(%CookieParameters): Added 'theme'.
	(GetHtmlHeader): Use $StyleSheetPage if no $StyleSheet is given.
	(GetHtmlHeader): Use the 'theme' parameter, if given.

2003-05-31  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (%CookieParameters): New.
	(Cookie): Use it to handle the previously inherited attributes.
	(ScriptLink): No more inheriting of parameters.
	(InheritParameter): Removed.
	(InitCookie): Password parameter handling removed.
	(GetHtmlHeader): Added CSS for permanent anchors.
	(%CookieParameters): Use pwd instead of password.

2003-05-30  Pierre Gaston  <pgas@intracom.gr>

	* wiki.pl ($PermanentAnchorsFile, $PermanentAnchors)
	(%PermanentAnchors, %PagePermanentAnchors): New.
	(ApplyRules): New rules for global anchors.
	(GetEditLink): Allow passing of class and name to the link.
	(DoBrowseRequest): New anchor action.
	(DoPost): Delete permanent anchors.
	(DeletePage): Ditto.
	(ReadPermanentAnchors): New.
	(WritePermanentAnchors): New.
	(GetPermanentAnchor): New.
	(GetPermanentAnchorLink): New.
	(DeletePermanentAnchors): New.

2003-05-29  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($RefererFilter): New.
	(@LockOnCreation): Added it.
	(UpdateReferers): Take it into account.

2003-05-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($InterFile): Deleted.
	($InterMap): New.
	(GetSiteUrl): Use it.
	(UserIsBanned): Fixed regexp.
	(GetSiteUrl): Use $InterSitePattern.
	(GetPageContent): New.
	(GetSiteUrl, UserCanEdit): Use it.
	(@LockOnCreation): New, defaults to ($BannedHosts, $InterMap).
	(DoPost, Save): Use it.

2003-05-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($HttpCharset): Default to UTF-8.

2003-05-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($BanListFile): No more banned file.
	($BannedHosts): New variable for the page name.
	(DoBrowseRequest): No more editbanned action and edit_ban parameter.
	(UserIsBanned): Test now opens the $BannedHosts page.
	(DoPost): Added test such that only admins can create the $BannedHosts file.
	(Save): When saving the first revision of the $BannedHosts file, lock it.
	(DoEditBanned): Deleted.
	(DoUpdateBanned): Deleted.

	(ScriptLink): No more quoting of the action, this happens
	automatically.

2003-05-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (PrintAllReferers): New function.
	(DoPrintAllReferers): New function.
	(DoBrowseRequest): New refer action.
	(GetReferers): Fixed spelling of Referer to Referrer.

	Lots of tiny changes -- moved from the &foo() notation to foo().
	Saved some lines by changing some if conditions around.
	This patch is very big!

	Unified all lock requests and releases:
	(RequestDiffLock, ReleaseDiffLock, RequestVisitorsLock)
	(ReleaseVisitorsLock, RequestMergeLock, RequestMergeLock)
	(ReleaseMergeLock, ReleaseRefererLock, RequestIndexLock)
	(ReleaseIndexLock): Removed, changed callers.

2003-05-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcHtml, GetRcText): Cleanup, saving some lines.

2003-05-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($ReplaceForm): New global variable.
	(InitRequest): Set $ReplaceForm to 0.
	(GetSearchForm): Add a replace item if $ReplaceForm is set.
	(DoSearch): Call Replace when replacement is given.
	(Replace): New function.
	(DoPost): Removed $isEdit and $editTime.  Use $Now instead.  Moved
	the saving code into Save.
	(Save): New function.

	(WriteRcLog): Use $Now instead of $editTime.
	(ReBrowsePage): Rename $isEdit to $minor.
	(GetRc, GetRcHtml, GetRcRss, GetRcText, GetRedirectPage): Ditto.
	(DoEdit, WriteRcLog, UpdateDiffs): Ditto.

2003-05-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($NotifyWeblogs): Add new variable, defaulting to 0.
	(DoBrowseRequest): Added new ping action.
	(DoPost): Call PingWeblogs for major edits if $NotifyWeblogs is set.
	(PingWeblogs): New.
	(DoPingWeblogs): New.

	(RFC): Include the RFCLink code.
	(RFCLink): Removed.
	(ISBN): Include the ISBNLink code.
	(ISBNLink): Removed.

2003-05-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitCookie): Get hash from cookie by splitting the
	string on $FS1.
	(Cookie): Use $FS1 to encode the value.
	(PrintFooter): Call PrintMyContent with $id as the parameter.

2003-05-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): Add a class to the body; the value of
	the class is the URL of the script -- this way it can be
	distinguished from all other sites in a user style sheet.

2003-05-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($NewText): Default value in the init section instead of
	hidden in some subroutine.
	(OpenNewText): Just use $NewText.
	(DoPost): If oldrev is 1 and the new text is $NewText, then do not
	save.
	(BrowsePage): Use a flag for PrintWikiToHTML in order to prevent
	the creation of new pages due to cache creation for the default
	text.
	(Cookie): Only set attributes if necessary.  Report setting of
	cookie via $Message.
	($SimpleLinks, $NonEnglish): Removed.
	(InitLinkPatterns): Simplified the regexp generating code such
	that the regexps used are clearer now,
	(DoUnlock): Added extra level of parenthesis, thanks to Jason
	Diamond <jason@injektilo.org>

2003-05-17  Pierre Gaston  <pgas@intracom.gr>

	* wiki.pl: Many subroutines: Replaced print &GetFooter(...) with
	&PrintFooter(...).
	(GetFooter, PrintFooter): Renamed GetFooter to PrintFooter, and
	changed concatenations to prints.

2003-05-08  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (BrowsePage): Remove duplicate div class="refer".

2003-05-02  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($Debug, $Message): Renamed $Debug to $Message.
	(InitRequest): Ditto.
	(InitCookie): Ditto.
	(BrowsePage): Print header later, set $Message for the messages
	"Revision %s not available" and "Showing revision %s".
	(BrowsePage): Added new div class="rc" for recent changes output.
	(GetHeader): Changed header layout.  Logo and GotoBar are now at
	the top, followed by messages, page title, and content.  Added div
	and special days.
	(GetGotoBar): Removed special days from the goto bar.
	(GetFooterText, GetCommonFooter, GetMinimumFooter): Replaced by GetFooter.
	(GetFooter): New, unified, added div.
	(DoHistory): Use GetFooter with history parameter.
	(DoUnlock): Use GetFooter.
	(DoEdit): Use GetFooter with edit parameter.
	(DoPassword, DoEdit, UserIsEditorOrError, UserIsAdminOrError)
	(DoSearch, DoLinks, DoPrintAllPages, DoMaintain, DoMaintain)
	(DoIndex, DoConvert, DoEditLock, DoPageLock, DoEditBanned)
	(DoUpdateBanned, DoShowVersion, DoShowVisitors): Use GetFooter.
	(BrowsePage): Print div class=refer only when there are any.

2003-04-27  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (BrowsePage): Added a div class="content" around the
	main part.
	(RSS): Removed unnecessary CSS class for link within RSS divs.
	(BrowsePage): Do not attempt to open keep file when the requested
	revision is the current revision.  Use div class="message" for
	the little message about the revision being displayed.
	(InheritParameter): New function.
	(GetEditLink): Use it.
	($TopLinkBar): New option.
	(GetHeader): Use it.
	($Monolithic): New variable.
	(ScriptLink): Use it.
	(DoBrowseRequest): New action 'all'.
	(DoUnlock): Rewrote using a loop.
	(GetFullLinkList): Rewrote variable declarations a bit.
	(ReleaseRefererLock, RequestRefererLock): Avoid declaring a variable for just one call.
	(DoPrintAllPages): New function.
	(PrintAllPages): New function.

2003-04-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($FS0used): Deleted.
	(DoBrowseRequest): Added convert action.
	(GetKeepFile): Convenience function added.
	(KeepFileName): Use it.
	(ReadFile): Removed on-the-fly separator conversion.
	(DoMaintain): Removed separator conversion of pages, no conversion
	of rc entries, no conversion of $RcOldFile.
	(DoConvert): New function.
	(ConvertFile): New functtion.
	(ReadRecentVisitors): Replaced newline and colon with field separators.
	(WriteRecentVisitors): Ditto.
	(GetReferers): Ditto.
	(DoConvert): Typo.
	(DoConvert): Typo.
	(ConvertFile): Typo.
	(DoConvert): Moved br printing.
	(ConvertFile): Moved it here.

	This undoes all the on-the-fly conversion code, since that was
	hard to maintain, and had a bug: Keep files of pages that had no
	expiry pending did not get converted.

2003-04-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcRss): No longer treat '*' special.
	(GetRcText): No longer treat '*' special.
	(GetHistoryLine): No longer treat '*' special.
	(Cookie): No longer treat '*' special.
	(InitCookie): No longer treat '*' special.
	(GetRcHtml): No longer treat '*' special.

	* test-texi.pl: New file.

	* texi.pl: New file.

	* wiki.pl ($FreeUpper): Defaults to 0.

2003-04-23  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitRequest): Set the query object charset as suggested
	by Wei Ching Tang.
	(GetHistoryLine): Do not anonymize IPs.

2003-04-18  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Changed table rules.

2003-04-17  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (InitLinkPatterns): Not only \xc0-\xff are non-english
	letters:  With UTF-8, \x80-\xff are.
	(InitLinkPatterns): Fixed @ in UrlPattern.
	(ApplyRules): Improved handling of space-only lines.
	(ApplyRules): Convert \r\n to \n before anything else.

2003-04-16  Alex Schroeder  <alex@gnu.org>

	* test-markup.pl: More Interlink tests.

	* wiki.pl (InitLinkPatterns): Changed InterLinkPattern.

	* test-markup.pl: Added page-level tests.

	* wiki.pl (GetPageLinks): No longer call StripUrlPunct.
	(StripUrlPunct): Removed.
	(SplitUrlPunct): Removed.
	(GetUrl): No longer call SplitUrlPunct, no longer return a list.
	(PrintLinkList): GetUrl no longer returns a list.
	(GetInterLink): No longer call SplitUrlPunct.
	(ApplyRules): GetUrl no longer returns a list.
	(InitLinkPatterns): Changed $UrlPattern.
	(InitRequest): Reset $Debug on every invocation (for mod_perl!).
	(InitCookie): Move password into the cookie, too, so that you can
	set the password even when you are banned and banned cannot read.
	(GetHeader): Add message at the top of the file when $Debug is set.
	(DoPassword): Get rid of the default '*' password.
	(RSS): Charsets are case-insensitive.

2003-04-15  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): Fixed handling of the last cell per row in
	tables.

2003-04-14  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (ApplyRules): If something looked like an Interlink but
	was not, and the text contained more than one colon, backtracking
	got confused.  This bus is fixed.
	(GetInterLink): Do not reuse $id, removed bogus if condition that
	was always true.
	(GetUrl): Do not reuse $url.

2003-04-12  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($HttpCharset): Default is 'ISO-8859-1' instead of empty.
	(ApplyRules): Include and rss pseudo tags don't eat all following whitespace.
	(RSS): Error message is on a paragraph of its own.

2003-04-11  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetRcText): Added space by Pierre Gaston <pgas@intracom.gr>.
	(GetCommonFooter): Shortcut when embedded by Pierre Gaston <pgas@intracom.gr>.

2003-04-07  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetUrl): Unquote url, because the entire page text has
	already been quoted.

2003-04-06  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (RSS): Added new div for RSS inclusion.
	(GetHtmlHeader): Added div.rss to the default stylesheet.

2003-04-01  Alex Schroeder  <alex@gnu.org>

	* wiki.pl ($RefererDir, $RefererTracking, $RefererTimeLimit)
	($RefererLimit, %Referers): New variables.
	(ApplyRules): Use GetRaw instead of IncludeRaw
	(GetRaw): Renamed from IncludeRaw and without HTML quoting.
	(BrowsePage): Use more methods from the CGI module, call
	RefererTrack if appropriate.
	(DoRc): Use more methods from the CGI module.
	(GetHtmlHeader): Added new div.
	(ForceReleaseLock): Do globbing.
	(RequestRefererLock): New function, creates locks per-page.
	(ReleaseRefererLock): New function.
	(DoUnlock): Requires globbing for refer locks.
	(GetRefererFile): New.
	(ReadReferers): New.
	(GetReferers): New.
	(UpdateReferers): New.
	(RefererTrack): New.
	(GetReferers): Quote HTML.
	(GetInterLink): If no page follows the colon, this is no interlink.
	(InitLinkPatterns): The InterLinkPattern may not contain an apostrophe (').

2003-03-28  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoMaintain): Important bugfix!
	(InitLinkPatterns): Only set $FS and $FS0 if $FS is not set already.
	(ReadFile): Check wether $FS0 is set before doing anything.
	(DoMaintain): Ditto.
	(UrlEncode): New function.
	(GetValidatorLink): Use it.

	Tricky update!  Changing the field separator from superscript 3 to
	an ASCII control character!

	* wiki.pl (FS0, FS0used): New field separator for the old one, and
	a new variable to tell us if the old separator has been used.
	(InitLinkPatterns): The old separator, FS0, is set to \xb3 (the
	well-known superscript 3), and the new separator, FS, is set to
	\x1e, the ASCII control character RS, aka. RECORD SEPARATOR.
	(ReadFile): Convert data read from files from FS0 to FS if
	necessary when loading.
	(DoMaintain): More translating, some HTML changes.  Using the new
	field separator will not work for keep files, since new changes
	are just appended to the file.  The keep files must be updated,
	therefore.  This happens during maintenance, so make sure
	maintenance really gets run!  This also updates the recent changes
	log files (both old and current).

	(GetValidatorLink): Use $q->self_url for the validator link.

2003-03-26  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DoHistory): Removed extra <tr>.

2003-03-25  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetHtmlHeader): New classes.
	(PrintSearchResults): Removed output variable, print as we search
	instead of only when searching is done, use CGI functions for HTML
	tags, translation.
	(PrintPageList): Use CGI functions for HTML tags.
	(DoEdit): Added new div with class preview for the preview part.

2003-03-24  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetCommonFooter): Use CGI functions for HTML tags.
	(DoEdit): Ditto.
	(DoEdit): Ditto, plus moved preview out of the form for CSS.
	(DoPageLock): Ditto.
	(DoPageLock): Ditto.
	(DoEditBanned): Ditto, and added translations.
	(DoUpdateBanned): Ditto, and added translations.
	(DoShowVersion): Translation.
	(DoShow): Translation.

2003-03-22  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (GetValidatorLink): Link to CSS Validator.
	(GetHtmlHeader): Added CSS foreground color to div tags where only
	a background was defined, and added body and a links.
	(UseSubpage): Default to 0 because GNU/Linux would always be a
	link.
	(BrowsePage): Pass $id along to OpenDefaultText.
	(OpenDefaultText): If $id is the homepage, and the revision is 0,
	attempt to display the README file instead.
	(BrowsePage): Only use cache when revision not set.
	(PrintWikiToHTML): Only save cachen when revision not set.

2003-03-21  Alex Schroeder  <alex@gnu.org>

	* wiki.pl (DataDir): Default value is the temp directory, unless
	already set.
	(ConfigFile): Don't set it, if it already has a value.
	(GetValidatorLink): New subroutine.
	(GetFooterText): Use it.
	(ValidatorLink): New option.
	(InitRequest): Use $q->script_name() instead of
	"$ENV{SCRIPT_NAME}".
	(ScriptLink): Quote HTML for actions.
	(GetMinimumFooter): Move validator link from GetFooterText to
	GetMinimumFooter.

	* wiki.pl (ScriptLink): Inherit embed and toplinkbar parameters to
	local links.
	(ISBNLink): Make URLs to shops translatable.
	(GetGotoBar): Add search button.

