MTrackWeb/File.php
authorAlan Knowles <alan@akbkhome.com>
Sun, 3 Apr 2011 03:15:43 +0000 (11:15 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 3 Apr 2011 03:15:43 +0000 (11:15 +0800)
MTrackWeb/File.php

index eada89c..e373178 100644 (file)
@@ -171,7 +171,9 @@ class MTrackWeb_File extends MTrackWeb
                 fseek($t, 0);
                 
                 //$this->ann = array_values($this->file->annotate());
-                // echo '<PRE>';print_R($this->ann);exit;
+               // echo '<PRE>';print_R($this->ann);exit;
+
+                
                 $this->ann = array();
                 if ($this->ann === 'DELETED') {
                     $this->deleted = true;
@@ -184,8 +186,20 @@ class MTrackWeb_File extends MTrackWeb
                 require_once 'MTrack/SyntaxHighlight.php';
                 $this->data =  MTrack_SyntaxHighlight::highlightSource(
                         stream_get_contents($this->tmpfile), null, $this->file->name
-                    );
+                   );
                     //var_dump($this->data);
+                for ($i =0; $i < count(explode("\n", $this->data)); $i++ ) {
+                    $this->ann[] = (object) array(
+                        'rev' => '',
+                        'lineno' => ($i + 1)
+                    );
+                }
+                
+                   <td class='changeset'><a class='changesetlink browse-link'  href="{baseURL}/Changeset/{repo.displayName()}/{l.rev}">{l.rev}</a></td>
+        <td class='user'>{l.changebyToHtml(link):h}</td>
+        <td class='line'><a name='l{l.lineno}'></a><a href='#l{l.lineno}'>{l.lineno}</a></td>
+
+
     
             default:
                 break; // download only..