2 rcs_id('$Id: RecentChanges.php,v 1.92 2004-04-21 04:29:10 rurban Exp $');
4 Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam
6 This file is part of PhpWiki.
8 PhpWiki is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 PhpWiki is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with PhpWiki; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 class _RecentChanges_Formatter
27 var $_absurls = false;
29 function _RecentChanges_Formatter ($rc_args) {
30 $this->_args = $rc_args;
31 $this->_diffargs = array('action' => 'diff');
33 if ($rc_args['show_minor'] || !$rc_args['show_major'])
34 $this->_diffargs['previous'] = 'minor';
36 // PageHistoryPlugin doesn't have a 'daylist' arg.
37 if (!isset($this->_args['daylist']))
38 $this->_args['daylist'] = false;
41 function include_versions_in_URLs() {
42 return (bool) $this->_args['show_all'];
45 function date ($rev) {
47 return $Theme->getDay($rev->get('mtime'));
50 function time ($rev) {
52 return $Theme->formatTime($rev->get('mtime'));
55 function diffURL ($rev) {
56 $args = $this->_diffargs;
57 if ($this->include_versions_in_URLs())
58 $args['version'] = $rev->getVersion();
59 $page = $rev->getPage();
60 return WikiURL($page->getName(), $args, $this->_absurls);
63 function historyURL ($rev) {
64 $page = $rev->getPage();
65 return WikiURL($page, array('action' => _("PageHistory")),
69 function pageURL ($rev) {
70 return WikiURL($this->include_versions_in_URLs() ? $rev : $rev->getPage(),
74 function authorHasPage ($author) {
75 global $WikiNameRegexp, $request;
76 $dbi = $request->getDbh();
77 return isWikiWord($author) && $dbi->isWikiPage($author);
80 function authorURL ($author) {
81 return $this->authorHasPage() ? WikiURL($author) : false;
85 function status ($rev) {
86 if ($rev->hasDefaultContents())
88 $page = $rev->getPage();
89 $prev = $page->getRevisionBefore($rev->getVersion());
90 if ($prev->hasDefaultContents())
95 function importance ($rev) {
96 return $rev->get('is_minor_edit') ? 'minor' : 'major';
99 function summary($rev) {
100 if ( ($summary = $rev->get('summary')) )
103 switch ($this->status($rev)) {
105 return _("Deleted.");
107 return _("New page.");
113 function setValidators($most_recent_rev) {
114 $rev = $most_recent_rev;
115 $validators = array('RecentChanges-top' =>
116 array($rev->getPageName(), $rev->getVersion()),
117 '%mtime' => $rev->get('mtime'));
119 $request->appendValidators($validators);
123 class _RecentChanges_HtmlFormatter
124 extends _RecentChanges_Formatter
126 function diffLink ($rev) {
128 return $Theme->makeButton(_("(diff)"), $this->diffURL($rev), 'wiki-rc-action');
131 function historyLink ($rev) {
133 return $Theme->makeButton(_("(hist)"), $this->historyURL($rev), 'wiki-rc-action');
136 function pageLink ($rev, $link_text=false) {
138 return WikiLink($rev,'auto',$link_text);
140 $page = $rev->getPage();
142 if ($this->include_versions_in_URLs()) {
143 $version = $rev->getVersion();
144 if ($rev->isCurrent())
146 $exists = !$rev->hasDefaultContents();
150 $cur = $page->getCurrentRevision();
151 $exists = !$cur->hasDefaultContents();
154 return $Theme->linkExistingWikiWord($page->getName(), $link_text, $version);
156 return $Theme->linkUnknownWikiWord($page->getName(), $link_text);
160 function authorLink ($rev) {
161 $author = $rev->get('author');
162 if ( $this->authorHasPage($author) ) {
163 return WikiLink($author);
168 function summaryAsHTML ($rev) {
169 if ( !($summary = $this->summary($rev)) )
171 return HTML::strong( array('class' => 'wiki-summary'),
173 TransformLinks($summary, $rev->get('markup'), $rev->getPageName()),
177 function rss_icon () {
178 global $request, $Theme;
180 $rss_url = $request->getURLtoSelf(array('format' => 'rss'));
181 return HTML::small(array('style' => 'font-weight:normal;vertical-align:middle;'), $Theme->makeButton("RSS", $rss_url, 'rssicon'));
184 function description () {
185 extract($this->_args);
186 // FIXME: say something about show_all.
187 if ($show_major && $show_minor)
190 $edits = _("major edits");
192 $edits = _("minor edits");
194 if ($timespan = $days > 0) {
195 if (intval($days) != $days)
196 $days = sprintf("%.1f", $days);
200 * Depending how this text is split up it can be tricky or
201 * impossible to translate with good grammar. So the seperate
202 * strings for 1 day and %s days are necessary in this case
203 * for translating to multiple languages, due to differing
204 * overlapping ideal word cutting points.
206 * en: day/days "The %d most recent %s [during (the past] day) are listed below."
207 * de: 1 Tag "Die %d jüngste %s [innerhalb (von des letzten] Tages) sind unten aufgelistet."
208 * de: %s days "Die %d jüngste %s [innerhalb (von] %s Tagen) sind unten aufgelistet."
210 * en: day/days "The %d most recent %s during [the past] (day) are listed below."
211 * fr: 1 jour "Les %d %s les plus récentes pendant [le dernier (d'une] jour) sont énumérées ci-dessous."
212 * fr: %s jours "Les %d %s les plus récentes pendant [les derniers (%s] jours) sont énumérées ci-dessous."
216 if (intval($days) == 1)
217 $desc = fmt("The %d most recent %s during the past day are listed below.",
220 $desc = fmt("The %d most recent %s during the past %s days are listed below.",
221 $limit, $edits, $days);
223 $desc = fmt("The %d most recent %s are listed below.",
226 elseif ($limit < 0) { //$limit < 0 means we want oldest pages
228 if (intval($days) == 1)
229 $desc = fmt("The %d oldest %s during the past day are listed below.",
232 $desc = fmt("The %d oldest %s during the past %s days are listed below.",
233 $lmt, $edits, $days);
235 $desc = fmt("The %d oldest %s are listed below.",
241 if (intval($days) == 1)
242 $desc = fmt("The most recent %s during the past day are listed below.",
245 $desc = fmt("The most recent %s during the past %s days are listed below.",
248 $desc = fmt("All %s are listed below.", $edits);
250 if (isset($this->_args['page'])) // RelatedChanges
251 return HTML::p(false, $desc, HTML::br(), fmt("(to pages linked from \"%s\")",$this->_args['page']));
252 return HTML::p(false, $desc);
257 extract($this->_args);
258 return array($show_minor ? _("RecentEdits") : _("RecentChanges"),
261 $this->sidebar_link());
264 function empty_message () {
265 return _("No changes found");
268 function sidebar_link() {
269 extract($this->_args);
270 $pagetitle = $show_minor ? _("RecentEdits") : _("RecentChanges");
273 $sidebarurl = WikiURL($pagetitle, array('format' => 'sidebar'), 'absurl');
276 "function addPanel() {\n"
277 ." window.sidebar.addPanel (\"" . sprintf("%s - %s", WIKI_NAME, $pagetitle) . "\",\n"
278 ." \"$sidebarurl\",\"\");\n"
280 $jsf = JavaScript($addsidebarjsfunc);
283 $sidebar_button = $Theme->makeButton("sidebar", 'javascript:addPanel();', 'sidebaricon');
284 $addsidebarjsclick = asXML(HTML::small(array('style' => 'font-weight:normal;vertical-align:middle;'), $sidebar_button));
285 $jsc = JavaScript("if ((typeof window.sidebar == 'object') &&\n"
286 ." (typeof window.sidebar.addPanel == 'function'))\n"
288 ." document.write('$addsidebarjsclick');\n"
291 return HTML(new RawXML("\n"), $jsf, new RawXML("\n"), $jsc);
294 function format ($changes) {
295 include_once('lib/InlineParser.php');
297 $html = HTML(HTML::h2(false, $this->title()));
298 if (($desc = $this->description()))
299 $html->pushContent($desc);
301 if ($this->_args['daylist'])
302 $html->pushContent(new DayButtonBar($this->_args));
308 while ($rev = $changes->next()) {
309 if (($date = $this->date($rev)) != $last_date) {
311 $html->pushContent($lines);
312 $html->pushContent(HTML::h3($date));
317 // enforce view permission
318 if (mayAccessPage('view',$rev->_pagename)) {
319 $lines->pushContent($this->format_revision($rev));
322 $this->setValidators($rev);
327 $html->pushContent($lines);
329 $html->pushContent(HTML::p(array('class' => 'rc-empty'),
330 $this->empty_message()));
335 function format_revision ($rev) {
336 $args = &$this->_args;
338 $class = 'rc-' . $this->importance($rev);
340 $time = $this->time($rev);
341 if (! $rev->get('is_minor_edit'))
342 $time = HTML::strong(array('class' => 'pageinfo-majoredit'), $time);
344 $line = HTML::li(array('class' => $class));
347 if ($args['difflinks'])
348 $line->pushContent($this->diffLink($rev), ' ');
350 if ($args['historylinks'])
351 $line->pushContent($this->historyLink($rev), ' ');
353 $line->pushContent($this->pageLink($rev), ' ',
355 $this->summaryAsHTML($rev),
357 $this->authorLink($rev));
363 class _RecentChanges_SideBarFormatter
364 extends _RecentChanges_HtmlFormatter
366 function rss_icon () {
370 //title click opens the normal RC or RE page in the main browser frame
371 extract($this->_args);
372 $titlelink = WikiLink($show_minor ? _("RecentEdits") : _("RecentChanges"));
373 $titlelink->setAttr('target', '_content');
374 return HTML($this->logo(), $titlelink);
377 //logo click opens the HomePage in the main browser frame
379 $img = HTML::img(array('src' => $Theme->getImageURL('logo'),
382 'style' => 'height:2.5ex'
384 $linkurl = WikiLink(HOME_PAGE, false, $img);
385 $linkurl->setAttr('target', '_content');
389 function authorLink ($rev) {
390 $author = $rev->get('author');
391 if ( $this->authorHasPage($author) ) {
392 $linkurl = WikiLink($author);
393 $linkurl->setAttr('target', '_content'); // way to do this using parent::authorLink ??
399 function diffLink ($rev) {
400 $linkurl = parent::diffLink($rev);
401 $linkurl->setAttr('target', '_content');
402 // FIXME: Smelly hack to get smaller diff buttons in sidebar
403 $linkurl = new RawXML(str_replace('<img ', '<img style="height:2ex" ', asXML($linkurl)));
406 function historyLink ($rev) {
407 $linkurl = parent::historyLink($rev);
408 $linkurl->setAttr('target', '_content');
409 // FIXME: Smelly hack to get smaller history buttons in sidebar
410 $linkurl = new RawXML(str_replace('<img ', '<img style="height:2ex" ', asXML($linkurl)));
413 function pageLink ($rev) {
414 $linkurl = parent::pageLink($rev);
415 $linkurl->setAttr('target', '_content');
418 // Overriding summaryAsHTML, because there is no way yet to
419 // return summary as transformed text with
420 // links setAttr('target', '_content') in Mozilla sidebar.
421 // So for now don't create clickable links inside summary
422 // in the sidebar, or else they target the sidebar and not the
423 // main content window.
424 function summaryAsHTML ($rev) {
425 if ( !($summary = $this->summary($rev)) )
427 return HTML::strong(array('class' => 'wiki-summary'),
429 /*TransformLinks(*/$summary,/* $rev->get('markup')),*/
434 function format ($changes) {
435 $this->_args['daylist'] = false; //don't show day buttons in Mozilla sidebar
436 $html = _RecentChanges_HtmlFormatter::format ($changes);
437 $html = HTML::div(array('class' => 'wikitext'), $html);
439 $request->discardOutput();
441 printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", $GLOBALS['charset']);
442 printf('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"');
443 printf(' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
444 printf('<html xmlns="http://www.w3.org/1999/xhtml">');
447 extract($this->_args);
448 $title = WIKI_NAME . $show_minor ? _("RecentEdits") : _("RecentChanges");
449 printf("<title>" . $title . "</title>\n");
451 $css = $Theme->getCSS();
455 printf("<body class=\"sidebar\">\n");
457 printf("\n</body>\n");
460 $request->finish(); // cut rest of page processing short
464 class _RecentChanges_BoxFormatter
465 extends _RecentChanges_HtmlFormatter
467 function rss_icon () {
471 function authorLink ($rev) {
473 function diffLink ($rev) {
475 function historyLink ($rev) {
477 function summaryAsHTML ($rev) {
479 function description () {
481 function format ($changes) {
482 include_once('lib/InlineParser.php');
487 $sp = HTML::Raw('· ');
488 while ($rev = $changes->next()) {
489 // enforce view permission
490 if (mayAccessPage('view',$rev->_pagename)) {
491 $html->pushContent($sp,$this->pageLink($rev),HTML::br());
493 $this->setValidators($rev);
498 $html->pushContent(HTML::p(array('class' => 'rc-empty'),
499 $this->empty_message()));
504 class _RecentChanges_RssFormatter
505 extends _RecentChanges_Formatter
507 var $_absurls = true;
509 function time ($rev) {
510 return Iso8601DateTime($rev->get('mtime'));
513 function pageURI ($rev) {
514 return WikiURL($rev, '', 'absurl');
517 function format ($changes) {
519 include_once('lib/RssWriter.php');
520 $rss = new RssWriter;
523 $rss->channel($this->channel_properties());
525 if (($props = $this->image_properties()))
527 if (($props = $this->textinput_properties()))
528 $rss->textinput($props);
531 while ($rev = $changes->next()) {
532 // enforce view permission
533 if (mayAccessPage('view',$rev->_pagename)) {
534 $rss->addItem($this->item_properties($rev),
535 $this->pageURI($rev));
537 $this->setValidators($rev);
543 $request->discardOutput();
545 printf("\n<!-- Generated by PhpWiki:\n%s-->\n", $GLOBALS['RCS_IDS']);
547 // Flush errors in comment, otherwise it's invalid XML.
548 global $ErrorManager;
549 if (($errors = $ErrorManager->getPostponedErrorsAsHTML()))
550 printf("\n<!-- PHP Warnings:\n%s-->\n", AsXML($errors));
552 $request->finish(); // NORETURN!!!!
555 function image_properties () {
558 $img_url = AbsoluteURL($Theme->getImageURL('logo'));
562 return array('title' => WIKI_NAME,
563 'link' => WikiURL(HOME_PAGE, false, 'absurl'),
567 function textinput_properties () {
568 return array('title' => _("Search"),
569 'description' => _("Title Search"),
571 'link' => WikiURL(_("TitleSearch"), false, 'absurl'));
574 function channel_properties () {
577 $rc_url = WikiURL($request->getArg('pagename'), false, 'absurl');
579 return array('title' => WIKI_NAME,
581 'description' => _("RecentChanges"),
582 'dc:date' => Iso8601DateTime(time()));
584 /* FIXME: other things one might like in <channel>:
593 * rss091:managingEditor
595 * rss091:lastBuildDate
603 function item_properties ($rev) {
604 $page = $rev->getPage();
605 $pagename = $page->getName();
607 return array( 'title' => split_pagename($pagename),
608 'description' => $this->summary($rev),
609 'link' => $this->pageURL($rev),
610 'dc:date' => $this->time($rev),
611 'dc:contributor' => $rev->get('author'),
612 'wiki:version' => $rev->getVersion(),
613 'wiki:importance' => $this->importance($rev),
614 'wiki:status' => $this->status($rev),
615 'wiki:diff' => $this->diffURL($rev),
616 'wiki:history' => $this->historyURL($rev)
621 class NonDeletedRevisionIterator extends WikiDB_PageRevisionIterator
625 * @param $revisions object a WikiDB_PageRevisionIterator.
627 function NonDeletedRevisionIterator ($revisions, $check_current_revision = true) {
628 $this->_revisions = $revisions;
629 $this->_check_current_revision = $check_current_revision;
633 while (($rev = $this->_revisions->next())) {
634 if ($this->_check_current_revision) {
635 $page = $rev->getPage();
636 $check_rev = $page->getCurrentRevision();
641 if (! $check_rev->hasDefaultContents())
650 class WikiPlugin_RecentChanges
653 function getName () {
654 return _("RecentChanges");
657 function getVersion() {
658 return preg_replace("/[Revision: $]/", '',
659 "\$Revision: 1.92 $");
662 function managesValidators() {
663 // Note that this is a bit of a fig.
664 // We set validators based on the most recently changed page,
665 // but this fails when the most-recent page is deleted.
666 // (Consider that the Last-Modified time will decrease
667 // when this happens.)
669 // We might be better off, leaving this as false (and junking
670 // the validator logic above) and just falling back to the
671 // default behavior (handled by WikiPlugin) of just using
672 // the WikiDB global timestamp as the mtime.
674 // Nevertheless, for now, I leave this here, mostly as an
675 // example for how to use appendValidators() and managesValidators().
680 function getDefaultArguments() {
681 return array('days' => 2,
682 'show_minor' => false,
683 'show_major' => true,
685 'show_deleted' => 'sometimes',
690 'historylinks' => false,
695 function getArgs ($argstr, $request, $defaults = false) {
696 $args = WikiPlugin::getArgs($argstr, $request, $defaults);
698 $action = $request->getArg('action');
699 if ($action != 'browse' && ! $request->isActionPage($action))
700 $args['format'] = false; // default -> HTML
702 if ($args['format'] == 'rss' && empty($args['limit']))
703 $args['limit'] = 15; // Fix default value for RSS.
705 if ($args['format'] == 'sidebar' && empty($args['limit']))
706 $args['limit'] = 10; // Fix default value for sidebar.
711 function getMostRecentParams ($args) {
714 $params = array('include_minor_revisions' => $show_minor,
715 'exclude_major_revisions' => !$show_major,
716 'include_all_revisions' => !empty($show_all));
718 $params['limit'] = $limit;
721 $params['since'] = time() - 24 * 3600 * $days;
723 $params['since'] = 24 * 3600 * $days - time();
728 function getChanges ($dbi, $args) {
729 $changes = $dbi->mostRecent($this->getMostRecentParams($args));
731 $show_deleted = $args['show_deleted'];
732 if ($show_deleted == 'sometimes')
733 $show_deleted = $args['show_minor'];
736 $changes = new NonDeletedRevisionIterator($changes, !$args['show_all']);
741 function format ($changes, $args) {
743 $format = $args['format'];
745 $fmt_class = $Theme->getFormatter('RecentChanges', $format);
747 if ($format == 'rss')
748 $fmt_class = '_RecentChanges_RssFormatter';
749 elseif ($format == 'rss091') {
750 include_once "lib/RSSWriter091.php";
751 $fmt_class = '_RecentChanges_RssFormatter091';
753 elseif ($format == 'sidebar')
754 $fmt_class = '_RecentChanges_SideBarFormatter';
755 elseif ($format == 'box')
756 $fmt_class = '_RecentChanges_BoxFormatter';
758 $fmt_class = '_RecentChanges_HtmlFormatter';
761 $fmt = new $fmt_class($args);
762 return $fmt->format($changes);
765 function run($dbi, $argstr, &$request, $basepage) {
766 $args = $this->getArgs($argstr, $request);
768 // HACKish: fix for SF bug #622784 (1000 years of RecentChanges ought
769 // to be enough for anyone.)
770 $args['days'] = min($args['days'], 365000);
772 // Hack alert: format() is a NORETURN for rss formatters.
773 return $this->format($this->getChanges($dbi, $args), $args);
776 // box is used to display a fixed-width, narrow version with common header.
777 // just a numbered list of limit pagenames, without date.
778 function box($args = false, $request = false, $basepage = false) {
779 if (!$request) $request =& $GLOBALS['request'];
780 if (!isset($args['limit'])) $args['limit'] = 15;
781 $args['format'] = 'box';
782 $args['show_minor'] = false;
783 $args['show_major'] = true;
784 $args['show_deleted'] = false;
785 $args['show_all'] = false;
787 return $this->makeBox(WikiLink(_("RecentChanges"),'',_("Recent Changes")),
788 $this->format($this->getChanges($request->_dbi, $args), $args));
794 class DayButtonBar extends HtmlElement {
796 function DayButtonBar ($plugin_args) {
797 $this->HtmlElement('p', array('class' => 'wiki-rc-action'));
799 // Display days selection buttons
800 extract($plugin_args);
805 $caption = _("Show minor edits for:");
807 $caption = _("Show all changes for:");
809 $caption = _("Show changes for:");
812 $this->pushContent($caption, ' ');
815 $sep = $Theme->getButtonSeparator();
818 foreach (explode(",", $daylist) as $days) {
820 $this->pushContent($sep);
821 $this->pushContent($this->_makeDayButton($days));
825 function _makeDayButton ($days) {
826 global $Theme, $request;
831 $label = "..."; //alldays
833 $label = sprintf(_("%s days"), abs($days));
835 $url = $request->getURLtoSelf(array('action' => 'browse', 'days' => $days));
837 return $Theme->makeButton($label, $url, 'wiki-rc-action');
841 // $Log: not supported by cvs2svn $
842 // Revision 1.91 2004/04/19 18:27:46 rurban
843 // Prevent from some PHP5 warnings (ref args, no :: object init)
844 // php5 runs now through, just one wrong XmlElement object init missing
845 // Removed unneccesary UpgradeUser lines
846 // Changed WikiLink to omit version if current (RecentChanges)
848 // Revision 1.90 2004/04/18 01:11:52 rurban
849 // more numeric pagename fixes.
850 // fixed action=upload with merge conflict warnings.
851 // charset changed from constant to global (dynamic utf-8 switching)
853 // Revision 1.89 2004/04/10 02:30:49 rurban
854 // Fixed gettext problem with VIRTUAL_PATH scripts (Windows only probably)
855 // Fixed "cannot setlocale..." (sf.net problem)
857 // Revision 1.88 2004/04/01 15:57:10 rurban
858 // simplified Sidebar theme: table, not absolute css positioning
859 // added the new box methods.
860 // remaining problems: large left margin, how to override _autosplitWikiWords in Template only
862 // Revision 1.87 2004/03/30 02:14:03 rurban
863 // fixed yet another Prefs bug
864 // added generic PearDb_iter
865 // $request->appendValidators no so strict as before
866 // added some box plugin methods
867 // PageList commalist for condensed output
869 // Revision 1.86 2004/03/12 13:31:43 rurban
870 // enforce PagePermissions, errormsg if not Admin
872 // Revision 1.85 2004/02/17 12:11:36 rurban
873 // added missing 4th basepage arg at plugin->run() to almost all plugins. This caused no harm so far, because it was silently dropped on normal usage. However on plugin internal ->run invocations it failed. (InterWikiSearch, IncludeSiteMap, ...)
875 // Revision 1.84 2004/02/15 22:29:42 rurban
876 // revert premature performance fix
878 // Revision 1.83 2004/02/15 21:34:37 rurban
879 // PageList enhanced and improved.
880 // fixed new WikiAdmin... plugins
881 // editpage, Theme with exp. htmlarea framework
882 // (htmlarea yet committed, this is really questionable)
883 // WikiUser... code with better session handling for prefs
884 // enhanced UserPreferences (again)
885 // RecentChanges for show_deleted: how should pages be deleted then?
887 // Revision 1.82 2004/01/25 03:58:43 rurban
888 // use stdlib:isWikiWord()
890 // Revision 1.81 2003/11/28 21:06:31 carstenklapp
891 // Enhancement: Mozilla RecentChanges sidebar now defaults to 10 changes
892 // instead of 1. Make diff buttons smaller with css. Added description
893 // line back in at the top.
895 // Revision 1.80 2003/11/27 15:17:01 carstenklapp
896 // Theme & appearance tweaks: Converted Mozilla sidebar link into a Theme
897 // button, to allow an image button for it to be added to Themes. Output
898 // RSS button in small text size when theme has no button image.
900 // Revision 1.79 2003/04/29 14:34:20 dairiki
901 // Bug fix: "add sidebar" link didn't work when USE_PATH_INFO was false.
903 // Revision 1.78 2003/03/04 01:55:05 dairiki
904 // Fix to ensure absolute URL for logo in RSS recent changes.
906 // Revision 1.77 2003/02/27 23:23:38 dairiki
907 // Fix my breakage of CSS and sidebar RecentChanges output.
909 // Revision 1.76 2003/02/27 22:48:44 dairiki
910 // Fixes invalid HTML generated by PageHistory plugin.
912 // (<noscript> is block-level and not allowed within <p>.)
914 // Revision 1.75 2003/02/22 21:39:05 dairiki
915 // Hackish fix for SF bug #622784.
917 // (The root of the problem is clearly a PHP bug.)
919 // Revision 1.74 2003/02/21 22:52:21 dairiki
920 // Make sure to interpret relative links (like [/Subpage]) in summary
921 // relative to correct basepage.
923 // Revision 1.73 2003/02/21 04:12:06 dairiki
924 // Minor fixes for new cached markup.
926 // Revision 1.72 2003/02/17 02:19:01 dairiki
927 // Fix so that PageHistory will work when the current revision
928 // of a page has been "deleted".
930 // Revision 1.71 2003/02/16 20:04:48 dairiki
931 // Refactor the HTTP validator generation/checking code.
933 // This also fixes a number of bugs with yesterdays validator mods.
935 // Revision 1.70 2003/02/16 05:09:43 dairiki
936 // Starting to fix handling of the HTTP validator headers, Last-Modified,
939 // Last-Modified was being set incorrectly (but only when DEBUG was not
940 // defined!) Setting a Last-Modified without setting an appropriate
941 // Expires: and/or Cache-Control: header results in browsers caching
942 // the page unconditionally (for a certain period of time).
943 // This is generally bad, since it means people don't see updated
944 // page contents right away --- this is particularly confusing to
945 // the people who are editing pages since their edits don't show up
946 // next time they browse the page.
948 // Now, we don't allow caching of pages without revalidation
949 // (via the If-Modified-Since and/or If-None-Match request headers.)
950 // (You can allow caching by defining CACHE_CONTROL_MAX_AGE to an
951 // appropriate value in index.php, but I advise against it.)
955 // o Even when request is aborted due to the content not being
956 // modified, we currently still do almost all the work involved
957 // in producing the page. So the only real savings from all
958 // this logic is in network bandwidth.
960 // o Plugins which produce "dynamic" output need to be inspected
961 // and made to call $request->addToETag() and
962 // $request->setModificationTime() appropriately, otherwise the
963 // page can change without the change being detected.
964 // This leads to stale pages in cache again...
966 // Revision 1.69 2003/01/18 22:01:43 carstenklapp
968 // Reformatting & tabs to spaces;
969 // Added copyleft, getVersion, getDescription, rcs_id.
972 // (c-file-style: "gnu")
977 // c-hanging-comment-ender-p: nil
978 // indent-tabs-mode: nil