From 2e608c527514d5fb03eb88c8da1c101f231d5736 Mon Sep 17 00:00:00 2001
From: Gerrit Uitslag <klapinklapin@gmail.com>
Date: Sat, 15 Feb 2014 20:41:09 +0100
Subject: [PATCH] reverse revisions display order

---
 inc/changelog.php | 2 +-
 inc/html.php      | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/inc/changelog.php b/inc/changelog.php
index dfcd1f241..d2ad23c08 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 ce5da488b..3cce6ceab 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);
-- 
GitLab