From 9ba478983e97b8ac6a9493f788dce7d440498e33 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sat, 2 Sep 2017 09:19:23 +0200
Subject: [PATCH] load text in source action. fixes #2110

---
 inc/Action/Source.php | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/inc/Action/Source.php b/inc/Action/Source.php
index fa3c88a4f..9b03fe98b 100644
--- a/inc/Action/Source.php
+++ b/inc/Action/Source.php
@@ -16,9 +16,21 @@ class Source extends AbstractAction {
         return AUTH_READ;
     }
 
+    /** @inheritdoc */
+    public function preProcess() {
+        global $TEXT;
+        global $INFO;
+        global $ID;
+        global $REV;
+
+        if($INFO['exists']) {
+            $TEXT = rawWiki($ID, $REV);
+        }
+    }
+
     /** @inheritdoc */
     public function tplContent() {
-        html_edit(); // FIXME is this correct? Should we split it off completely?
+        html_edit();
     }
 
 }
-- 
GitLab