';
@@ -489,12 +659,31 @@
print '';
}
+ $checked = false;
+
foreach($revisions as $rev){
$date = date($conf['dformat'],$rev);
$info = getRevisionInfo($ID,$rev,true);
print ($info['type']==='e') ? '
';
+ print ''."\n";
}
print '';
+ if ($revisions) {
+ print '
';
$last = $first + $conf['recent'];
if ($first > 0) {
@@ -812,17 +1006,53 @@
require_once(DOKU_INC.'inc/DifferenceEngine.php');
global $ID;
global $REV;
+ global $REV2;
global $lang;
global $conf;
- if($text){
+ // get the filetime of the current revision
+ // might use this for allowing the RSS feed to show diffs of current to old
+ $filetime = filemtime(wikiFN($ID));
+
+ if( $REV == $filetime ){
+ //print 'Filetime matched, using current
';
+ $REV = '';
+ }
+
+ if( $REV2 == $filetime ){
+ //print 'Filetime matched, using current
';
+ $REV2 = '';
+ }
+
+ if($text){ // diff for conflicts
$df = new Diff(explode("\n",htmlspecialchars(rawWiki($ID,''))),
explode("\n",htmlspecialchars(cleanText($text))));
$left = '
'.
$ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).''.
$lang['current'];
$right = $lang['yours'];
- }else{
+ }elseif($REV && $REV2){ // diff between versions
+ $df = new Diff(explode("\n",htmlspecialchars(rawWiki($ID,$REV2))),
+ explode("\n",htmlspecialchars(rawWiki($ID,$REV))));
+
+ $left = '
'.
+ $ID.' '.date($conf['dformat'],$REV2).'';
+
+ $right = '
'.
+ $ID.' '.date($conf['dformat'],$REV).'';
+
+ }elseif($REV2){ // diff between current and REV2
+ $df = new Diff(explode("\n",htmlspecialchars(rawWiki($ID,$REV2))),
+ explode("\n",htmlspecialchars(rawWiki($ID,$REV))));
+
+ $left = '
'.
+ $ID.' '.date($conf['dformat'],$REV2).'';
+
+ $right = '
'.
+ $ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).' '.
+ $lang['current'];
+
+ }else{
if($REV){
$r = $REV;
}else{
@@ -846,6 +1076,7 @@
$ID.' '.date($conf['dformat'],@filemtime(wikiFN($ID))).' '.
$lang['current'];
}
+
$tdf = new TableDiffFormatter();
if($intro) print p_locale_xhtml('diff');
?>