diff --git a/include/class.thread.php b/include/class.thread.php
index f1c6ac988fd06715631d52fa03604da7108045fa..075341c01e595657f386d75b90e0b04b02320a5b 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -2989,7 +2989,7 @@ implements TemplateVariable {
     }
 
     function asVar() {
-        return $this->getVar('complete');
+        return new ThreadEntries($this);
     }
 
     function getVar($name) {
@@ -3013,21 +3013,14 @@ implements TemplateVariable {
 
             break;
         case 'complete':
-            $content = '';
-            $thread = $this;
-            ob_start();
-            include INCLUDE_DIR.'client/templates/thread-export.tmpl.php';
-            $content = ob_get_contents();
-            ob_end_clean();
-            return $content;
-
+            return $this->asVar();
             break;
         }
     }
 
     static function getVarScope() {
       return array(
-        'complete' => __('Thread Correspondence'),
+        'complete' =>array('class' => 'ThreadEntries', 'desc' => __('Thread Correspondence')),
         'original' => array('class' => 'MessageThreadEntry', 'desc' => __('Original Message')),
         'lastmessage' => array('class' => 'MessageThreadEntry', 'desc' => __('Last Message')),
       );
@@ -3047,6 +3040,43 @@ implements TemplateVariable {
     }
 }
 
+class ThreadEntries {
+    var $thread;
+
+    function __construct($thread) {
+        $this->thread = $thread;
+    }
+
+    function asVar() {
+        return $this->getVar();
+    }
+
+    function getVar($name='') {
+
+        $order = '';
+        switch ($name) {
+        case 'reversed':
+            $order = '-';
+        default:
+            $content = '';
+            $thread = $this->thread;
+            ob_start();
+            include INCLUDE_DIR.'client/templates/thread-export.tmpl.php';
+            $content = ob_get_contents();
+            ob_end_clean();
+            return $content;
+            break;
+        }
+    }
+
+    static function getVarScope() {
+      return array(
+        'reversed' => sprintf('%s %s', __('Thread Correspondence'),
+            __('in reversed order')),
+      );
+    }
+}
+
 // Ticket thread class
 class TicketThread extends ObjectThread {
     static function create($ticket=false) {
diff --git a/include/client/templates/thread-export.tmpl.php b/include/client/templates/thread-export.tmpl.php
index 5914a88da94a48a5da28c31dd1685a4e2f438ae4..2ed2288d85d1344781ad195798946b1234277f29 100644
--- a/include/client/templates/thread-export.tmpl.php
+++ b/include/client/templates/thread-export.tmpl.php
@@ -12,7 +12,7 @@ AttachmentFile::objects()->filter(array(
             ))->all();
 
 $entries = $thread->getEntries();
-$entries->filter(array('type__in' => array_keys($entryTypes)));
+$entries->filter(array('type__in' => array_keys($entryTypes)))->order_by("{$order}id");;
 ?>
 <style type="text/css">
     div {font-family: sans-serif;}