Parent Directory | Revision Log
Links to HEAD: | (view) (download) (annotate) |
Sticky Tag: |
(PrintAllPages): Skip redirected pages.
(ApplyRules): Fix regexp bug reported by Mark Zimmermann and Ingo Belka.
(PrintAllPages): Fix a small bug when counting the pages looked at, following an observation by Ingo Belka
Get rid of @CssList. Remove css action. (DoAdminPage): Remove Install CSS menu. (DoCss): Deleted.
(PrintAllPages): Fix double quoting of page title.
(PrintAllPages): If the number of pages to print is not provided, do not test.
(PrintJournal, PrintAllPages): Journal pages no longer print deleted pages. (DoMaintain): PageDeletable doesn't require a parameter. (PageDeletable): Split into two. (PageMarkedForDeletion): New, used by PrintAllPages.
* wiki.pl (GetRcRss): Link to $HomePage explicitly instead of just linking to $ScriptName.
(TextIsFile): Fix regular expression.
(TextIsFile): Extract encoding from the file. (DoDownload): Take encoding and pass it on. (GetHttpHeader): Accept encoding parameter and add HTTP header. (DoPost): Save gzip encoding if the file content starts with the magic bytes.
(GetScriptUrlWithRcParameters): Handle parameter values of 0 and ''.
*** empty log message ***
(GetScriptUrlWithRcParameters): New. (GetRcRss): Add atom self link using GetScriptUrlWithRcParameters.
Fix atom self link.
Fix atom self link.
(GetRcRss): Add Dublin Core (dc) and Atom (atom) namespace. Switch cc prefix to http://web.resource.org/cc/. Switch channel link from RecentChanges to the HomePage. Fix image title and link to match the channel title and link. Add atom self link. (RssItem): Repace wiki:username with dc:contributor. Use link for guid element.
*** empty log message ***
(GetPageOrEditLink): Fix ampersand problem for $UseQuestionmark = 0.
whitespace
* wiki.pl (InitLinkPatterns): $FreeLinkPattern now inlcudes %&?;<>. (LinkRules, UnquoteHtml, GetPageOrEditLink, GetDownloadLink) (GetId, BrowsePage, PrintRcHtml, RssItem, DoHistory) (DoContributors, GetHeader, GetHtmlHeader, GetFeeds) (FreeToNormal, NormalToFree, DoEdit): Implement the various changes required to allow the extra characters. This includes issues of HTML quoting and unquoting, and the dangers of double encoding. Unfortunately, it's a big mess.
(GetSummary): Fix remaining closing square bracket.
(RequestLockDir): Don't enter an infinite loop of trying requesting a lock and trying to unlock. Unlocking can fail if the permissions are wrong, for example (user running the script changed, for example).
Delete section comments. I never used them anyway.
(StripRollbacks): Strip remaining chunk of the log if we found an unfinished [[rollback]] section.
(DoRollback): Prevent rollback from restoring banned content.
PATH now contains both /bin and /usr/bin.
(DoPost): Make sure empty comments and comments that are equal to $NewComment are not saved.
(LatestChanges): Fix bug introduced due to bogus test data in rc-pagination.t
*** empty log message ***
(LatestChanges, RcHtml, RcHeader): Change to parameter to upto parameter because there was a conflict with the to parameter used by the rollback action.
(LatestChanges): Handle "to" parameter. (RcHeader): Report use of "to" parameter (RcHtml): Add More... link. (DebugInterLinks): Moved to debug.pl.
(SearchRegexp, SearchString): Remove the test for invalid regular expressions. (DoSearch): Report invalid regular expressions as an error.
(SearchRegexp): Keep the test for invalid regular expressions but do not return it as a result because the value cannot be passed to grep.
(SearchString, SearchRegexp): Handle invalid regular expressions by compiling the regular expression, and if that fails, use quotemeta on it and use that instead.
(DoPost): Apparently we cannot count on <$file> to always work within the eval, so we use a local variable. (Showed up on a site.)
(GetRcLines): Fix bug that prevented the oldrc.log file from being read if rc.log was missing or empty.
(SearchTitleAndBody): Unquote the search string.
(GetFeeds): Fix link to follow-up RSS feed.
(ApplyRules): No longer localize $OpenPageName and %Page for the <search regexp> rule. (PrintJournal): No longer localize $OpenPageName and %Page before calling PrintAllPages(). (PrintAllPages, SearchTitleAndBody): Instead, localize them here. This will prevent bugs when the OpenPage is called from other locations.
(TouchIndexFile): New sub. (Save): Use it.
(GetCommentForm): Default to ten lines for comments (bugfix).
(GetCommentForm): Default to ten lines for comments.
(GetCommentForm): Added a span around each input field below the textarea. (DoMaintain): Do not a newline if the rc.log file contains no more entries (by default this only happens if the wiki has not been edited in 90 days).
(DoHistory): Handle date changes here in order to avoid declaring a variable and having to pass it by reference to GetHistoryLine. (GetHistoryLine): Simplified. Also, don't set a revision if comparing an older revision with the current one.
(ApplyRules): Make sure we store $_ whenever we store pos because of recursive calls to ApplyRules.
(GrepFiltered): Short circuit if we end up with an empty regular expression. This can happen when using tags.pl and only specifying -tag:foo.
(GrepFiltered): Sort output because grep -r doesn't produce sorted output.
(GrepFiltered): Rewrite to use grep -r instead of -R. I'm not sure which one is more widely accepted.
(GrepFiltered): Rewrite to use grep -R instead of find. (DoShowVersion): Undo last change.
(GrepFiltered): Use find and grep because on larger wikis the command line is too large. (DoShowVersion): Print find version as well.
Whitespace.
*** empty log message ***
*** empty log message ***
(GetId): Do not return $HomePage if no id has been specified. (DoBrowseRequest): Don't report an invalid URL if no id has been specified. Just browse the HomePage instead.
(GetId): Fix it by no longer short-circuiting to return HomePage.
(GetId): Use keywords when determining the default page for the wiki, since recent versions will set parameters.
(InitCookie): We need to fall back on %OldCookie if no explicit parameter was provided.
(GetParam): We need to fall back on %OldCookie if no explicit parameter was provided.
(DoShowVersion): Print version info for grep.
(GrepFiltered): Make sure matches in page content do not duplicate matches in page names.
($NewCookie): Deleted. (InitCookie, CookieUsernameFix, CookieRollbackFix, GetParam) (SetParam): Get rid of $NewCookie. (CookieUsernameFix): Make sure that with $FreeLinks and $WikiLinks unset, single words are still allowed.
(GrepFiltered): Return pagename matches, then page content matches.
(DoSearch, ApplyRules): Replace HighlightRegex with SearchRegexp. (GrepFiltered): Use SearchRegexp, too. And search AllPagesList. (HighlightRegex): Deleted. (SearchRegexp): New.
Whitespace.
Whitespace.
Whitespace changes
(GetParam): Get result from NewCookie before getting it from $q->param -- this will make SetParam have the intended effect. (DoBrowseRequest): Fake a search action before calling DoSearch; since the action is now explicitly not browse, GetRobots will produce a NOFOLLOW header.
(DelayRequired): Fix an off-by one error.
(GetEditForm): Remove extra closing div. (@MyBeforeApplyRules, @MyAfterApplyRules): Removed. (ApplyRules): Removed call of code on @MyBeforeApplyRules. (PrintWikiToHTML): Removed call of code on @MyAfterApplyRules.
(GetEditForm): Remove extra closing div.
(GrepFiltered): Ignore grep error messages (which happen on an empty wiki, for example).
* wiki.pl (PrintWikiToHTML): Moved "@MyBeforeApplyRules"-specific code into the ApplyRules() routine. This corrects a number of subtle issues with the Crossbar module: especially, the Crossbar module's erroneous handling of uploaded files. (Thanks, Ingo Belka!) * modules/crossbar.pl (CrossbarBeforeApplyRule): Corrected this module's erroneous handling of uploaded files. (RunMyRulesTocCrossbar): New function, offloading a Crossbar- specific hack from "toc.pl" into this file. (This is still... slightly hacky, but a bit better.) * modules/toc.pl (TocRule): Allowed more than one table of contents per page. Before, this module only recognized the first "<toc...>" markup for a Wiki page: all subsequent "<toc...>" markup for that page was studiously ignored. Correcting this improves integration with the Crossbar module. (RunMyRulesToc): Removed a Crossbar-specific hack. (TocAfterApplyRule): Allowed more than one table of contents. ($TocIsApplyingAutomaticRules): New option, providing slightly finer-grained control over Table of Contents handling.
* wiki.pl: Slightly altered the CVS-enabled version notice.
* modules/wiki.pl: Added a CVS-enabled version notice to this file's header comments This should make it easier for Oddmuse users to ascertain which Oddmuse version they're using.
(DoShowVersion): Print grep --version.
* wiki.pl (GetEditForm): Added the 'upload' class attribute to upload links produced by this function, for CSS stylization. (BrowsePage): Calls the new "PrintPageContent" function. (PrintPageContent): New function, whose implementation has been extracted from the "BrowsePage" function. This permits external modules -- like the new Crossbar module -- to override this function and thereby print page content in a module-specific manner.
* wiki.pl (SetHtmlEnvironmentContainer): Corrected a slight, but significant, typo. * modules/sidebar.pl: Reverted. I underestimated the scope of changes needed to bring this module in line with recent, other changes to the Table of Contents module. The good news is that the reverted Sidebar module now works as expected for all modules except the Table of Contents module; of course, the bad news is that the reverted Sidebar module no longer works for the Table of Contents module. (Unfortunately, we can't have both, here.) I will be recommitting my changes to this module as a new module, therefore, named "modules/crossbar.pl" -- sometime, soon. That new module will (probably) break backwards compatibility with this module, but will otherwise behave as expected... with all modules. * t/sidebar.t: Prevented testing against the Table of Contents module, as the Sidebar module is now known not to work with that module.
* wiki.pl (PrintWikiToHTML): Slightly reordered function calls, so as to optimize a few edge cases.
* wiki.pl (RegisterBlockLevelElement): Renamed to SetHtmlEnvironmentContainer (and changed in every other module, where called).
* wiki.pl (AddHtmlEnvironment): Corrected a minor regression. Probably not a genuine issue... but one can never tell. * modules/creole.pl (CloseHtmlEnvironmentsCreole): Removed. * modules/creoleaddition.pl (CloseHtmlEnvironmentsCreoleAddition): Removed. * modules/poetry.pl (CloseHtmlEnvironmentsPoetry): Removed.
* wiki.pl (@MyAfterApplyRules): New global list. This is a list of subroutine references, much like @MyRules. Unlike @MyRules, whose subroutines are called by ApplyRules() while iterating through wiki page markup, @MyAfterApplyRules subroutines are called by PrintWikiToHTML(), iteratively, after all calls to ApplyRules(). This may not sound like much -- certainly, no deep invention. Actually, however, it permits post-processing of all emitted HTML. This, in turn, allows us to reimplement the Table of Contents module ("toc.pl"), so as to remove the hacks upon which that module formerly depended. This is a good thing. Perhaps, even a great thing! As Alex can attest, "toc.pl" (and its retinue of oddball hacks) has given Oddmuse some dire trouble, over time. That's all past now...thanks be to the Nordic Gods. (@MyBeforeApplyRules): New global list. This is a list of subroutine references, much like @MyRules. Like @MyAfterApplyRules, above, @MyBeforeApplyRules subroutines are not called by ApplyRules() while iterating through wiki page markup but rather by PrintWikiToHTML(), iteratively, before all calls to ApplyRules(). This, also, may not sound like much. However, it permits pre- processing of all emitted HTML. This, in turn, allows us to reimplement the Sidebar module ("sidebar.pl"), so as to remove the hacks upon which that module formerly depended. (Praise be to Odin.) (%BlockLevelElements): New global hash. This hash should not be assigned to directly, but through the new RegisterBlockLevelElement() function. Its keys are HTML tags: 'table', 'blockquote', 'div', and so. Its values are regular expressions matching HTML tag attributes: 'class="poem"', 'align="right"', and so on. That's the structure. Here's how it works: this hash has one key for each HTML tag to be considered a "block-level element." Block-level elements are not closed when closing HTML environments with CloseHtmlEnvironments(). Instead, they must be explicitly closed with, say, CloseHtmlEnvironment('table'). CloseHtmlEnvironments() now closes all environments up to but not including those whose HTML tag matches a key in %BlockLevelElements and whose HTML tag attributes match a value in %BlockLevelElements. Thus, if Oddmuse is currently in a "<table>...</table>" environment, calling CloseHtmlEnvironments() now closes all environments up to but not including the table. This is a good thing. This allows modules to define block-level markup that can, itself, contain block-level markup -- say, markup for a "<blockquotes>...</blockquotes>" environment containing markup for a "<pre class='poem'>...</pre>" environment containing markup for a "<ol>...</ol>" environment. Prior to the introduction of this hash, block-level markup could not contain other block-level markup -- since most modules "open" a new HTML environment for such markup by first calling CloseHtmlEnvironments(), which, of course, closes the HTML environments of all "parent" block-level markup of this markup. Slightly mind-bending, isn't it? (RegisterBlockLevelElement): New function. (I'm not entirely happy with the verb 'register', here, but could think of nothing better.) (CloseHtmlEnvironments): Use the %BlockLevelElements hash to ensure block-level element HTML environments are not closed. (Of course, this is an amortized constant-time lookup. No efficiency concern, here!) (PrintWikiToHTML): Use the @MyBeforeApplyRules and @MyAfterApplyRules lists, to perform HTML pre- and post-processing.
* wiki.pl (@HtmlAttrStack): New global variable. This permits the InElement() and [Add|Close]HtmlEnvironment() family of functions to add, remove, and search against HTML tag attributes for all recently stacked HTML tag environments. Previously, tag attributes were not retained; they were simply returned as text from the AddHtmlEnvironment() function. Markup modules producing complex HTML -- particularly, complex HTML having deeply nested span or div tags -- can leverage the newly rewritten functions, below, to simplify, streamline, and "clean up" their markup code. (InElement): Rewritten to use this new variable. (AddHtmlEnvironment): Rewritten to use this new variable. (CloseHtmlEnvironment): Rewritten to use this new variable. (CloseHtmlEnvironments): Rewritten to use this new variable. (CloseHtmlEnvironmentUntil): Rewritten to use this new variable. (AddOrCloseHtmlEnvironment): New function. Added so as to avoid duplicate redefinition in the Creole, Creole Addition, and Usemod modules. * modules/usemod.pl (UsemodRule): Corrected erroneous usage of the InElement() function. (I don't think UsemodRule() was ever quite right, really; it's a bit surprising it worked this long!)
* modules/wiki.pl (OpenHtmlEnvironment): Generalized list closure by delegating that closure to the "CloseHtmlEnvironments" function. This permits other extensions (namely, the Creole Markup extension) to redefine the "CloseHtmlEnvironments" function and thereby precisely override just when and how list markup is closed. * modules/creole.pl ($CreoleDashStyleUnorderedLists): New option. (RunMyRules): New function. (CreoleRule): Improved conformance to the Wiki Creole standard by strictly requiring, among other notable things, that horizontal rules consist of four and only four dashes, that all image links to images on the Wiki (e.g., image "FreeLinks") be marked as dirty blocks, that the nowiki markup strictly require the opening and closing three braces to reside on their own lines having no other markup, and that preformatted code not extend over multiple blocks. (CreoleListAndNewLineRule): Avoid handling dash-style unordered list markup unless explicitly requested by the new "$CreoleDashStyleUnorderedLists" option being set to 1 (since that markup is non-standard, and explicitly contradicts the Wiki Creole standard). * t/creole.t: Adjusted tests broken by the above modifications; these were, typically, tests for nowiki and preformatted markup that assumed a less conformant, gentler handling of that markup.
Apply patch from 1.874 to 1.876 minus the whitespace changes to revision 1.874.
* wiki.pl (ApplyRules): Ensure the regular expression match position returns the length of the matched string on finishing application of all rules. ("creole.pl" and "creoleaddition.pl" now depend on this; it notifies them that rules are now finished.) * modules/creoleaddition.pl (CreoleAdditionRule): Injected a sanity check, to ensure closure of blockquotes at the end of a page. * modules/creole.pl ($CreoleTableCellsAllowBlockLevelElements): New option. * modules/creole.pl (CreoleRule): The last, one hopes, of all Creole table markup modifications (for the moment). The rather complex table markup code has been modified so as to use the new option, has been refactored for robustness and strict conformance to the Wiki Creole standard, and has been well-documented. * modules/creole.pl (CreoleGetTableHtmlAttributes): Deleted function.
* modules/creole.pl (CreoleRuleRecursive): New function. Permits embedding of Wiki Creole syntax within Wiki Creole syntax. (Yes... This is confusing?) * modules/creole.pl (CreoleRule): Used the new function. Specifically, you can now embed Creole and CreoleAddition syntax (such as bold, italics, small caps, and so on) within URL and Wiki link text, ala "[[Some_Page|Wow! **Quite** an //%%interesting page%%// page, here]]." * modules/creoleaddition.pl (CreoleAdditionRule): Renamed function from "CreoleAdditionRules" to this.
(GrepFiltered): Handle some grep issues.
($UseGrep): New option. Set by default. (SearchTitleAndBody): Use GrepFiltered. (GrepFiltered): New code to filter AllPagesList using grep if $UseGrep is set. (ReadFile): Slight rearranging of the lines.
Whitespace
Whitespace.
Whitespace.
Whitespace.
(GetRcRss): Since this sub no longer takes RC lines as parameters, there's no point in passing @_ to ProcessRcLines.
($RssStrip): New option. (ItemName): Strip the default date from the item title. (BrowsePage): Replace call to PrintRc with PrintRcHtml. (BrowseRc): Replace call to PrintRc with PrintRcHtml. Use PrintRcText instead of DoRcText. (PrintRc, DoRcText, DoRc, GetRc, GetRcHtml, GetRcText): Deleted. (GetRcLines): Moved. (LatestChanges, RcHtml, PrintRcHtml, PrintRcText): New. (StripRollbacks): Change to new format returned by GetRcLines. (GetRcLinesFor): Factored out the per-file code of GetRcLines. (ProcessRcLines): Calls the per day and per item code fragments. (RcHeader): Return HTML instead of printing it. (GetRcHtml, GetRcRss): Call ProcessRcLines instead of GetRc. (DoRss): Call GetRcRss instead of DoRc and passing GetRcRss. (DoContributors): Set parameters instead of relying on the default behaviour of GetRcLines.
(BrowsePage): Nested the preview div within the content div, per Oddmuse norms.
(ItemName): New. Strips dates from page titles. (RssItem): Use it.
(InitLinkPatterns): Change $FreeLinkPattern so that pages starting with "0" are still allowed.
Move the RunMyMacros code from BrowsePage back to DoPost so that all things that change the submitted text are concentrated there.
(RunMyMacros): New. (BrowsePage): Call RunMyMacros on the result of AddComment. (DoPost): Call RunMyMacros on the concatenated page body + comment. (AddComment): Call RunMyMacros on the comments, too.
(DoPost): Run macros after concatenating page and comments.
(GetSummary): Two more convenience replacements.
(GetHtmlHeader): Fix typo in HTML header.
(GetHtmlHeader): Add universal edit button.
Also moved copyright notice and licence info back to the front of the file and removed the standard POD info at the back of the file.
($DocumentHeader): New option. (GetHtmlHeader): Use $DocumentHeader and GetFeeds. (InitVariables): No longer set $HtmlHeaders to GetFeeds.
Typo
(PrintJournal): Add p element around the More... link.
Fix typo.
(PrintJournal): Remove content class from div. (DoJournal): Add div with content class.
(PrintJournal): Add content class to div.
(LinkRules): Fix typo.
(LinkRules): Support [[url text]], [[url|text]], and [url|text].
Revert change to default $DataDir.
*** empty log message ***
Collected all POD documentation in the back. Shortened considerably.
Some whitespace changes.
(ScriptLink): Moved the URL modifying code into a separate sub. (ScriptUrl): New. (GetRcRss, RssItem): No longer provide a quoted $ScriptName. Use ScriptUrl instead of manually concatenating the quoted $ScriptName with code testing $UsePathInfo. This is now handled by ScriptUrl.
($VERSION): New expression based on CVS keyword splitting and many changes involving perldoc and the options at the beginning of the file.
(InitLinkPatterns): $FreeLinkPattern no longer allows linking to the page named "0" (zero).
Delete trailing whitespace.
As a first step toward CPAN-compatibility, o perldoc is added to wiki.pl o To aid automatic tools including Makefile.PL o $VERSION='...' is added o quotes in regexs are escaped Current installations should see no behavioral differences from this checkin. Those who wish can read the perldoc. The documentation indicates the plans for CPAN/rpm distribution o package oddmuse => package OddMuse::Wiki o FHS-2.3 default pathnames o /var/opt/oddmuse/..., (/tmp is required to be safely removable) o /etc/opt/oddmuse/... o /opt/oddmuse/wiki/..., At this time configuration by variables is not known to be CPAN or rpm compatible. Future conventional configuration by environment, and PATH, will be added and may alter the default directories. At this time the version must be set in two places $VERSION='...' and q{$Id ... In the future, the latter will be set automatically by Makefile.PL from the former.
(PrintHtmlDiff): Handle cache=0 as noted by Markus Lude.
(PrintFooter): Print newline at the very end.
(DebugInterLinks): Only print header if InterSite contains anything.
(UnWiki): New function to split WikiWords. (GetHeader): Use UnWiki for the page page title.
(UserCanEdit): %LockOnCreation only affects permissions when the page is new. Once it exists, the lock file determines permissions.
(GetFooterLinks, GetCommentForm): Use the parameter $id instead of the global $OpenPageName.
(GetFeeds): Removed link using match and kept just rcidonly.
(GetHtmlHeader): Add charset http-equiv meta tag.
(GetHtmlHeader): Bugfixing.
(GetHtmlHeader, GetRobots, GetFeeds, InitVariables): Moved meta element generation from into GetRobots and GetFeeds. Set $HtmlHeaders via GetFeeds in InitVariables so that users can append to the default value.
(GetInterLink): Enclose the ":" in a separate span.
(GetRcHtml): Wrap the entire list in a form block so that the rollback buttons actually have an effect.
(GetRcLines, StripRollbacks): Move the rollback stripping into a separate sub.
(GetHtmlHeader): Add xmlns="http://www.w3.org/1999/xhtml" to the html element.
(DoHistory): Add compare button to the top of the list.
*** empty log message ***
(LinkRules): Unquote alt text.
(InitCookie, CookieUsernameFix, CookieRollbackFix): Move username testing from InitCookie to a new sub and add rollback testing. The reason is that for submit buttons, all the info is encoded in the name attribute; the value is used for the label. (GetRcHtml, GetHistoryLine): Use a submit button instead of a link for rollbacks.
(GetPageLink): Removed page name to tests for local links again.
(GetPageLink): Add the pagename to the link class.
(DoRollback): Fix call to WriteRcLog in order to leave the target_id marker in the correct spot.
(GetRcLines): Handle rollback hiding for single page rollbacks. (DoRollback): Leave marker for single page rollbacks. (RcTextRevision): Encode id for the current revision.
($NewText): Changed default to "This page is empty.\n"
(BrowsePage): Use $NewText if looking at a page that does not yet exist. (OpenPage): When opening a nonexisting page, don't store $NewText as the default text.
(ScriptLink): Get rid of the last parameter to generate nofollow links explicitly. Instead, generate nofollow links whenever an action is invoked. Thus, only ordinary links should be followed. (RcHeader): No longer generate nofollow links explicitly. Instead, rely on the new code in ScriptLink. (GetHtmlHeader): Simplify the generation of the robots meta tag. Use INDEX,FOLLOW for the browse action without any revisions and NOINDEX,FOLLOW for everything else.
(RssItem): Don't append the summary to the title if showing full page content.
(DoAdminPage): Sort AdminPages when printing the list. (%NearSite, %NearSource, %NearLinksUsed, $NearDir) ($NearMap, %NearSearch, $SisterSiteLogoUrl): Deleted. (@IndexOptions): Removed near pages from the default value. (%Action, @Debugging, DoDebug, DebugInterLinks, DoShowVersion): Added debug action and moved interling debugging from the version action to the debugging action. Simplified DoShowVersion by showing dependencies always. (NearInit, ReInit): Deleted NearInit; no longer call it from ReInit. (ResolveId): No longer resolve near links. (PrintFooter, @MyFooters, GetSisterSites, GetNearLinksUsed): Deleted GetSisterSites and GetNearLinksUsed; no longer call them from PrintFooter; add the new option @MyFooters instead where modules can add code. (DoSearch, SearchMenu): Remove link to near search; moved the link to search result changes into SearchMenu. (SearchNearPages): Deleted. (DoMaintain): Removed near cache maintenance.
(GetFooterLinks): UrlEncode id for admin link. (GetHistoryLine): UrlEncode id for rollback link.
(@IndexOptions): New. (%PermanentAnchors, $PermanentAnchors) ($PermanentAnchorsFile): Deleted. (PermanentAnchorsInit, ReInit): PermanentAnchorsInit deleted. (LinkRules): Rule for permanent anchors deleted. (ResolveId): Name resolution for permanent anchors deleted. (GetHistoryLink): Special handling of permanent anchors removed. (DoIndex): Major rewrite using @IndexOptions, replacing all permanent anchors and near links related code. Use checkboxes instead of links. (DoPost, DeletePage, DeletePermanentAnchors): DeletePermanentAnchors deleted. (PermanentAnchorsInit, WritePermanentAnchors) (GetPermanentAnchor): Deleted.
(ApplyRules): Add a pattern for #REDIRECT in order to prevent mismatches for non-existing link-patterns. (BrowsePage): Add explanation for failed redirections.
(BrowsePage): Save a line.
(DiffMarkWords): Tighter. (DiffHtmlMarkWords): Fix named entities if they have been pulled appart by the diff highlighting.
(LinkRules, GetUrl): Handle the difference between undefined text and "0".
(DoSearch): Bugfix: Print headers if raw=1 and context=0.
(DoSearch): No longer HtmlQuote the search and replace strings in order to avoid double-encoding.
Update to GPLv3.
(InitLinkPatterns): Added feed to $UrlProtocols.
(GetRcRss, RssItem): Rearrange code, move the RssItem generation out to a new function. Required for module/enclosure.pl.
(GetSearchForm): Add delete checkbox. (PrintSearchResult): Call PrintPage if the context parameter is set. (Replace): Return the list of pages changed. (DoSearch): Handle delete checkbox. Ignore context parameter here and call PrintSearchResult always. Use Unicode right arrow instead of ->. Use the list of changed pages returned from Replace() to print the result for replacements.
(GetCss): Another fix to a bug introduced in revision 1.784.
(RcTextItem): Don't get confused by revision 0.
(GetCss): Make sure the css parameter replaces the StyleSheetPage instead of adding to it. This fixes a bug introduced in revision 1.784.
(GetRcText, RcTextRevision): Moved code out of GetRcText into a separate sub. (DoHistory): Support raw=1 and use RcTextRevision to print raw history items. (GetLanguages): Got rid of useless $count.
(GetRcRss): Use NormalToFree on the RCName in the title.
(RcHeader): Added RSS links and handle followup parameter. (GetFilterForm): Make sure the form fields are shown in the correct order every time instead of being random. Add followup field. (GetRc): Handle followup. (GetFooterLinks): Only print history, contrib, and admin links if the action is still defined.
(GetCommentForm): Add $EditNote to comments, too.
(GetRcLines): Fix test in for loop as reported by Radomir Dopieralski.
(GetHttpHeader): Use RFC822 timestamp format.
(GetHttpHeader): Use the second parameter as a timestamp, if defined and not 'nocache'. This allows us to set a last-modified date whenever we have one.
(%LockExpires): Fix init code. (RequestLockDir): Fix test.
($LockExpiration, %LockExpires): New options. (RequestLockDir): Use them.
(DoWikiRequest): Provide login link if banned. (UserIsBanned): The password page is always visible.
(GetCss): Fix bug introduced by latest change that broke the use of StyleSheetPage.
(GetDownloadLink): No longer translate the image: prefix.
($UseQuestionmark): New option. (LinkRules): Fix $bracket for [WikiWord text]. (GetPageOrEditLink, GetDownloadLink): Changed display of edit links and implement !$UseQuestionmark code.
(GetCss): Rewritten more tersely and allow it to return the first URL only. (ReportError): Rewrite GetHtmlHeader and using a div with the error class to allow styling.
(ReportError): Add two newlines at the end and exit with an error code. (GetHttpHeader): Print two newlines at the end if only a HEAD request was sent. (GetId): Return HomePage if path_info is just a slash (/).
(Save): We need to reset %IndexHash and @IndexList when a page is created to force systems running FCGI to recreate the pageidx file. This is necessary to communicate between processes.
(PrintAllPages): Print link to comment pages even if these cannot be edited, as suggested by Marcin Borkowski.
(MergeRevisions): Put the texts in double quotes in order to support translations containing spaces.
(DoContributors): Rewrite to avoid garbage entries.
(BrowsePage): Use the page timestamp as the Etag for raw page browsing.
Put the error messages on the surrounding p element, and add one, if it does not already exist.
(ApplyRules, RSS): Add error class to error messages.
(GetSummary): Fix double HTML quoting for default texts.
(BrowsePage): Add FreeToNormal() when checking whether page is a cluster
(BannedContent): Ignore malformed regular expressions in on the page.
(BannedContent): Ignore malformed regular expressions in on the page.
(InitCookie, PrintWikiToHTML, PrintAllPages) (BrowseResolvedPage, GetRcLines, GetRc, GetRcRss) (DoContributors, DoRollback, GetFooterLinks, GetCommentForm) (OpenPage, UserCanEdit, BannedContent, PrintSearchResult) (DoPost, GetSummary, GetCluster, DoMaintain, ReadRecentVisitors): Add /o to m//, s///, grep, and split calls where appropriate.
(PrintFooter): Cannot minimize div.
(PrintFooter): Cannot minimize div.
(GetHeader): Put all the content into a div.wrapper. (PrintFooter): Put a div.close at the end of the content, and close div.wrapper.
(DoContributors): Add div.
(GetTextAtTime): Don't take major revisions into account if they are older than the timestamp.
(GetTextAtTime): Make sure we note any major revision between now and the target timestamp. (DoPost): Ignore second return value of GetTextAtTime.
(DoEdit): Add an extra closing div.
(BannedContent): Fix whitespace-handling in regexp parsing.
(BannedContent, DoPost): Move message "See ... for more information" from DoPost to BannedContent, so that strange-spam.pl can provide a different link target. (BannedContent): Extract banned content comment and display it, if possible.
(BannedContent): Extract banned content comment and display it, if possible.
updated copyright year
(GetRcLines, GetRc, GetRcHtml, GetRcText, GetRcRss): Changed $pagename to $id and $timestamp to $ts. (GetOldPageLink, GetRcRss): Pass $last to GetPageParameters. (GetPageParameters): Don't add revision parameter if $last. (GetRcRss, GetRcText, GetRcHtml): Accept $last for printRCLine sub. (BrowseRc): Pass $RCName along. (GetRcLines): Fix off-by one error. Count down from $#fullrc instead of @fullrc. (GetRc): No longer pass an undefined revision to &$printRCLine; instead, pass the changetime as an additional $last parameter. (GetRcHtml): Add logic using $rollback_was_possible and $rollback_is_possible to add a last rollback link to the entry after the last one within the timewindow. In calls to GetOldPageLink and ScriptLinkDiff, make the test by comparing $last to $timestamp when $all is set. (RollbackPossible): If $ts is $LastUpdate, no rollback is possible -- these are the last changes.
(PrintRc): Changed RCName printing to avoid "All changes for RecentChanges".
(GetHistoryLink): Pass anchor=0 along to the history page if necessary.
(GetHistoryLink): Pass anchor=0 along to the history page if necessary.
(ReportError): Write lock before releasing the locks and define $q if it is not defined so we can report errors before InitRequest, as suggested by Péter Szabó.
Whitespace change.
(DoJournal): Pass search parameter along to PrintJournal. (PrintJournal): Pass search parameter along to "More..." link.
Saved a few bytes by removing extra spaces at the end of lines. ;)
(InitVariables, ReInit): Reorganized initialization. Functions get called in ReInit, and the various $*Init variables were removed. (RssInterwikiTranslateInit, NearInit, InterInit, AllPagesList): Get rid of $*Init variables. (AllPagesList): Move the reading of all existing pages inside the lock to prevent race conditions. (Save): Make sure to use the same timestamp for all variables. (GetPermanentAnchor): Reread the file inside the lock to prevent race conditions.
(RSS): Eliminate unused variable $counter.
(DelayRequired): Simplified. (GetLanguages): Simplified. (ParseData): Hand-written to optimize for speed. By getting rid of some regular expressions used for parsing, the code is now more than 10x faster. This is important for default searching, and for indexed search using double-quotes.
(ApplyRules, PrintJournal): Add past and future keywords. (PrintJournal): Removed comment with journal metadata because the attempt to write an AJAX "more" implementation for journals using journal.js has been abandoned. ($Today): New option. (JournalSort): Add one-liner explicitly so that we don't need to test using defined later. (GetSummary): Fix code that added " . . . " to summaries that are being cut off. (AddRecentVisitor): Simplified.
(PrintJournal): Use action=more.
Use 'more' instead of 'journal'.
(%Action): Added journal. (DoJournal): New, calls PrintJournal. (PrintJournal): Addd "More..." link if appropriate. No longer print horizontal lines before pages.
(DoPost): Only check mime type when one was provided.
(DoPost): Rearranged tests such that MIME type is tested even when uploading a file via text posting.
(DoCss): Report missing LWP::UserAgent or wrong URL. (GetCommentForm): Pass comment parameter to UserCanEdit(); (UserCanEdit): New comment parameter, enable $EditAllowed = 3.
(DoCss): Report missing LWP::UserAgent or wrong URL.
(DoEdit, GetEditForm): Moved code from DoEdit into the new GetEditForm, which returns a string that can be modified by wrapper code.
(GetSummary): Fix aftertext modifies summary.
(QuoteHtml): Replace control characters with space. (PageHtml): Print diff if possible, even if the page itself is too large. (GetRcRss): Conditionalize some prints to avoid empty elements. (TimeToRFC822): Rewrote to not use sprintf such as to avoid localized names.
(PageHtml): At least return the diff if small enough.
(GetCommentForm): Don't show comment form when the comment page is locked.
(GetRcRss): Use cc for the creative commons namespace. (ReportError): Don't return non-zero so that FCGI does not warn about abnormal exit.
(GetRcRss): Undo change regarding page and diff parameters. (InitVariables): Add $RsExclude to %AdminPages. (PrintPageDiff): Print hr only if pages will follow.
(PrintPageHtml): Allow skipping using page=0. (GetRcRss): Call PageHtml if one of full, page, or diff is set. (GetRcRss): Cosmetics.
(GetInterSiteUrl): Don't quote slashes.
(GetId): If no id parameter was given, use the title parameter. (DoBrowseRequest): If a title parameter was given, but the Cancel button was used, don't call DoPost(). (DoEdit): Add a Cancel button.
(RcHeader, GetFilterForm, GetRc): Revert previous unplanned change: Use match instead of rcmatch.
(PrintRc): Fix mispatch.
(BrowsePage): Moved some code into PrintRc. (BrowseRc): Use PrintRc as well. (PrintRc): New.
(PrintAllPages, GetPageOrEditLink, GetPageLink) (GetEditLink, GetDownloadLink, GetRcText, GetRcRss, ) (DoAdminPage, GetOldPageLink, GetSearchLink, GetAuthorLink) (GetHeader, DoEdit, PrintPage, SearchTitleAndBody) (SearchNearPages, PrintSearchResultEntry, GetPermanentAnchor): Use NormalToFree instead of s/_/ /g. (NormalToFree): New. (UserIsEditor, UserIsAdmin): Simplify. (UserIsEditorOrError): Use ReportError. (DoRollback): Require a username (because of bots disregarding robot instructions). (DoHistory, GetHistoryLine): Make sure that you need either a password or a username to see rollback links.
(GetSummary): Don't truncate the real summary!
(DoRc): Fix boolean operation.
(DoRollback): Check UserCanEdit before saving. (UserCanEdit): Added test for sample undefined page. (DoPost): Removed unnecessary tests, as these are caught by UserCanEdit.
(ValidIdOrDie): Typo.
($Counter): New variable for Fast::CGI info. (InitVariables): Add counter if the script is being called multiple times. (RcHeader): Add view-rollback link. (PrintAllPages, ValidIdOrDie, DoRandom): Simplified. (DoRc, GetRcLines): Moved stripping of rollbacks from DoRc to GetRcLines. Add parameter to GetRcLines. (DoRollback): Add parameter to GetRcLines call in order to not strip rollbacks. Fix bug which caused message printing at all times. (RcHeader, GetRc): Use rcmatch instead of match parameter. (GetHistoryLink, GetRCLink): Use FreeToNormal.
(PrintHtmlDiff): Translate diff fragments such as added/changed/deleted. (ImproveDiff): No longer translate diff fragments here.
(PrintHtmlDiff): Recompute the new text if requesting a diff with disabled caching.
(PrintHtmlDiff): Changed logic when requesting no cache.
(PrintHtmlDiff): Fix variable names.
(DoRc): Allow rollback=1 to see rollbacks. (DoRollback): Rollback to empty pages is allowed. Print message when only one page is to be rolled back and the two revisions are the same. (PrintHtmlDiff): Change messages used when displaying the diff. Get rid of oldmajor. Show link to later minor edits when showing last major edit diff. (GetDiff): Changed s///g to s///ge. (ExpireKeepFiles): Get rid of oldmajor. (Save): Pass old diff on to UpdateDiffs. Get rid of oldmajor. Only call UpdateDiffs if UseCache > 1. (UpdateDiffs): Simplify. Get rid of oldmajor.
(UpdateDiffs): Fix minor/major edit diffs.
(DoRollback): If an id is provided, don't check the time window: Just roll back as far as possible. (GetTextAtTime): Return a timestamp if no perfect match is found.
(DoRc): Fix another off-by-one error when skipping rollbacks.
(DoRollback): Only leave marker when doing mass rollback.
(DoRc): More rollback fixes.
(DoRc): More rollback fixes.
(DoRc): More rollback fixes.
(DoRc): More rollback fixes.
(DoRc): Splice [[rollback]] marker, too.
(DoRollback): Only admins can do mass rollback, but every user can do single rollbacks. Link to pages in the listing.
(DoRollback): Only admins can do mass rollback, but every user can do single rollbacks.
(DoContributors): Fix bug, allow no page id at all.
(DoContributors): List unique usernames only.
New contrib action. (DoContributors): New. (GetFooterLinks): Added appropriate link to contrib action.
(DoCss): No need to URL encode the URLs in @CssList.
(GetDownloadLink): Allow to retrieve download URL only. (GetHeader): Renamed variable for alt text. Use pagename as $LogoUrl if possible. (DeletePage): Use ValidIdOrDie to check $id.
(DoHistory): Pass timestamp reference to GetHistoryLine. (GetHistoryLine): Use timestamp reference to group entries by day.
(DoHistory): Offer page delete link only if a revision exists to be deleted.
(DoRollback): Reorder error messages. Fix test for ids.
(DoRc): Fix off-by-one error, again. (GetRcLines, DoRollback): Fix off-by-one error as well.
(PageDeletable, DoMaintain, DoEdit, ExpireKeepFiles, DoRollback) (RollbackPossible): Replaced 24*60*60 with 86400 and 60*60 with 3600.
(DoRc): Fix test for existing changes. (GetHistoryLine): Report missing other revisions instead of showing the fake "revision 0" entry. Add whitespace.
(DoRc): Moved RC file reading into new function called GetRcLines. (GetRcLines): New. No longer generate warnings when reading empty rc files (as is usual when creating a new wiki). (DoRollback): Optimize by calling GetRcLines and parsing the result instead of checking all pages. Allow rollback of single pages. (DoHistory): Pass new parameter to GetHistoryLine. Add link to delete current page at the bottom. (GetHistoryLine): Accept new parameter, and add rollback links when appropriate. (GetRcHtml): Simplify translation handling. (DoEdit): Changed text of the file/text replacement link at the bottom. Did this for all translation files, too! (DoPost, PageDeletable): Don't treat $DeletedPage like a regular expression.
(GetSummary): Fixed summary post-processing. (DoRc): Remove rc lines of rolled back changes. (DoRollback): Leave marker for DoRc.
(GetSummary): Fixed summary post-processing so that [URL text] really does get replaced by text. (GetRc): Fix clusters in recent changes.
(GetSummary): Fixed summary post-processing so that [URL text] really does get replaced by text.
(PrintFooter): No longer protect the call to PrintMyContent. Instead, test whether it is defined before calling it.
(InitConfig): Don't test for existing config file if it was already loaded. (InitRequest): Only get a new CGI object if we don't have one already. Does this break mod_perl?
(DiffMarkWords, DiffHtmlMarkWords): Changed how highlighting works. Should be much robuster now, and no longer suffer from strange off-by-one errors.
(SmileyReplace): HTML Unquote alt text of smilies.
(GetUrl): Typo.
(GetUrl): Add URL protocol as class. (GetPageLink): Add class parameter. (DoAdminPage): Add class to all menu entries. (GetFooterLinks): Add class to the links.
(InitVariables, DoAdminPage): Replaced @AdminPages with %AdminPages.
(InitVariables, UserCanEdit, DoPost, Save): Replaced @LockOnCreation with %LockOnCreation.
(DoMaintain): Fix freshness check for RSS files.
(PermanentAnchorsInit): Initialize %PermanentAnchors, too.
(PrintAllPages): Bugfix resulting in up to $JournalLimit page entries with empty id.
(PrintAllPages): Don't use $JournalLimit for admins.
($JournalLimit): New option. (PrintAllPages): Use it.
(DoClearCache): Reidentify languages.
(ApplyRules): Allow "0" as page text. (ApplyRules): Make search pattern in <journal> less greedy.
(UrlEncode): Simplify using a hash instead of a list to avoid grepping through the same list repeatedly. (GetRc): Simplify use of rcfilteronly parameter and rcclusteronly using a hash as above. (GetRcRss): Simplify excluding of pages using a hash as above. (DoDownload, DoPost): Simplify test for allowed MIME types using a hash as above. (SearchNearPages): Simplify using a hash as above.
(SearchTitleAndBody): Search MIME type of uploaded files, too.
(DoClearCache): Touch index file after clearing the cache. (SearchTitleAndBody): Allow searching of page titles for uploaded files. (PrintSearchResult): If an uploaded file is part of the result, print it. Do away with the ^#FILE speciality.
(ApplyRules, PrintJournal): Extend journal tag with search.
(DoClearCache): Changed GetHttpHeader to GetHeader, thanks to Ingo Belka for spotting it.
(SearchTitleAndBody): Concatenate title and body and call SearchString once instead of once for each.
(GetSearchLink): Add double-quotes around title so that titles with spaces in them will be searched correctly.
(DoClearCache): Add real HTML output instead of plain/text. (SearchString): Get rid of 'and' and 'or', instead use double quotes to check for phrases. (DoSearch, DoMaintain, DoShowVersion, DoSurgeProtection): Trim some space.
($Monolithic, DoPrintAllPages): Removed all action. (ScriptLink): Got rid of $Monolithic. (DoClearCache): Added clear action. (DoAdminPage): Added clear action to menu. (QuoteRegexp): New. (GetSearchLink): Use it. (DoSearch, DoEditLock, DoPageLock): Print error before printing the header.
($BracketWiki): Default to 1.
(ApplyRules): <search foo> no longer requires double quotes.
(GetOldPageLink, GetSearchLink, GetHistoryLink) (GetRCLink): Removed test for $FreeLinks before translating space to underline.
wiki.pl (InitModules): module names may contain a further dot
(ApplyRules): Localize $OpenPageName and %Page before calling SearchTitleAndBody.
(ApplyRules): Make it so that <search "foo"> only works at the beginning of the line.
(ApplyRules): Save $_ while processing search and add <p> after the search.
(GetRcRss): Removed two unnecessary QuoteHtml calls. (GetInterLink): Add the site to the class.
(PrintJournal): Fix problem with missing last post if less than ten pages were available.
(DoMaintain): Don't fetch files from near sites if the files are less than 12h old.
(GetRcHtml): Two more CSS classes.
(ScriptLink): Don't URL-encode the name attribute. (GetRcRss): Use $HttpCharset instead of UTF-8. (GetHeader): URL-encode the homepage target.
(DoPost): Check summary for banned content, too.
(%Includes): New variable. (ApplyRules): Use it to prevent loops when including local pages. (DoEditLock, DoPageLock): Save some whitespace.
(InitDirConfig): Initialize it. (OpenPage): Use it with absolute path.
($ReadMe): New option. (OpenPage): Use it.
(GetDownloadLink): Convert underlines to spaces in the alt-text. (PageIsUploadedFile): Make sure files are in fact skipped.
(GetRcRss): Use GetPageParameters if all or a change in the cluster, just as in GetRcHtml.
(GetRcRss): Use title parameter to title the RSS feed if provided.
(PrintJournal): Handle offset parameter and comment.
(SearchResultCount): New. (DoSearch): Use it.
(RequestLockDir): Fix message for existing locks. (DeletePage): Remove keep directory, too.
(GetRaw): Only return content if the response is a success.
Don't load whole page when the page contains an uploaded file that should be skipped anyway. This opens ordinary pages twice, but that's ok. (PageIsUploadedFile): New, with specialized file open. (SearchTitleAndBody): Use it to skip files unless requested.
(GetValidatorLink): Use referrer links for validation.
(InitModules): simplified pattern. (DoEdit): Add default value to GetParam call. Result is now defined and avoids a warning in the comparison.
(RequestLockDir): Print how long since the lock was created.
(BannedContent): Fix parsing of rules.
(ResolveId): Return defined values. (RSS, EncodePage): Initialize $date and $result to avoid warnings.
(GetFilterForm, GetCommentForm, GetSearchForm, DoEdit) (DoIndex): Add labels.
(Init, InitModules, InitConfig): Moved some code from Init to the new functions. (InitRequest): Moved binmode call here. (InitConfig): Hand coded GetPageContent, because this early $q is not yet available.
(BannedContent, UserIsBanned): Changed parsing in order to use http://www.usemod.com/cgi-bin/mb.pl?SharedAntiSpam. (%PlainTextPages, InitVariables): New option. (ApplyRules): Instead of hardcoding StyleSheetPage and ConfigPage, use the new option to return the page as preformatted. (UserIsBanned, BannedContent): Fix regular expressions. (InitVariables): Make sure there's no empty string as a key for %PlainTextPages. This happens if $ConfigPage is not set, for example. (ApplyRules): Safety check: Make sure $OpenPageName is set before using %PlainTextPages.
(BannedContent, UserIsBanned): Changed parsing in order to use http://www.usemod.com/cgi-bin/mb.pl?SharedAntiSpam. (%PlainTextPages, InitVariables): New option. (ApplyRules): Instead of hardcoding StyleSheetPage and ConfigPage, use the new option to return the page as preformatted.
(BannedContent): Only check the URLs of the page (ie. filter for $FullUrlPattern first).
(InitVariables): Fixed warning if $LastUpdate is undefined (ResolveId): Return list with empty values as fallback to avoid warnings in functions which call ResolveId() (DoRc): Initialize $ts to 0 to avoid warnings (GetRc): restored part of comment which got lost (EncodePage): Initialize $result to avoid warning when adding strings
(ValidId): Return when $id is undefined before doing a replacement in order to not get a warning. (InitVariables): Set $LastUpdate on every request and reinitialize some variables in case the server runs several mod_perl processes.
(ValidId): Return when $id is undefined before doing a replacement in order to not get a warning.
(DoPageLock): No longer print a separate error if the id parameter is missing. Rely on ValidIdOrDie instead. (DoPost, ValidId): Refactor.
(InitVariables): Set $LastUpdate on every request and reinitialize some variables in case the server runs several mod_perl processes.
unfinished move to get -wT working
(GetFooterTimestamp): Don't show diff link for new pages as suggested by Aaron Hawley.
(PageDeletable): Empty pages should be deleted, but usually they contain exactly one newline. All pages consisting of whitespace only shall now be deletable.
(ReInit): Small style change.
(ReInit): Reset $PermanentAnchorsInit if forced.
(ReInit): New. (Save): Use it. (DeletePage): Use it, and fix IndexHash and IndexList.
(DoEdit): Added p hotkey for preview at Perry Nguyen's suggestion.
(GetCommentForm): Added p hotkey for preview at Perry Nguyen's suggestion.
(Replace): Rewrote replacement such as to solve quoting issues.
(DoSearch): When replacing, quote metacharacters in the replacement text before searching for the replacement.
(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.
(BrowseResolvedPage): Visiting non-existing comment pages is ok, even if $NotFoundPg is set.
(GetFormStart): Use start_multipart_form instead of start_form, because CGI.pm 3.04 does not default to the correct encoding for forms.
(GetSummary): Only limit to default length after stripping URLs.
(GetSummary): Strip [URL text] from default summaries.
(ApplyRules): Add HTML entities to the default rules. (QuoteHtml): No longer unescape HTML entities.
(QuoteHtml): Make regexp stricter such as not to break the markdown module.
(PageDeletable): Reverse order of statements such that empty pages can be deleted.
(InitVariables): Reorder calls so that $InterMap gets translated before it is read.
(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.
(ApplyRules): Close HTML environments before printing anything on pages containing files.
(handler): Removed mod_perl handling code.
($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.
Switch to Apache2 and mod_perl2 support! (handler): Don't call Apache->request($r). Use Apache2::Const::OK.
(@CssList): Added more URLs.
(@CssList): New. (DoCss): Use it.
($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'. (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.
(Init): Call InitCookie before calling InitVariables.
(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.
(GetRcHtml): Correctly initialize variables.
(GetSummary): UnquoteHtml. (GetHttpHeader): Introduced mime-type parameter. (DoEdit): UnquoteHtml for the summary.
(DoPost): Unquote text and aftertext parameters.
(QuoteHtml, UnquoteHtml): Do not shortcut.
(GetParam): Quote HTML after determining the default value.
(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.
fix typo
(DoPost): Creating empty pages still results in a 400 Bad Request error, but saving no changes will result in a 200 Ok.
(DoSearch): Added p.result and p.links for div.search.
(InitLinkPatterns): Small change to $InterLinkPattern as suggested by Markus Lude.
(UrlDecode): New. (InitCookie): Decode cookie. (PageEtag, Cookie): Encode cookie.
(InitLinkPatterns): Quote $, %, and @ in $InterLinkPattern and $FreeInterLinkPattern.
typo
(GetRcRss): Allow XSL stylesheets for the RSS feed, too.
(TextIsFile): Fix bug.
(GetRcRss): Allow multiple licenses using an array ref for $RssLicense.
($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).
(DoHistory): Use GET instead of POST for history links. (GetFormStart): Fix class for forms. (GetKeptDiff): Handle identical revisions.
(EncodePage): Don't modify the data in place; make a copy first.
(RcHeader, GetFilterForm, GetRc): Add page title filter using the match parameter. Make the form GET instead of POST.
(RSS, GetRcHtml): Replaced – with – 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.
(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.
(DoIndex): Changed form, too.
(DoIndex): Changed pattern parameter to match, so that it matches the parameter used in the calendar extension.
(DoIndex): Added pattern form.
(DoUnlock): Don't cache. (DoIndex): Add pattern parameter.
(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. (@MyMaintenance): New option. (DoMaintain): Call each sub on @MyMaintenance.
(@MyMaintenance): New option. (DoMaintain): Call each sub on @MyMaintenance.
(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">
(GetRcRss): Fixed some URL encoding issues.
(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.
(DoDownload): Fix typo.
(DoDownload): Fix download caching.
(ScriptLink): Use $UrlProtocols for check for URLs.
(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.
(GetRss): Removed warnings.
(GetTextArea): Add id to textarea. ($RssDir, $RssCacheHours): New options. (RSS): Use GetRss. (GetRss, GetRssFile): New. (DoMaintain): Clean files in $RssDir.
(GetTextArea): Add id to textarea.
(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.
(TimeToW3): Bugfix.
(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?
(Init): Maintain %MyInc separate from %INC for mod_perl compatibility. (%MyInc): New variable.
($SummaryHours): New option. (DoEdit): Use it.
(DoPost): Don't create empty pages.
(DoEditLock, DoPageLock): Saved a line in each by removing the my declaration at the very beginning.
(DeletePage): Delete page-lock file, too.
(RcHeader): bugfix
(ScriptLink): Add another parameter to generate rel="nofollow" links. (RcHeader): Use nofollow links because RecentChanges is FOLLOW by default. This might help cut bandwidth.
(GetFooterTimestamp): Default to diff=2 in the footer, since that matches author name and timestamp visible.
(GetSummary): For new pages, use the beginning of the text if no summary was provided.
(GetCommentForm): Don't provide summary in the form. (DoPost): Get summary from GetSummary. (GetSummary): New function that takes a substring from aftertext if available.
(DoEdit): Use $KeepDays instead of 24h for "summary expiration". ($SummaryLines): Remove option again and replace with hard-coded two lines.
($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.
(ApplyRules): Removed the final oldpos hack required because now $bol no longer uses regexp matching.
(PageDeletable): Delete empty pages, too. (ApplyRules): Changed the way $bol is computed to a substring comparison instead of a regular expression match.
(PageDeletable): Delete empty pages, too.
(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.
Isolated test for uploaded file in FileIsText sub. FileIsText can be used in list context to get the mime type!
Hopefully definitively fixed bug for previous version diffing. Note that oldmajor could be still wrong in page database...
(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.
(Save): Fix handling of $oldmajor.
(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.
(RSS): Use LWP::Parallel::UserAgent if available.
The DoBrowseRequest() method has been splitted and some functionalities can be accessed now via the GetCurrentRequest() method. As a side effect, you can access the currently selected page via the GetCurrentPage() method, which will give you either OpenPageName, if already available, or will munge it using GetCurrentRequest. This is particularly useful inside modules' initialisation functions.
Separated the actual `diff' call from GetDiff(), now DoDiff() is in charge of spawning `diff' process. This has been changed in DiffMarkWords too. As a positive side effect, ImproveDiff (and DiffMarkWords) do not need to be called while the temporary lock is active any more. A similar separation process will follow regarding `diff3'. Version of `diff'-`diff3' programs is output only if UseDiff is exactly equal to 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.
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.
Corrected a bug in GetDiff() while calling GetDownloadLink().
(DoPageLock): Add link back to the page.
(ApplyRules): Removed debug warnings that got checked in...
(DoBrowseRequest): Added CGI error message suggested by Tim Jenness.
(BrowsePage): Revert last change: DO report 404 for non-existing pages even when using raw=1.
(BrowsePage): No longer report 404 for non-existing pages even when using raw=1, as oddwiki.taoriver.net kept reporting a 404.
(BrowsePage): Report 404 for non-existing pages even when using raw=1.
(ApplyRules): Fix typo found by Flavio Poletti.
(CreateDir): Add error if mkdir fails.
Added missing start_html() to ReportError
(RSS): Fix rfc 822 date parsing regular expression.
(handler): Added no strict "refs" pragma after a report by Ross Thomas.
(handler): Typo: Use my.
(handler): Don't set $RunCGI.
(handler): Set all sort of variables from environment variables.
(InitVariables): Typo.
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.
(InitDirConfig): New, set all directories here. (Init): Call it. (handler): New, for mod_perl.
(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.
(GetHttpHeader): Added handling of HEAD requests.
(RSS, GetRcHtml): Use ndash to separate summary from the rest of the item. The dash is in a new span.
(RSS): Take dash out of the strong element with the description.
(@MyAdminCode): New option. (@AdminBlocks): Removed option. (DoAdminPage): Rewritten to take advantage of the new @MyAdminCode.
Update copyright year.
(@MyInitVariables): New option. (InitVariables): Use it. (DoAdminPage): Bugfix. (GetFooterLinks): Add class.
(DoAdminPage): Treat space.
(DoAdminPage): Add more actions. (DoUnlock, DoMaintain): Changed title.
(DoAdminPage): Use edit links for non-existing important pages.
(@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).
(InitLinkPatterns): Remove "" delimiter from $FreeLinkPattern and $FreeInterLinkPattern. (ApplyRules): Unquote URLs in include and rss rules.
(RSS): Add RFC 822 Parsing for RSS 2.0. (DoDownload): Fix regexp for #FILE. (DoShowVisitors, DoPrintAllReferers): Add content div.
(DoPost): Only determine new authors if there is an old revision that is being changed.
($DefaultStyleSheet): Minor twiddling.
(ApplyRules): Locally set $OpenPageName when including local pages.
(Save): Moved automatic lock creation back to after the SavePage call in order to make sure the directory exists.
(InitVariables): Removed handling of $HtmlHeaders. (GetHtmlHeader): Add site RSS and page RSS if $HtmlHeaders is not set.
(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.
(PrintFooter): Changed 'time' parameter to 'timing' to avoid collision with Timezone Extension.
(AddComment): Prefix http:// if necessary. (Save): Moved some variable settings up.
(Save): Handle existing index file that cannot be unlinked.
(ApplyRules): Fix bug that prevented pages containing a file from displaying correctly.
(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.
(ApplyRules): Add print AddHtmlEnvironment('p') in various places where CloseHtmlEnvironments() is called -- after includes, journals, rss feeds, and conflicts.
(PrintWikiToHTML): Fix typo.
(PrintWikiToHTML): Don't save revision 0 files. These can appear if showing the full RSS for deleted pages.
(ReportError): Use $q->Dump.
(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.
(DoShowVersion): Link to dependencies=1 and links=1.
(GetFooterLinks): Move the "Back to %s" link to the front of the bar. Link to the plain page names.
(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".
(BrowsePage): Removed content class from the rc div.
(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.
* wiki.pl (GetAdminBar, GetFooterLinks, GetGotoBar): Add bar class.
(GetGotoBar): Added $UserGotoBar back.
(PrintJournal, BrowsePage, GetHeader, PrintFooter, PrintAllPages): Use start_div() and end_div() instead of strings. (DoHistory, DoRollback, DoEdit, DoPassword, DoIndex, DoSearch, DoMaintain, DoShowVersion): Use div.
(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, DoSearch): Removed vertical bars.
(GetFormStart): Fix syntax error. (?) (GetKeptDiff): Pass old revision to GetDiff. (GetDiff): Handle situation where old or new revision is a file.
(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.
(GetCommentForm): Larger input field.
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.
Added class attribute for text includes. (pre class="include $uri")
Added div environment to non-text includes. The class attribute is set to "include" plus the included page name. E.g. class="include FooBar".
(ApplyRules): Save pos when determining $bol to fix a bug. (SmileyReplace): Simplified.
(DoSearch): Accesskey 'f'.
(PageDeletable): Never delete pages if $KeepDays is set to 0.
(GetDownloadLink): Change look of download link if the page does not exist.
(GetRaw): Simplify. (PrintAllPages): Page titles with spaces.
(ApplyRules): Require space after * all list items, not just the first.
(RSS): Don't add closing ul unless an opening one was added.
(InitVariables): Bugfix -- handle '_' at the endo of $CommentsPrefix as well. (RSS): Warning if feed contains no item (even if no parsing error...).
No provide $DefaultCSS for tables. (InitVariables): Handle $CommentsPrefix. (GetHeader): Simplified. (AddComment): Added extra newlines.
$DefaultStyleSheet change for textarea.
* wiki.pl (RSS): Use $CollectingJournal as well. (PrintJournal): Cosmetic.
(DoPost): remove "DeletePage" when a comment is added. (PageDeletable): Simplify.
(RSS): Handle list start tag for feeds without dates. (DoSurgeProtection): Verbose error message if the first visitor lock cannot be created.
(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.
(GetAdminBar): Moved GetGotoBar($id) out of this sub and renamed $revisions to $html. (PrintFooter): Moved GetGotoBar($id) here.
(PrintPage): Print title instead of id. (BannedContent): Return text matched in the original page. (DoPost): Changed text printed when BannedContent returns text.
(PrintPage): Print title instead of id.
(ApplyRules): New local variable $first.
Fixed default CSS.
(RSS): Fix pubDate bug, handle feeds mith titles, description, and/or link.
(RSS): Remove guid handling.
(ApplyRules): Disallow | in the alternate text of the [[image:page|text]] rule. It prevented [[image:page|text|page]] from reaching image.pl.
($DefaultStyleSheet): New option. (GetHtmlHeader): Use it.
(GetUpload): Don't return a p element.
(GetAuthorLink): Translate _ to space in author names.
(GetAuthorLink): Remove _ from author names.
(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.
(PrintPageDiff): New. (PageHtml): Call it. (BrowsePage, PrintHtmlDiff): Remove $id from parameters to PrintHtmlDiff. (GetRcRss): UrlEncode $RCName.
(DoHistory): XHTML conformance.
(ApplyRules): Close all HTML environments before include, rss and journal. (AddHtmlEnvironment): Bugfix. (GetFilterForm, ImproveDiff, DiffAddPrefix): XHTML conformance.
*** empty log message ***
(ApplyRules): Remove trailing emptry lines from the content.
(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.
(InElement): New. (ApplyRules): Use it. Try to use environments for paragraphs, too. (CloseHtmlEnvironmentUntil): New.
($RssExclude): New option. (InitVariables): Apply FreeToNormal to \$RssExclude. (GetRcRss): Take $RssExclude into account. (PrintPageHtml): New. (PageHtml, PrintAllPages): Moved code to PrintPageHtml.
(ApplyRules): Eliminate a warning. (GetRcRss): Support full parameter for RSS feeds. (DoRss): Use application/rss+xml instead of text/plain. (PageHtml): New.
(GetHttpHeader): Fix typo related to last_modified header, thanks to Andrés Martinelli.
More tests for modules.
(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.
Patch by Nikolay A. Fetisov <naf@monsy.mpei.ac.ru>. (InitVariables, ApplyRules, PrintJournal, OpenPage): Initialize some variables. (Save): Reset $IndexInit.
Moved many rules from ApplyRules in wiki.pl to modules/usemod.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.
(ApplyRules): Don't allow empty headers. (DoDownload): Use unquoted type for messages. (DoPost): Save unquoted type, use unquoted type for messages.
($bol): New global variable. (ApplyRules): Use local $bol instead of my $bol, so that extensions can use it as well.
* wiki.pl (ApplyRules): Require a space after list items (after *, #, :, ;).
Don't override $ModuleDir if it is already set (since this is used before $ConfigFile is run).
(ApplyRules): Require a space after bullet points (after and #).
(DoPost, DoDownload): Call quotemeta on the MIME type to allow image/svg+xml.
(GetRc): Experimenting with revision clusters: By starting the summary with a page link, you can cluster one revision only.
(ApplyRules): New regepx → allow a bit more skipping of words.
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.
(ApplyRules): Another optimization -- this one will disable all rules that start with lowercase ascii letters!
(RunMyRules): Bugfix -- don't add \&MyRules a gazillion times. Optimize -- No eval to catch errors.
(ApplyRules): Optimize smiley rule.
(ApplyRules): Special case ''''' to render correctly. (RunMyRules): Only call MyRules if it is defined.
(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.
(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.
(RSS): No longer print square brackets around links to feeds without interwiki moniker. This can be added using CSS.
(RSS): Handle encoding of 'diff' and 'history' texts. (DeletePage): Bugfix.
(DoMaintain): Handle error reporting from DeletePage here. (DeletePage): Simplified. Return error string or empty string on success.
(ApplyRules): Bugfix, lone *, #, and : in the middle of lines caused the creation of list items. (GetRcHtml): Show '(new)' instead of '(diff)' when revision == 1.
(ApplyRules): Lists separated by whitespace are joined (affects *, #, and : at the beginning of a line).
(GetRedirectPage): Use $ScriptName instead of $FullUrl.
*** empty log message ***
Use GetPageOrEditLink to print pages.
(ResolveId): Do not link achors that are on the same page as the their own name.
(ResolveId): Do not link achors that are on the same page as the their own name.
(PrintFooter, GetFooterLinks): Moved hr from inside span.edit to div.footer.
(GetFullLinkList): Use alternate text for interlinks if provided, use FreeToNormal only when printing raw links.
(GetPageOrEditLink): Don't use the urls returned for nearlinks as scriptlinks.
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.
(GetFullLinkList): Removed broken orphans parameter feature and use FreeToNormal on the links collected.
(PrintFooter): Pass $id and $rev to GetAdminBar. (GetFooterLinks): Remove pagelock action from here. (GetAdminBar): Put pagelock action here.
(RcHeader): Fixed text bug.
(PrintFooter): More spans. (DoSurgeProtection): Report $SurgeProtectionViews and $SurgeProtectionTime when surge protection is triggered.
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.
(RcHeader): Make all, showedit, and days explicit, so that they can be set and unset even if they are added to %CookieParameters.
Backed out experimental stuff that got added accidentally from 1.394 to 1.395.
(%InvisibleCookieParameters): Added pwd.
(DoPrintAllPages): Admin-only.
(DoPost): Call it, unless user is an editor. (DoWikiRequest): Editors can edit even when banned.
($BannedContent): New option. Add it to @LockOnCreation, apply FreeToNormal. (BannedContent): New sub. (DoPost): Call it.
(GetUrl): Test for image extension is case-insensitive. (GetHttpHeader): Allow $UseCache = -1.
(DoMaintain): Don't sort the output of AllPagesList(), since that did not work for at least one user.
(DoMaintain): Print error message only when $data is empty.
(DoShowVersion): Added LWP::UserAgent::VERSION printout.
($FullUrlPattern): New. (InitLinkPatterns): Set it. (ApplyRules): Use it. (GetFullLinkList): Fix the links action.
(InitLinkPatterns): Add "()'" to free interwiki links.
(ApplyRules, GetDownloadLink): Allow image links with alternate text.
(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.
(AllPagesList): Find dotfiles, too.
(ApplyRules, GetInterSiteUrl, GetInterLink): Don't always quote interlink pages.
(GetTextAtTime): Another bugfix for rollback action.
(GetTextAtTime): Another bugfix for rollback action.
(GetTextAtTime): Another bugfix for rollback action.
(GetTextAtTime): Fix bug for rollback action where only the pages were rolled back that were changed at the exact moment!
(DoPost): Fix raw=2 bug.
(DoRollback): Fixed old bug: Rollback action has been unusable for a very long time!
(GetDownloadLink): Don't use the upload class for 'a' when linking to an inlined image.
($FreeInterLinkPattern): New variable (InitLinkPatterns): Set it. (ApplyRules): Support new interlinks with spaces in the pagename. (GetInterSiteUrl): Encode the page name.
(GetCommentForm, DoEdit, DoPassword): Add accesskey.
(ScriptLink, GetEditLink, GetFooterLinks): Add accesskey.
(Save): Specify 'time' instead of relying on 'undef', as one user reported that was a problem with his Perl build.
(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.
(AllPagesList): Produce an error if the pageidx file exists and cannot be overwritten.
(ResolveId): Fix bug when return existing link.
(ApplyRules): [url] is a dirty rule.
(ApplyRules): The [InterLink:foo], [WikiWord] and [[[free link]]] patterns were removed.
(ResolveId): Return as a third list item whether the page exists even if a permanent anchor is found. (GetPermanentAnchor): Use it.
(ResolveId): Allow override using anchor parameter. (GetPermanentAnchor): Show link when duplicating an existing page.
(ResolveId): Permanent anchors now take precedence over existing pages. (GetPermanentAnchor): Show warning when duplicating an existing permanent anchor.
(InitLinkPatterns): add irc to $UrlProtocols.
(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.
(GetPageParameters, GetPageOrEditLink): Add UrlEncode thanks to wctang. (ScriptLink, GetAuthorLink, GetDownloadLink): Dito. (GetAuthorLink, PrintFooter, PrintPage, PrintSearchResultEntry): Dito.
(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.
(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..
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..
(RSS): Continuing the same fix.
(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.
(RSS): Print "UTC" only when time was provided.
(RSS): Fix bug in previous commit.
(RSS): Parse more dates: Time, day, and month are optional.
(GetHtmlHeader): Some more default CSS tinkering; hide form and div.refer when printing. (DoEdit): Put preview at the top of the page.
(GetHtmlHeader): Fixed default CSS.
(GetDownloadLink): Link to image page, if necessary.
more minor css changes
more minor css changes
more minor css changes
(GetInterLink, GetUrl, GetPageOrEditLink, GetEditLink) (GetPageLink, GetRcHtml, GetOldPageLink, ScriptLinkDiff) (GetHistoryLink, GetRCLink, PrintAllPages): Use more CSS classes.
(GetDownloadLink): Use a name without underscores for the link.
(GetDownloadLink): Use '?' as the name of the link.
(Upload, GetDownloadLink, ApplyRules): Renamed from Upload to GetDownloadLink. Add edit link if image doesn't exist.
(PrintFooter): Bugfix missing page id.
(PrintFooter): Add lock and unlock links for admins.
(%RssInterwikiTranslate, $RssInterwikiTranslateInit): New (InitVariables): Initialize the two. ($RssInterwikiTranslate): New. (@LockOnCreation): Lock it upon creation. (RssInterwikiTranslateInit): New. (RSS): Call RssInterwikiTranslateInit if required.
(Upload): Use FreeToNormal on inlined images.
(ApplyRules): Added image inlining.
(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): RSS rule, fix whitespace splitting that breaks new RSS functionality.
(RSS): Remove channel title from title attribute of the link; use $RssInterwikiTranslate on the URL if no interwiki was specified instead.
(GetInterLink): Add more spans to interlinks. (RSS): Append channel title to title attribute of the link. (GetFormStart): Second parameter to choose GET instead of POST. (GetSearchForm): Choose GET instead of POST.
Oops, $UsePathInfo default was set to 0 for testing purposes!
(Upload): Use download/pagename links if possible.
(DoDownload, DoPost): Only test for MIME type matches if @UploadTypes is not empty.
(ReportError): Typo.
(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.
(GetReferers): Convert escapes back to bytes for the title (at least if they use the same coding system it will look good).
(BrowseResolvedPage): Special treatment for non-existing pages: 'new' status. (BrowsePage, GetHeader): Pass 'new' status on. (GetHttpHeader): Return 404 status code if 'new'.
(%Action): New option. (DoBrowseRequest): Use it. Major change in how actions are handled! Lots of whitespace (tabified)
(GetAuthorLink): Use ScriptLink to link to author.
($HtmlHeaders): New option. (GetHtmlHeader): Use it.
(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.
(@KnownLocks): New variable. (DoUnlock): Use it.
(DoShowVersion): Print diff and diff3 dependencies.
(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.
(Cookie): Test using defined.
(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.
(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.
(SearchNearPages): Print "Near pages:" only when there actually are any.
(Cookie): Fix again.
(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.
(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.
(CloseHtmlEnvironment): Similar suspicious code.
(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.
(@MyRules): New option. (RunMyRules): New function. (ApplyRules): Call it.
($ModulesDescription): New variable. (InitVariables): Use it.
(%InvisibleCookieParameters): New option. (Cookie): Use it.
(DoUnlock, PrintSearchResultEntry): Use extra parenthesis around the qw() for Perl 5.005.
($NotifyTracker, %NotifyJournalPage): Removed. (DoBrowseRequest): Removed ping action. (DoPost): Don't call PingTracker anymore. (PingTracker): Moved. (DoPingTracker): Moved.
($DataDir): Allow setting it via the environment variable "WikiDataDir" (for mod_perl). ($ModuleDir): New variable. (Init): Load modules in $ModuleDir.
(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.
(PrintFooter): Comments are no longer minor edits.
(RSS): Print error message when parsing fails.
* 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.
(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.
(InitRequest): Use binmode :utf8 for the entire session.
(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).
(GetPageOrEditLink): Add class to edit links.
(PrintFooter): Text change. (PrintAllPages): Refresh languages, too, when cache=0 is used. (DoMaintain): No longer handle cache parameter.
(DoMaintain): Add space to printout.
(DoMaintain): Determine languages, too, if cache.
(PrintFooter): Use "Back to X". (PrintAllPages): Allow filtering by language.
(PrintFooter): Text change.
(PrintFooter): Text change.
(DoIndex): Rework how the subtitle is created.
($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.
(GetTextRevision): New function, factored out of BrowsePage. (BrowsePage, DoEdit, DoDownload): Use it.
update copyright
(PrintSearchResult): Bugfix.
(PrintSearchResult): Bugfix -- quote HTML only after all the other stuff has been replaced.
(RSS): Better error message when XML::RSS or LWP::UserAgent are not available.
(RSS): Improved handling of feeds without dates by using a numeric counter when necessary.
(DoShowVersion): Print Perl version.
(PrintSearchResultEntry): Bugfix.
(PrintSearchResultEntry): More elaborate linking for wikis that use subpages.
(GetInterSiteUrl): Bugfix: Return nothing if the site is not found on the intermap.
(HighlightRegex): New. (DoSearch, SearchNearPages, PrintSearchResultEntry): Use it. (PrintSearchResult): Extract HighlightRegex, SearchHighlight and SearchExtract. (SearchHighlight, SearchExtract): New.
Catch up after the Savannah crack.
(DoPost): Some refactoring, and making sure that no there is no conflict warning when a comment is being appended.
(DoSearch): Print footer only when not $raw.
(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.
(GetRcRss): Some refactoring. (PrintSearchResults): Elipsis no longer bold.
(RcHeader, GetRc, SearchTitleAndBody): Rename $langFilter -> $lang; (DoSearch, Replace): Replacement is language sensitive.
(PrintPageList): Handle lang attribute.
(PrintPageList): Handle lang attribute.
(SearchTitleAndBody, GetRc): Tweaking handling of "none".
(SearchTitleAndBody, GetRc): Tweaking handling of "none".
(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.
(%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.
(DoShowVersion): Print server software as well.
(SaveKeepFile): Set keep-ts when moving a page to the keep file. (ExpireKeepFiles): Use keep-ts to decide whether to expire or not.
(DoMaintain): Bugfix; the call to sort was borked.
(Tss): @_[0] -> $_[0] (PrintSearchResults): \1 -> $1
(OpenPage): No text if this a comment page.
(%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.
(DoIndex): Sort pages.
(DoIndex): Add new parameter permanentanchors. (DoIndex): Sort pages. (PrintPageList): Use ResolveId to get link class correct. (AllPagesList): Don't sort list. (DoMaintain): Sort pages.
(DoIndex): Add new parameter permanentanchors.
(InitVariables): Set $FullUrl to $ScriptName if unset.
(GetInterLink): Support %s in the interwiki link.
(PrintWikiToHTML): Not fatal if we can't get the main lock.
(Save): Only call UpdateDiffs when the new revision is > 1.
(RSS): Simplified date handling a bit.
(RSS): Add $contributor back to the line.
(RSS): Cosmetics.
(RSS): Cosmetics.
(GetRcRss): Provide diff link only if the wiki can handle it. (GetFilterForm): Use a table. (RSS): Handle diff and history links.
(DoRc): Append filter form. (RcHeader): Fix stickiness of showedit attribute, make days sticky. (GetFilterForm): New.
(RSS): RDF namespace taken into account.
(RSS): Strip whitespace from $interwiki.
(RSS): Print interwiki link if provided and RSS feeds are being merged.
(%NotifyJournalPage): New variable. (PingTracker): Use it.
(WriteRcLog): Check whether $langref is empty before dereferencing.
(ReportError): Don't cache errors. (GetHeader): Use $Now if no caching specified. (DoShowVisitors): Don't cache.
(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".
(ApplyRules): Use binmode to switch back to the bytes layer instead of raw.
(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.
(GetDiff): Removed debugging output.
(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.
(SmileyReplace): New class. Suggested by Björn Lindström.
(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.
(ApplyRules): Permanent anchors are printed using a special span element when $withanchors is not used (eg. when showing older revisions of a page).
(DoHistory): Extract revision numbers from the keep file names. (GetRefererFile): Changed name of referer files.
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.
(Clean, ApplyRules, SmileyReplace): Fix the handling of '' and 0 in Clean().
(ApplyRules, Clean): More bugfixing with this eating zero bug. Now there was the case of extra zeros popping up either after every dirty block, or after every block.
(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 $'.
($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.
(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.
(DoPost): bugfix -- use GetParam('raw',0) instead of $raw.
(DoPost): Handle raw=2 edits again.
(RSS): Add ' -- ' between page link and summary.
*** empty log message ***
(PrintFooter): Space after the username label. (DoEdit): Space after the username label.
(RcHeader): Inherit rclang as well. (GetRc): Inherit rclang as well.
(Clean): Return nothing if empty block (due to unsuccessful call to MyRules).
Major rewrite of rules -- if you use DirtyBlock in your config file, then you will have to rewrite your code. ($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.
(InitLinkPatterns): $InterSitePattern may start with non-ASCII letters as well.
(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).
(NotModified): Protect use of Time::ParseDate with an eval.
(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.
(GetPermanentAnchor): Fix call to ResolveId.
(GetPageOrEditLink): ResolveId returns more data. (ResolveId): Return more data. (BrowseResolvedPage): Use it. (GetHtmlHeader): Add CSS for a.alias.
(GetHtmlHeader): Added RSS autodiscovery. (DoBrowseRequest): Renamed &MyAction to &MyActions. (GetRcRss): Simplification. (@MyMacros): New. (DoPost): Apply macros.
Added comment.
(WriteReferers): Unlink empty files.
(RSS): Fix URI extraction regexp that was supposed to remove trailing quotes.
(RSS): Rewrote encoding handling (depends on Unicode::MapUTF8, now!). Fixed keyhandling.
(RcHeader): Add space.
(ApplyRules): Add new ! rule. (RcHeader): Add interface for all and showedit parameters to recent changes.
(DoBrowseRequest): Simplify call to DoPost. (DoPost): Call FreeToNormal on the pagenamee, and check for validity here.
(RcHeader): Do not double rcclusteronly.
(ScriptLink): Add title parameter. (GetSearchLink): Add title parameter. (GetHeader): Add title to header. (GetPermanentAnchor): Add title to permanent anchor definition.
(BrowsePage): Fix detection of #REDIRECT bug.
(RcHeader): Remember rc parameters when printing the header.
(DoSearch): Add link to filtered recent changes.
(DoRc): Extract header printing into RcHeader. (RcHeader): New. (GetRc): Implement rcfilteronly parameter (ie. filtered recent changes).
(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.
(SearchTitleAndBody): Support "and" and "or". (PrintSearchResults): Support "and" and "or".
(Cookie): Make the message more readable.
($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.
(GetRcHtml): Don't show "(diff)" link for clusters. Show the label "Cluster:" instead.
(DoRc): Adapt the header for clustered pages.
(DoRc): Adapt the header for clustered pages.
(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.
(DoPost): Rewrote conflict handling again.
(ExpireKeepFile, WriteStringToFile, AppendStringToFile): Spelling: cant->cannot. (DoPost): Use diff3 for conflict merging, and use a pre block for the conflict itself. (GetPermanentAnchor): New text.
(ValidId): Only avoid spaces in filenames when not $FreeLinks.
(MergeRevisions): Redirect stderr output of merge.
Bugfixes.
(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.
(CalcTimeSince): New, moved from DoShowVisitors. (DoShowVisitors): Call CalcTimeSince. (DoPost): Increase timespan to 10 minutes and call CalcTimeSince.
(%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.
(DoPost): Report errors if the browser does not provide enough information.
(RequestLockDir): Added return back in for the case where no error is reported.
(GetRcRss): Default is 15 not 14. (RSS): Take care not to make the list larger!
(RSS): Remove extra quotes around URIs. 'title' is no longer guaranteed. Use 'guid' if available. But it back in a list.
(RSS): Reinitialize the RSS parser and the HTTP user agent for every URI.
(GetRcRss): Use rsslimit-1 instead of rsslimit.
(ApplyRules): Allow any whitespace, not only spaces, inside rss, include, and journal pseudo-tags.
(ApplyRules): Allow uptional maxitems argument for RSS feeds, and allow multiple RSS feeds to be merged. (RSS): Implement it.
(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.
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.
(DoPost): Release lock on errors.
(ApplyRules, DoEdit): Fix #FILE handling. (GetHtmlHeader): Change default StyleSheet for a.upload links.
(SearchTitleAndBody): Skip uploaded files. (PrintSearchResults): Show files with MIME-type if search string starts with ^#FILE.
(RequestLockDir): Print error at all times without relying on a specific errno.
(InitVariables): Typo.
Typos...
($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.
(PrintHtmlDiff): Fixed extent of the 'diff' div.
(GetHtmlHeader): Encoding multiple style sheets.
(%CookieParameters): Added 'css'. (GetHtmlHeader): Use it. (DoHistory): Removed a br tag.
(ApplyRules): Removed the [image:foo] and the [link:foo] rules again.
(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.
(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.
(GetRcHtml): Uncommented rollback code.
(BrowsePage): Removed 304 response, because the status of the page also depends on the status of *other* pages. (DoBrowseRequest): Removed parameters to BrowsePage.
(ReportError): Simplified some. (Init): New setup, make sure $MaxPost takes effect. (DoIndex): Simplified some. (PrintSearchResults): Remove subpage specific code. (GetFullLinkList): Simplified some.
(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.
($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.
(DoBrowseRequest): New action 'rollback'. (GetRcHtml): Show rollback link for administrators. (RollbackPossible): New. (DoRollback): New.
(OpenHtmlEnvironment): Fix closing of all tags when the list type changes. (GetPageOrEditLink): Change & to ; to separate parameters. (GetEditLink, DoRc, GetRcRss): Ditto. (GetHistoryLink, GetRCLink, GetPermanentAnchor): Ditto.
(ApplyRules, OpenHtmlEnvironment): Rewrote list handling. (GetPageOrEditLink): & -> & (GetEditLink): Ditto. (DoRc): Ditto. (GetPermanentAnchor): Ditto.
(DoMaintain): Delete permanent anchors file and page index when the cache is going to be regenerated.
(PrintWikiToHTML): Don't do locking if the calling context has already locked the wiki. (DoMaintain): When cache=1, refresh the cache, too.
(SavePage): Added error for missing pagenames. (DoSearch): Indicate the replacement text, too. (Replace): Do replacement in an eval so that backreferences work.
(ApplyRules): Add optional text parameter to the include markup.
(GetHtmlHeader): Added CSS for div.journal h1.
(DoMaintain): Removed useless parameters. (DeletePage): Removed useless parameters.
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.
(DoRc): Add rcuseronly and rchostonly parameters. (GetRc): Ditto.
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.
(DoPost): In summaries with multiple lines, replace newline characters with spaces.
(GetHtmlHeader): Simplified default CSS since the validator seems to be less picky about foreground and background colors.
(GetSearchLink): Do not encode page title.
(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.
(DoEdit): Print the rule that matched when somebody is banned. (UserIsBanned): Bug fix; used $host twice.
*** empty log message ***
(PrintFooter): Print username of last author.
(DoMaintain): Don't change rclog files if not required.
(DoMaintain): Don't write a newline if the list is empty.
(GetRCLink): Add showedit=1.
(GetRcHtml): Link to older revisions when using the all parameter. (GetRCLink): New function. (PrintFooter): Add new item, using it.
(ApplyRules): Extend journal rule to allow reverse parameter. (PrintJournal): New parameter to reverse journals.
(GetReferers): Don't quote HTML in href to avoid having & in the links.
(ApplyRules): Fix ISBN rule.
(DoBrowseRequest): Make sure to ignore path_info if $UsePathInfo is not set.
($UsePathInfo): New variable. (ScriptLink): Use it. (DoBrowseRequest): Use it.
(ApplyRules): The RSS rule restores pos after calling the RSS sub.
($AllNetworkFiles): New variable. (GetUrl): Allow file:/// if $AllNetworkFiles is set.
(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.
(DoBrowseRequest): Remove all the stuff up to and including a slash, fixing the problems reported by Roland Gruen.
(ApplyRules): New rule for empty tags such as <br />.
(InitRequest): @HtmlTags are only initialized within this sub in order to read the config files, first.
(ApplyRules): Pass $block, @blocks, and @flags to MyRules so that dynamic rules can be written. (DoShowVisitors): Fix typo.
(RcTextItem): New. (GetRcText): Switched to RSS 3.0.
(DoHistory): Removed $canEdit. (GetHistoryLine): Ditto. (DoPassword): Removed some newlines. (UserCanEdit): Rewrote more compactly. Thanks, Pierre, for suggesting it.
(DoBrowseRequest): Join using '_' instead of the space character. (DoEdit): No longer limit the length of the summary.
(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.
(UserCanEdit): UserIsEditor() overrides $EditAllowed=1.
(DoPost): Pass $id along.
(PingTracker): Switched to blo.gs.
(UserCanEdit): Take care of $EditAllowed==2.
(GetPageOrEditLink): UrlEncode all page ids. (GetPageLink, GetEditLink, DoRc, GetOldPageParameters): Ditto. (GetSearchLink, ScriptLinkDiff, GetHistoryLink): Ditto. (PrintFooter, PrintAllReferers): Ditto. (GetPermanentAnchorLink, GetPermanentAnchor): Ditto.
(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.
(InitRequest): ScriptName defaults to $q->url(). (ScriptLink): Prefer syntax using path_info(). (GetHtmlHeader): Removed ref. to path_info. (PingWeblogs): Switched to blogrolling.com.
(PingWeblogs): Use path_info for the URI.
(DoBrowseRequest): Accept path_info as well as keywords.
(PrintFooter): Add link to original if appropriate. (DoPost): Use undefined default $comment to distinguish '' $comment from no $comment.
(PrintJournal): Default regexp now requires the name to start with the ISO date.
($NewComment): New. (PrintFooter): Use it. (OpenNewText): Check whether $CommentsPrefix is set before matching. (DoPost): Reorder and rewrite the comment handling code.
(DoPost): Bugfix: Do not rebrowse if $comment is set.
(GetRcRss): To normal to free on page titles.
(ApplyRules): Use FreeToNormal for internal transclusion.
Including easy submission patch by Pierre Gaston <pgas@intracom.gr>. (GetRandomLink): Removed. (ApplyRules): Include local pages using GetPageContent, if possible. (GetRaw): Simplified. (DoPost): Append comment it necessary. ($CommentsPrefix): New. (PrintFooter): Added easy submission code. (OpenNewText): Only add if not commenting. (DoPost): Extract comments from aftertext parameter.
(PrintJournal): Use the subroutine JournalSort if defined to sort pages.
(%CookieParameters): Get rid of linkrandom. (ScriptLinkTitle): Deleted. (GetAuthorLink): Include code from ScriptLinkTitle and add span.author. (GetTextArea): Parameter editwide has no effect anymore.
(PrintJournal): Slice only if too large.
($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. (PingWeblogs): Use the edited page instead of the recent changes page for pinging weblogs.com.
(InitRequest): Removed test statement.
(FreeToNormal): No more ucfirst.
(InitRequest): Set @UserGotoBarPages here instead of on startup.
(InitRequest): Convert spaces to underscores for $HomePage, $RCName, $BannedHosts, $InterMap, $RefererFilter, $StyleSheetPage, and $ConfigPage.
(GetGotoBar): Use FreeToNormal on the link.
(@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.
($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.
(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.
(InitRequest): Only set when undefined. (GetRc): Removed pagecount. (GetRcHtml): Removed pagecount and link changed name from (n changed) to (history). (GetRcText): Removed pagecount.
($AdminPass, $EditPass): Only set when undefined.
($UseConfig): Only set when undefined, so that it can be set to 0 in the wrapper.
(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.
($ConfigPage): New. (@LockOnCreation): Added it. (DoWikiRequest): Use it, set $Message here for potential error. (InitRequest): Don't set $Message here.
(@UserGotoBarPages): New. (GetGotoBar): Use it. (%CookieParameters): Added 'linkrandom'.
(GetHtmlHeader): Fix bug that prevented URL from appearing in the body class.
($StyleSheetPage): New, default to empty.
($StyleSheetPage): New. (@LockOnCreation): Added it. (%CookieParameters): Added 'theme'. (GetHtmlHeader): Use $StyleSheetPage if no $StyleSheet is given. (GetHtmlHeader): Use the 'theme' parameter, if given.
(%CookieParameters): Use pwd instead of password.
(GetHtmlHeader): Added CSS for permanent anchors.
(%CookieParameters): New. (Cookie): Use it to handle the previously inherited attributes. (ScriptLink): No more inheriting of parameters. (InheritParameter): Removed. (InitCookie): Password parameter handling removed.
Global anchors patch by Pierre Gaston <pgas@intracom.gr>. ($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.
($RefererFilter): New. (@LockOnCreation): Added it. (UpdateReferers): Take it into account.
(GetPageContent): New. (GetSiteUrl, UserCanEdit): Use it. (@LockOnCreation): New, defaults to ($BannedHosts, $InterMap). (DoPost, Save): Use it.
(GetSiteUrl): Typo.
*** empty log message ***
($InterFile): Deleted. ($InterMap): New. (GetSiteUrl): Use it. (UserIsBanned): Fixed regexp.
($HttpCharset): Default to UTF-8.
($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.
(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.
($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.
($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.
(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.
(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.
(DoUnlock): Added extra level of parenthesis, thanks to Jason Diamond <jason@injektilo.org>
($SimpleLinks, $NonEnglish): Removed. (InitLinkPatterns): Simplified the regexp generating code such that the regexps used are clearer now,
(Cookie): Only set attributes if necessary. Report setting of cookie via $Message.
(BrowsePage): Use a flag for PrintWikiToHTML in order to prevent the creation of new pages due to cache creation for the default text.
($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. Patch by Pierre Gaston <pgas@intracom.gr>: Many subroutines: Replaced print &GetFooter(...) with &PrintFooter(...). (GetFooter, PrintFooter): Renamed GetFooter to PrintFooter, and changed concatenations to prints.
(BrowsePage): Remove duplicate div class="refer".
(BrowsePage): Print div class=refer only when there are any.
($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.
($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.
(InheritParameter): New function. (GetEditLink): Use it. ($TopLinkBar): New option. (GetHeader): Use it.
(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.
(RSS): Removed unnecessary CSS class for link within RSS divs.
(BrowsePage): Added a div class="content" around the main part.
(DoConvert): Moved br printing. (ConvertFile): Moved it here.
(DoConvert): Typo. (DoConvert): Typo. (ConvertFile): Typo.
($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. 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.
(InitCookie): No longer treat '*' special. (GetRcHtml): No longer treat '*' special.
(GetRcRss): No longer treat '*' special. (GetRcText): No longer treat '*' special. (GetHistoryLine): No longer treat '*' special. (Cookie): No longer treat '*' special.
($FreeUpper): Defaults to 0.
(GetHistoryLine): Do not anonymize IPs.
(InitRequest): Set the query object charset as suggested by Wei Ching Tang.
(ApplyRules): Changed table rules.
(ApplyRules): Convert \r\n to \n before anything else (fixed bug).
(ApplyRules): Convert \r\n to \n before anything else.
(ApplyRules): Improved handling of space-only lines.
(InitLinkPatterns): Fixed @ in UrlPattern.
(InitLinkPatterns): Not only \xc0-\xff are non-english letters: With UTF-8, \x80-\xff are.
(InitLinkPatterns): Changed InterLinkPattern.
(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.
(ApplyRules): Fixed handling of the last cell per row in tables.
(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.
($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.
(GetRcText): Added space by Pierre Gaston <pgas@intracom.gr>. (GetCommonFooter): Shortcut when embedded by Pierre Gaston <pgas@intracom.gr>.
*** empty log message ***
(RSS): Added new div for RSS inclusion. (GetHtmlHeader): Added div.rss to the default stylesheet.
(InitLinkPatterns): The InterLinkPattern may not contain an apostrophe (').
(GetInterLink): If no page follows the colon, this is no interlink.
(GetReferers): Quote HTML.
($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.
(UrlEncode): New function. (GetValidatorLink): Use it.
(InitLinkPatterns): Only set $FS and $FS0 if $FS is not set already. (ReadFile): Check wether $FS0 is set before doing anything. (DoMaintain): Ditto.
(DoMaintain): Important bugfix!
Tricky update! Changing the field separator from superscript 3 to an ASCII control character! (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.
(DoHistory): Removed extra <tr>.
(DoEdit): Added new div with class preview for the preview part.
typo
(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.
(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.
(PrintWikiToHTML): Only save cachen when revision not set.
(BrowsePage): Only use cache when revision not set.
(BrowsePage): Pass $id along to OpenDefaultText. (OpenDefaultText): If $id is the homepage, and the revision is 0, attempt to display the README file instead.
(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.
(GetValidatorLink): Link to CSS Validator.
*** empty log message ***
(GetMinimumFooter): Move validator link from GetFooterText to GetMinimumFooter.
(ScriptLink): Quote HTML for actions.
(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): Inherit embed and toplinkbar parameters to local links. (ISBNLink): Make URLs to shops translatable. (GetGotoBar): Add search button.
Initial checkin
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |