This patch allows a user to show changes since his last visit.
The information is stored in a cookie and kann be addressed
at wiki.pl?action=rc&sincelastvisit=1
Hacked by the teenagemutantninjaheroecoders - http://c0re.jp/
--- wiki.cgi.orig Wed Aug 29 14:37:51 2001
+++ wiki.cgi Wed Aug 29 15:53:23 2001
@@ -463,6 +463,14 @@
$fullHtml .= &WikiToHTML($Text{'text'});
$fullHtml .= "
\n" if (!&GetParam('embed', $EmbedWiki));
if (($id eq $RCName) || (T($RCName) eq $id) || (T($id) eq $RCName)) {
+
+ if (&GetParam("sincelastvisit", 0)) {
+ my $cookie1 = $q->cookie(-name => $CookieName . "-RC",
+ -value => time(),
+ -expires => '+60d');
+ print "Set-Cookie: $cookie1\r\n";
+ }
+
print $fullHtml;
&DoRc();
print "
\n" if (!&GetParam('embed', $EmbedWiki));
@@ -492,7 +500,10 @@
my $starttime = 0;
my $showbar = 0;
- if (&GetParam("from", 0)) {
+ if (&GetParam("sincelastvisit", 0)) {
+ $starttime = $q->cookie($CookieName."-RC");
+
+ } elsif (&GetParam("from", 0)) {
$starttime = &GetParam("from", 0);
print "" . Ts('Updates since %s', &TimeToText($starttime))
. "
\n";