diff --git a/inc/changelog.php b/inc/changelog.php
index dfcd1f241f0076530acadc4085f7bdebbc9f4dd3..d2ad23c0877775a94ea1bf3f51b04b863d5b622f 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -689,7 +689,7 @@ abstract class ChangeLog {
             $revs1 = array_slice($revs1, max($index - floor($max/2), 0), $max);
         }
 
-        return array($revs1, $revs2);
+        return array(array_reverse($revs1), array_reverse($revs2));
     }
 
     /**
diff --git a/inc/html.php b/inc/html.php
index ce5da488bd6952eb8c5405110508632e18eb5114..3cce6ceab276e9529d8429eb092d4781f82f557e 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1225,11 +1225,11 @@ function html_diff($text='',$intro=true,$type=null){
         }
 
         $l_index = array_search($l_rev, $l_revs);
-        $l_prev = $l_revs[$l_index - 1];
-        $l_next = $l_revs[$l_index + 1];
+        $l_prev = $l_revs[$l_index + 1];
+        $l_next = $l_revs[$l_index - 1];
         $r_index = array_search($r_rev, $r_revs);
-        $r_prev = $r_revs[$r_index - 1];
-        $r_next = $r_revs[$r_index + 1];
+        $r_prev = $r_revs[$r_index + 1];
+        $r_next = $r_revs[$r_index - 1];
 
         if($l_prev) {
             html_diff_navigationlink($type, '←← ', $l_prev, $r_prev);