+<?php
+if (!$User->admin('edit')) {
+ require '403.inc.html';
+ return;
+}
+
+$hash = ltrim($Page->path, '/');
+if (!$hash) {
+ return TRUE;
+}
+
+print "<h2>Wijzigingen in $hash</h2>\n";
+
+$gitcmd = "git show ".$hash;
+$log = popen($gitcmd, 'r');
+if (!$log or strpos(fgets($log), "commit $hash") !== 0) {
+ $Page->place['warn'] = "Kon inhoud niet ophalen met <code>$gitcmd</code>";
+ return;
+}
+
+print '<pre>';
+while ( $line = fgets($log) ) {
+ print htmlspecialchars($line);
+}
+print "</pre>\n";
+
+pclose($log);
+return;