|
CVS: phpwiki/lib/plugin RecentChanges.php,1.103,1.104 RelatedChanges.php,1.: msg#00118web.wiki.phpwiki.checkins
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6668 Modified Files: RecentChanges.php RelatedChanges.php Log Message: The extra description for RelatedChanges was appearing in RecentChanges and PageHistory due to a bad test in _RecentChanges_HtmlFormatter. Fixed. Index: RecentChanges.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/RecentChanges.php,v retrieving revision 1.103 retrieving revision 1.104 diff -u -2 -b -p -d -r1.103 -r1.104 --- RecentChanges.php 15 Dec 2004 17:45:09 -0000 1.103 +++ RecentChanges.php 24 Jan 2005 23:15:16 -0000 1.104 @@ -190,5 +190,5 @@ extends _RecentChanges_Formatter } - function description () { + function pre_description () { extract($this->_args); // FIXME: say something about show_all. @@ -258,7 +258,9 @@ extends _RecentChanges_Formatter $desc = fmt("All %s are listed below.", $edits); } - if (isset($this->_args['page'])) // RelatedChanges - return HTML::p(false, $desc, HTML::br(), fmt("(to pages linked from \"%s\")",$this->_args['page'])); - return HTML::p(false, $desc); + return $desc; + } + + function description() { + return HTML::p(false, pre_description()); } @@ -921,4 +923,8 @@ class DayButtonBar extends HtmlElement { // $Log$ +// Revision 1.104 2005/01/24 23:15:16 uckelman +// The extra description for RelatedChanges was appearing in RecentChanges +// and PageHistory due to a bad test in _RecentChanges_HtmlFormatter. Fixed. +// // Revision 1.103 2004/12/15 17:45:09 rurban // fix box method Index: RelatedChanges.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/RelatedChanges.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -2 -b -p -d -r1.3 -r1.4 --- RelatedChanges.php 3 Jun 2004 18:58:27 -0000 1.3 +++ RelatedChanges.php 24 Jan 2005 23:15:27 -0000 1.4 @@ -11,4 +11,14 @@ rcs_id('$Id$'); require_once("lib/plugin/RecentChanges.php"); +class _RelatedChanges_HtmlFormatter +extends _RecentChanges_HtmlFormatter +{ + function description() { + return HTML::p(false, pre_description(), + fmt(" (to pages linked from \"%s\")",$this->_args['page'])); + } +} + + class WikiPlugin_RelatedChanges extends WikiPlugin_RecentChanges @@ -64,4 +74,30 @@ extends WikiPlugin_RecentChanges $this->format($this->getChanges($request->_dbi, $args), $args)); } + + function format ($changes, $args) { + global $WikiTheme; + $format = $args['format']; + + $fmt_class = $WikiTheme->getFormatter('RelatedChanges', $format); + if (!$fmt_class) { + if ($format == 'rss') + $fmt_class = '_RecentChanges_RssFormatter'; + elseif ($format == 'rss2') + $fmt_class = '_RecentChanges_Rss2Formatter'; + elseif ($format == 'rss091') { + include_once "lib/RSSWriter091.php"; + $fmt_class = '_RecentChanges_RssFormatter091'; + } + elseif ($format == 'sidebar') + $fmt_class = '_RecentChanges_SideBarFormatter'; + elseif ($format == 'box') + $fmt_class = '_RecentChanges_BoxFormatter'; + else + $fmt_class = '_RelatedChanges_HtmlFormatter'; + } + + $fmt = new $fmt_class($args); + return $fmt->format($changes); + } } @@ -95,4 +131,8 @@ class RelatedChangesRevisionIterator ext // $Log$ +// Revision 1.4 2005/01/24 23:15:27 uckelman +// The extra description for RelatedChanges was appearing in RecentChanges +// and PageHistory due to a bad test in _RecentChanges_HtmlFormatter. Fixed. +// // Revision 1.3 2004/06/03 18:58:27 rurban // days links requires action=RelatedChanges arg ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS: phpwiki/lib editpage.php,1.89,1.90: 00118, Reini Urban |
|---|---|
| Next by Date: | CVS: phpwiki/lib IniConfig.php,1.72,1.73: 00118, Reini Urban |
| Previous by Thread: | CVS: phpwiki/lib editpage.php,1.89,1.90i: 00118, Reini Urban |
| Next by Thread: | CVS: phpwiki/lib IniConfig.php,1.72,1.73: 00118, Reini Urban |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |