2 rcs_id('$Id: RecentChanges.php,v 1.101 2004-11-10 19:32:24 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 $WikiTheme->getDay($rev->get('mtime'));
50 function time ($rev) {
52 return $WikiTheme->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 $WikiTheme->makeButton(_("(diff)"), $this->diffURL($rev), 'wiki-rc-action');
131 function historyLink ($rev) {
133 return $WikiTheme->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 $WikiTheme->linkExistingWikiWord($page->getName(), $link_text, $version);
156 return $WikiTheme->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, $WikiTheme;
180 $rss_url = $request->getURLtoSelf(array('format' => 'rss'));
181 return HTML::small(array('style' => 'font-weight:normal;vertical-align:middle;'), $WikiTheme->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");
193 if (isset($caption) and $caption == _("Recent Comments"))
194 $edits = _("comments");
196 if ($timespan = $days > 0) {
197 if (intval($days) != $days)
198 $days = sprintf("%.1f", $days);
202 * Depending how this text is split up it can be tricky or
203 * impossible to translate with good grammar. So the seperate
204 * strings for 1 day and %s days are necessary in this case
205 * for translating to multiple languages, due to differing
206 * overlapping ideal word cutting points.
208 * en: day/days "The %d most recent %s [during (the past] day) are listed below."
209 * de: 1 Tag "Die %d jüngste %s [innerhalb (von des letzten] Tages) sind unten aufgelistet."
210 * de: %s days "Die %d jüngste %s [innerhalb (von] %s Tagen) sind unten aufgelistet."
212 * en: day/days "The %d most recent %s during [the past] (day) are listed below."
213 * fr: 1 jour "Les %d %s les plus récentes pendant [le dernier (d'une] jour) sont énumérées ci-dessous."
214 * fr: %s jours "Les %d %s les plus récentes pendant [les derniers (%s] jours) sont énumérées ci-dessous."
218 if (intval($days) == 1)
219 $desc = fmt("The %d most recent %s during the past day are listed below.",
222 $desc = fmt("The %d most recent %s during the past %s days are listed below.",
223 $limit, $edits, $days);
225 $desc = fmt("The %d most recent %s are listed below.",
228 elseif ($limit < 0) { //$limit < 0 means we want oldest pages
230 if (intval($days) == 1)
231 $desc = fmt("The %d oldest %s during the past day are listed below.",
234 $desc = fmt("The %d oldest %s during the past %s days are listed below.",
235 $lmt, $edits, $days);
237 $desc = fmt("The %d oldest %s are listed below.",
243 if (intval($days) == 1)
244 $desc = fmt("The most recent %s during the past day are listed below.",
247 $desc = fmt("The most recent %s during the past %s days are listed below.",
250 $desc = fmt("All %s are listed below.", $edits);
252 if (isset($this->_args['page'])) // RelatedChanges
253 return HTML::p(false, $desc, HTML::br(), fmt("(to pages linked from \"%s\")",$this->_args['page']));
254 return HTML::p(false, $desc);
259 extract($this->_args);
260 return array($show_minor ? _("RecentEdits") : _("RecentChanges"),
263 $this->sidebar_link());
266 function empty_message () {
267 if (isset($this->_args['caption']) and $this->_args['caption'] == _("Recent Comments"))
268 return _("No comments found");
270 return _("No changes found");
273 function sidebar_link() {
274 extract($this->_args);
275 $pagetitle = $show_minor ? _("RecentEdits") : _("RecentChanges");
278 $sidebarurl = WikiURL($pagetitle, array('format' => 'sidebar'), 'absurl');
281 "function addPanel() {\n"
282 ." window.sidebar.addPanel (\"" . sprintf("%s - %s", WIKI_NAME, $pagetitle) . "\",\n"
283 ." \"$sidebarurl\",\"\");\n"
285 $jsf = JavaScript($addsidebarjsfunc);
288 $sidebar_button = $WikiTheme->makeButton("sidebar", 'javascript:addPanel();', 'sidebaricon');
289 $addsidebarjsclick = asXML(HTML::small(array('style' => 'font-weight:normal;vertical-align:middle;'), $sidebar_button));
290 $jsc = JavaScript("if ((typeof window.sidebar == 'object') &&\n"
291 ." (typeof window.sidebar.addPanel == 'function'))\n"
293 ." document.write('$addsidebarjsclick');\n"
296 return HTML(new RawXML("\n"), $jsf, new RawXML("\n"), $jsc);
299 function format ($changes) {
300 include_once('lib/InlineParser.php');
302 $html = HTML(HTML::h2(false, $this->title()));
303 if (($desc = $this->description()))
304 $html->pushContent($desc);
306 if ($this->_args['daylist'])
307 $html->pushContent(new DayButtonBar($this->_args));
313 while ($rev = $changes->next()) {
314 if (($date = $this->date($rev)) != $last_date) {
316 $html->pushContent($lines);
317 $html->pushContent(HTML::h3($date));
322 // enforce view permission
323 if (mayAccessPage('view',$rev->_pagename)) {
324 $lines->pushContent($this->format_revision($rev));
327 $this->setValidators($rev);
332 $html->pushContent($lines);
334 $html->pushContent(HTML::p(array('class' => 'rc-empty'),
335 $this->empty_message()));
340 function format_revision ($rev) {
341 $args = &$this->_args;
343 $class = 'rc-' . $this->importance($rev);
345 $time = $this->time($rev);
346 if (! $rev->get('is_minor_edit'))
347 $time = HTML::strong(array('class' => 'pageinfo-majoredit'), $time);
349 $line = HTML::li(array('class' => $class));
352 if ($args['difflinks'])
353 $line->pushContent($this->diffLink($rev), ' ');
355 if ($args['historylinks'])
356 $line->pushContent($this->historyLink($rev), ' ');
358 $line->pushContent($this->pageLink($rev), ' ',
360 $this->summaryAsHTML($rev),
362 $this->authorLink($rev));
368 class _RecentChanges_SideBarFormatter
369 extends _RecentChanges_HtmlFormatter
371 function rss_icon () {
375 //title click opens the normal RC or RE page in the main browser frame
376 extract($this->_args);
377 $titlelink = WikiLink($show_minor ? _("RecentEdits") : _("RecentChanges"));
378 $titlelink->setAttr('target', '_content');
379 return HTML($this->logo(), $titlelink);
382 //logo click opens the HomePage in the main browser frame
384 $img = HTML::img(array('src' => $WikiTheme->getImageURL('logo'),
387 'style' => 'height:2.5ex'
389 $linkurl = WikiLink(HOME_PAGE, false, $img);
390 $linkurl->setAttr('target', '_content');
394 function authorLink ($rev) {
395 $author = $rev->get('author');
396 if ( $this->authorHasPage($author) ) {
397 $linkurl = WikiLink($author);
398 $linkurl->setAttr('target', '_content'); // way to do this using parent::authorLink ??
404 function diffLink ($rev) {
405 $linkurl = parent::diffLink($rev);
406 $linkurl->setAttr('target', '_content');
407 // FIXME: Smelly hack to get smaller diff buttons in sidebar
408 $linkurl = new RawXML(str_replace('<img ', '<img style="height:2ex" ', asXML($linkurl)));
411 function historyLink ($rev) {
412 $linkurl = parent::historyLink($rev);
413 $linkurl->setAttr('target', '_content');
414 // FIXME: Smelly hack to get smaller history buttons in sidebar
415 $linkurl = new RawXML(str_replace('<img ', '<img style="height:2ex" ', asXML($linkurl)));
418 function pageLink ($rev) {
419 $linkurl = parent::pageLink($rev);
420 $linkurl->setAttr('target', '_content');
423 // Overriding summaryAsHTML, because there is no way yet to
424 // return summary as transformed text with
425 // links setAttr('target', '_content') in Mozilla sidebar.
426 // So for now don't create clickable links inside summary
427 // in the sidebar, or else they target the sidebar and not the
428 // main content window.
429 function summaryAsHTML ($rev) {
430 if ( !($summary = $this->summary($rev)) )
432 return HTML::strong(array('class' => 'wiki-summary'),
434 /*TransformLinks(*/$summary,/* $rev->get('markup')),*/
439 function format ($changes) {
440 $this->_args['daylist'] = false; //don't show day buttons in Mozilla sidebar
441 $html = _RecentChanges_HtmlFormatter::format ($changes);
442 $html = HTML::div(array('class' => 'wikitext'), $html);
444 $request->discardOutput();
446 printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", $GLOBALS['charset']);
447 printf('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"');
448 printf(' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
449 printf('<html xmlns="http://www.w3.org/1999/xhtml">');
452 extract($this->_args);
453 $title = WIKI_NAME . $show_minor ? _("RecentEdits") : _("RecentChanges");
454 printf("<title>" . $title . "</title>\n");
456 $css = $WikiTheme->getCSS();
460 printf("<body class=\"sidebar\">\n");
462 printf("\n</body>\n");
465 $request->finish(); // cut rest of page processing short
469 class _RecentChanges_BoxFormatter
470 extends _RecentChanges_HtmlFormatter
472 function rss_icon () {
476 function authorLink ($rev) {
478 function diffLink ($rev) {
480 function historyLink ($rev) {
482 function summaryAsHTML ($rev) {
484 function description () {
486 function format ($changes) {
487 include_once('lib/InlineParser.php');
492 $sp = HTML::Raw('· ');
493 while ($rev = $changes->next()) {
494 // enforce view permission
495 if (mayAccessPage('view',$rev->_pagename)) {
496 $html->pushContent($sp,$this->pageLink($rev),HTML::br());
498 $this->setValidators($rev);
503 $html->pushContent(HTML::p(array('class' => 'rc-empty'),
504 $this->empty_message()));
509 class _RecentChanges_RssFormatter
510 extends _RecentChanges_Formatter
512 var $_absurls = true;
514 function time ($rev) {
515 return Iso8601DateTime($rev->get('mtime'));
518 function pageURI ($rev) {
519 return WikiURL($rev, '', 'absurl');
522 function format ($changes) {
524 include_once('lib/RssWriter.php');
525 $rss = new RssWriter;
527 $rss->channel($this->channel_properties());
529 if (($props = $this->image_properties()))
531 if (($props = $this->textinput_properties()))
532 $rss->textinput($props);
535 while ($rev = $changes->next()) {
536 // enforce view permission
537 if (mayAccessPage('view', $rev->_pagename)) {
538 $rss->addItem($this->item_properties($rev),
539 $this->pageURI($rev));
541 $this->setValidators($rev);
547 $request->discardOutput();
549 printf("\n<!-- Generated by PhpWiki:\n%s-->\n", $GLOBALS['RCS_IDS']);
551 // Flush errors in comment, otherwise it's invalid XML.
552 global $ErrorManager;
553 if (($errors = $ErrorManager->getPostponedErrorsAsHTML()))
554 printf("\n<!-- PHP Warnings:\n%s-->\n", AsXML($errors));
556 $request->finish(); // NORETURN!!!!
559 function image_properties () {
562 $img_url = AbsoluteURL($WikiTheme->getImageURL('logo'));
566 return array('title' => WIKI_NAME,
567 'link' => WikiURL(HOME_PAGE, false, 'absurl'),
571 function textinput_properties () {
572 return array('title' => _("Search"),
573 'description' => _("Title Search"),
575 'link' => WikiURL(_("TitleSearch"), false, 'absurl'));
578 function channel_properties () {
581 $rc_url = WikiURL($request->getArg('pagename'), false, 'absurl');
583 return array('title' => WIKI_NAME,
585 'description' => _("RecentChanges"),
586 'dc:date' => Iso8601DateTime(time()));
588 /* FIXME: other things one might like in <channel>:
597 * rss091:managingEditor
599 * rss091:lastBuildDate
604 function item_properties ($rev) {
605 $page = $rev->getPage();
606 $pagename = $page->getName();
608 return array( 'title' => SplitPagename($pagename),
609 'description' => $this->summary($rev),
610 'link' => $this->pageURL($rev),
611 'dc:date' => $this->time($rev),
612 'dc:contributor' => $rev->get('author'),
613 'wiki:version' => $rev->getVersion(),
614 'wiki:importance' => $this->importance($rev),
615 'wiki:status' => $this->status($rev),
616 'wiki:diff' => $this->diffURL($rev),
617 'wiki:history' => $this->historyURL($rev)
622 class NonDeletedRevisionIterator extends WikiDB_PageRevisionIterator
626 * @param $revisions object a WikiDB_PageRevisionIterator.
628 function NonDeletedRevisionIterator ($revisions, $check_current_revision = true) {
629 $this->_revisions = $revisions;
630 $this->_check_current_revision = $check_current_revision;
634 while (($rev = $this->_revisions->next())) {
635 if ($this->_check_current_revision) {
636 $page = $rev->getPage();
637 $check_rev = $page->getCurrentRevision();
642 if (! $check_rev->hasDefaultContents())
651 class WikiPlugin_RecentChanges
654 function getName () {
655 return _("RecentChanges");
658 function getVersion() {
659 return preg_replace("/[Revision: $]/", '',
660 "\$Revision: 1.101 $");
663 function managesValidators() {
664 // Note that this is a bit of a fig.
665 // We set validators based on the most recently changed page,
666 // but this fails when the most-recent page is deleted.
667 // (Consider that the Last-Modified time will decrease
668 // when this happens.)
670 // We might be better off, leaving this as false (and junking
671 // the validator logic above) and just falling back to the
672 // default behavior (handled by WikiPlugin) of just using
673 // the WikiDB global timestamp as the mtime.
675 // Nevertheless, for now, I leave this here, mostly as an
676 // example for how to use appendValidators() and managesValidators().
681 function getDefaultArguments() {
682 return array('days' => 2,
683 'show_minor' => false,
684 'show_major' => true,
686 'show_deleted' => 'sometimes',
691 'historylinks' => false,
696 function getArgs ($argstr, $request, $defaults = false) {
697 $args = WikiPlugin::getArgs($argstr, $request, $defaults);
699 $action = $request->getArg('action');
700 if ($action != 'browse' && ! $request->isActionPage($action))
701 $args['format'] = false; // default -> HTML
703 if ($args['format'] == 'rss' && empty($args['limit']))
704 $args['limit'] = 15; // Fix default value for RSS.
706 if ($args['format'] == 'sidebar' && empty($args['limit']))
707 $args['limit'] = 10; // Fix default value for sidebar.
712 function getMostRecentParams ($args) {
715 $params = array('include_minor_revisions' => $show_minor,
716 'exclude_major_revisions' => !$show_major,
717 'include_all_revisions' => !empty($show_all));
719 $params['limit'] = $limit;
722 $params['since'] = time() - 24 * 3600 * $days;
724 $params['since'] = 24 * 3600 * $days - time();
729 function getChanges ($dbi, $args) {
730 $changes = $dbi->mostRecent($this->getMostRecentParams($args));
732 $show_deleted = $args['show_deleted'];
733 if ($show_deleted == 'sometimes')
734 $show_deleted = $args['show_minor'];
737 $changes = new NonDeletedRevisionIterator($changes, !$args['show_all']);
742 function format ($changes, $args) {
744 $format = $args['format'];
746 $fmt_class = $WikiTheme->getFormatter('RecentChanges', $format);
748 if ($format == 'rss')
749 $fmt_class = '_RecentChanges_RssFormatter';
750 elseif ($format == 'rss091') {
751 include_once "lib/RSSWriter091.php";
752 $fmt_class = '_RecentChanges_RssFormatter091';
754 elseif ($format == 'sidebar')
755 $fmt_class = '_RecentChanges_SideBarFormatter';
756 elseif ($format == 'box')
757 $fmt_class = '_RecentChanges_BoxFormatter';
759 $fmt_class = '_RecentChanges_HtmlFormatter';
762 $fmt = new $fmt_class($args);
763 return $fmt->format($changes);
766 function run($dbi, $argstr, &$request, $basepage) {
767 $args = $this->getArgs($argstr, $request);
769 // HACKish: fix for SF bug #622784 (1000 years of RecentChanges ought
770 // to be enough for anyone.)
771 $args['days'] = min($args['days'], 365000);
773 // Hack alert: format() is a NORETURN for rss formatters.
774 return $this->format($this->getChanges($dbi, $args), $args);
777 // box is used to display a fixed-width, narrow version with common header.
778 // just a numbered list of limit pagenames, without date.
779 function box($args = false, $request = false, $basepage = false) {
780 if (!$request) $request =& $GLOBALS['request'];
781 if (!isset($args['limit'])) $args['limit'] = 15;
782 $args['format'] = 'box';
783 $args['show_minor'] = false;
784 $args['show_major'] = true;
785 $args['show_deleted'] = false;
786 $args['show_all'] = false;
788 return $this->makeBox(WikiLink($this->getName(),'',SplitPagename($this->getName())),
789 $this->format($this->getChanges($request->_dbi, $args), $args));
795 class DayButtonBar extends HtmlElement {
797 function DayButtonBar ($plugin_args) {
798 $this->__construct('p', array('class' => 'wiki-rc-action'));
800 // Display days selection buttons
801 extract($plugin_args);
806 $caption = _("Show minor edits for:");
808 $caption = _("Show all changes for:");
810 $caption = _("Show changes for:");
813 $this->pushContent($caption, ' ');
816 $sep = $WikiTheme->getButtonSeparator();
819 foreach (explode(",", $daylist) as $days) {
821 $this->pushContent($sep);
822 $this->pushContent($this->_makeDayButton($days));
826 function _makeDayButton ($days) {
827 global $WikiTheme, $request;
832 $label = "..."; //alldays
834 $label = sprintf(_("%s days"), abs($days));
836 $url = $request->getURLtoSelf(array('action' => $request->getArg('action'), 'days' => $days));
838 return $WikiTheme->makeButton($label, $url, 'wiki-rc-action');
842 // $Log: not supported by cvs2svn $
843 // Revision 1.100 2004/06/28 16:35:12 rurban
844 // prevent from shell commands
846 // Revision 1.99 2004/06/20 14:42:54 rurban
847 // various php5 fixes (still broken at blockparser)
849 // Revision 1.98 2004/06/14 11:31:39 rurban
850 // renamed global $Theme to $WikiTheme (gforge nameclash)
851 // inherit PageList default options from PageList
852 // default sortby=pagename
853 // use options in PageList_Selectable (limit, sortby, ...)
854 // added action revert, with button at action=diff
855 // added option regex to WikiAdminSearchReplace
857 // Revision 1.97 2004/06/03 18:58:27 rurban
858 // days links requires action=RelatedChanges arg
860 // Revision 1.96 2004/05/18 16:23:40 rurban
861 // rename split_pagename to SplitPagename
863 // Revision 1.95 2004/05/16 22:07:35 rurban
864 // check more config-default and predefined constants
865 // various PagePerm fixes:
866 // fix default PagePerms, esp. edit and view for Bogo and Password users
867 // implemented Creator and Owner
868 // BOGOUSERS renamed to BOGOUSER
869 // fixed syntax errors in signin.tmpl
871 // Revision 1.94 2004/05/14 20:55:03 rurban
872 // simplified RecentComments
874 // Revision 1.93 2004/05/14 17:33:07 rurban
875 // new plugin RecentChanges
877 // Revision 1.92 2004/04/21 04:29:10 rurban
878 // Two convenient RecentChanges extensions
879 // RelatedChanges (only links from current page)
880 // RecentEdits (just change the default args)
882 // Revision 1.91 2004/04/19 18:27:46 rurban
883 // Prevent from some PHP5 warnings (ref args, no :: object init)
884 // php5 runs now through, just one wrong XmlElement object init missing
885 // Removed unneccesary UpgradeUser lines
886 // Changed WikiLink to omit version if current (RecentChanges)
888 // Revision 1.90 2004/04/18 01:11:52 rurban
889 // more numeric pagename fixes.
890 // fixed action=upload with merge conflict warnings.
891 // charset changed from constant to global (dynamic utf-8 switching)
893 // Revision 1.89 2004/04/10 02:30:49 rurban
894 // Fixed gettext problem with VIRTUAL_PATH scripts (Windows only probably)
895 // Fixed "cannot setlocale..." (sf.net problem)
897 // Revision 1.88 2004/04/01 15:57:10 rurban
898 // simplified Sidebar theme: table, not absolute css positioning
899 // added the new box methods.
900 // remaining problems: large left margin, how to override _autosplitWikiWords in Template only
902 // Revision 1.87 2004/03/30 02:14:03 rurban
903 // fixed yet another Prefs bug
904 // added generic PearDb_iter
905 // $request->appendValidators no so strict as before
906 // added some box plugin methods
907 // PageList commalist for condensed output
909 // Revision 1.86 2004/03/12 13:31:43 rurban
910 // enforce PagePermissions, errormsg if not Admin
912 // Revision 1.85 2004/02/17 12:11:36 rurban
913 // 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, ...)
915 // Revision 1.84 2004/02/15 22:29:42 rurban
916 // revert premature performance fix
918 // Revision 1.83 2004/02/15 21:34:37 rurban
919 // PageList enhanced and improved.
920 // fixed new WikiAdmin... plugins
921 // editpage, Theme with exp. htmlarea framework
922 // (htmlarea yet committed, this is really questionable)
923 // WikiUser... code with better session handling for prefs
924 // enhanced UserPreferences (again)
925 // RecentChanges for show_deleted: how should pages be deleted then?
927 // Revision 1.82 2004/01/25 03:58:43 rurban
928 // use stdlib:isWikiWord()
930 // Revision 1.81 2003/11/28 21:06:31 carstenklapp
931 // Enhancement: Mozilla RecentChanges sidebar now defaults to 10 changes
932 // instead of 1. Make diff buttons smaller with css. Added description
933 // line back in at the top.
935 // Revision 1.80 2003/11/27 15:17:01 carstenklapp
936 // Theme & appearance tweaks: Converted Mozilla sidebar link into a Theme
937 // button, to allow an image button for it to be added to Themes. Output
938 // RSS button in small text size when theme has no button image.
940 // Revision 1.79 2003/04/29 14:34:20 dairiki
941 // Bug fix: "add sidebar" link didn't work when USE_PATH_INFO was false.
943 // Revision 1.78 2003/03/04 01:55:05 dairiki
944 // Fix to ensure absolute URL for logo in RSS recent changes.
946 // Revision 1.77 2003/02/27 23:23:38 dairiki
947 // Fix my breakage of CSS and sidebar RecentChanges output.
949 // Revision 1.76 2003/02/27 22:48:44 dairiki
950 // Fixes invalid HTML generated by PageHistory plugin.
952 // (<noscript> is block-level and not allowed within <p>.)
954 // Revision 1.75 2003/02/22 21:39:05 dairiki
955 // Hackish fix for SF bug #622784.
957 // (The root of the problem is clearly a PHP bug.)
959 // Revision 1.74 2003/02/21 22:52:21 dairiki
960 // Make sure to interpret relative links (like [/Subpage]) in summary
961 // relative to correct basepage.
963 // Revision 1.73 2003/02/21 04:12:06 dairiki
964 // Minor fixes for new cached markup.
966 // Revision 1.72 2003/02/17 02:19:01 dairiki
967 // Fix so that PageHistory will work when the current revision
968 // of a page has been "deleted".
970 // Revision 1.71 2003/02/16 20:04:48 dairiki
971 // Refactor the HTTP validator generation/checking code.
973 // This also fixes a number of bugs with yesterdays validator mods.
975 // Revision 1.70 2003/02/16 05:09:43 dairiki
976 // Starting to fix handling of the HTTP validator headers, Last-Modified,
979 // Last-Modified was being set incorrectly (but only when DEBUG was not
980 // defined!) Setting a Last-Modified without setting an appropriate
981 // Expires: and/or Cache-Control: header results in browsers caching
982 // the page unconditionally (for a certain period of time).
983 // This is generally bad, since it means people don't see updated
984 // page contents right away --- this is particularly confusing to
985 // the people who are editing pages since their edits don't show up
986 // next time they browse the page.
988 // Now, we don't allow caching of pages without revalidation
989 // (via the If-Modified-Since and/or If-None-Match request headers.)
990 // (You can allow caching by defining CACHE_CONTROL_MAX_AGE to an
991 // appropriate value in index.php, but I advise against it.)
995 // o Even when request is aborted due to the content not being
996 // modified, we currently still do almost all the work involved
997 // in producing the page. So the only real savings from all
998 // this logic is in network bandwidth.
1000 // o Plugins which produce "dynamic" output need to be inspected
1001 // and made to call $request->addToETag() and
1002 // $request->setModificationTime() appropriately, otherwise the
1003 // page can change without the change being detected.
1004 // This leads to stale pages in cache again...
1006 // Revision 1.69 2003/01/18 22:01:43 carstenklapp
1008 // Reformatting & tabs to spaces;
1009 // Added copyleft, getVersion, getDescription, rcs_id.
1012 // (c-file-style: "gnu")
1016 // c-basic-offset: 4
1017 // c-hanging-comment-ender-p: nil
1018 // indent-tabs-mode: nil