summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Winkelmann <jw@smts.ch>2006-08-10 16:33:53 +0000
committerJohannes Winkelmann <jw@smts.ch>2006-08-10 16:33:53 +0000
commit976a8c696245d5107143ab9637c5a7517d821713 (patch)
tree41c53ea218dc2c0766a9f71b8d9efaef60522422
parent970e4962e27a0fedd482689fae8f6d8eb22bbdf1 (diff)
downloadwebtools-976a8c696245d5107143ab9637c5a7517d821713.tar.gz
webtools-976a8c696245d5107143ab9637c5a7517d821713.tar.xz
Generate a 'diff' link for wiki edits
-rwxr-xr-xtimeline/tlcacher.php3
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);

Generated by cgit