MTrackWeb/File.php
authorAlan Knowles <alan@akbkhome.com>
Sat, 25 Jun 2011 08:07:23 +0000 (16:07 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sat, 25 Jun 2011 08:07:23 +0000 (16:07 +0800)
MTrackWeb/File.php

index 90288ab..9293c09 100644 (file)
@@ -199,6 +199,17 @@ class MTrackWeb_File extends MTrackWeb
                 require_once 'MTrack/SyntaxHighlight.php';
                 $contents = stream_get_contents($this->tmpfile);
                 $this->nlines = count(explode("\n", $contents));
+                
+                if (!empty($_REQUEST['markup'])) {
+                    // we do a late version call for markup.. 
+                    echo MTrack_SyntaxHighlight::highlightSource(
+                        $contents , null, $this->file->name
+                    );
+                    exit;
+                                       
+                }
+                
+                
                 $this->data =  htmlspecialchars($contents); /* MTrack_SyntaxHighlight::highlightSource(
                         $contents , null, $this->file->name
                    );