diff options
author | Johannes Winkelmann <jw@smts.ch> | 2006-08-10 16:33:53 +0000 |
---|---|---|
committer | Johannes Winkelmann <jw@smts.ch> | 2006-08-10 16:33:53 +0000 |
commit | 976a8c696245d5107143ab9637c5a7517d821713 (patch) | |
tree | 41c53ea218dc2c0766a9f71b8d9efaef60522422 | |
parent | 970e4962e27a0fedd482689fae8f6d8eb22bbdf1 (diff) | |
download | webtools-976a8c696245d5107143ab9637c5a7517d821713.tar.gz webtools-976a8c696245d5107143ab9637c5a7517d821713.tar.xz |
Generate a 'diff' link for wiki edits
-rwxr-xr-x | timeline/tlcacher.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/timeline/tlcacher.php b/timeline/tlcacher.php index 8e6ac59..2caeb99 100755 --- a/timeline/tlcacher.php +++ b/timeline/tlcacher.php @@ -186,6 +186,7 @@ if ($chline != "") { foreach ($wikiedits as $ed) { preg_match('/\[\[.*\]\] ./', $ed, $matches); $page = $matches[0]; + $page_diff = str_replace("]]", "?action=diff|diff]]", $page); preg_match('/by \[\[.*\]\]/', $ed, $matches); $user = $matches[0]; preg_match("/\=(.*)\=/s",$ed,$matches); @@ -197,7 +198,7 @@ if ($chline != "") { preg_match('/(..\:..)/',$date,$matches); $time = $matches[0]; $date = date("Y-m-d", $tstamp); - $description = "Wiki page $page edited $user"; + $description = "Wiki page $page edited $user ($page_diff)"; if ($tstamp > $last_wiki) { $events[] = array( 'cache_id' => $tstamp, 'tstamp' => $tstamp, 'icon' => $icon, 'date' => $date, 'time' => $time, 'user' => $user, 'description' => $description, 'notes' => $notes); |