MTrackWeb/Wiki.php
authorAlan Knowles <alan@akbkhome.com>
Sun, 7 Aug 2011 07:34:40 +0000 (15:34 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 7 Aug 2011 07:34:40 +0000 (15:34 +0800)
MTrackWeb/Wiki.php

index a1d0317..2350d42 100644 (file)
@@ -4,7 +4,15 @@
 /**
  *  This is alot simpler now...
  *
- *  Mostly just dumps out raw text from files..
+ *  In our horrifically simple version...
+ *
+ *  We could just use a database, and go from there.
+ *  ... that looses the diff feature... although we can use the mtrack_change stuff....
+ *
+ *  ... That sounds alot better in our context as we can show data on the changelog..
+ *  -----> It will mean that the change log will have to honour our privacy settings..
+ *  
+ *  
  *
  *
  */
@@ -34,41 +42,10 @@ class MTrackWeb_Wiki extends MTrackWeb
             return;
         }
         $this->masterTemplate = 'wiki.html';
-        
-        
-        $this->edit = isset($_REQUEST['edit']) ? (int)$_REQUEST['edit'] : 0;
-        
-        $this->hasHistory = 0;
-        
-        
-        $this->doc = new MTrack_Wiki_Item($this->pi);
-         $this->canEdit = $this->hasPerm('MTrack.Wiki','E');
-        
-         // we might add more perms based on project later..
-        
-        if (!$this->canEdit && $this->edit) {
-            return HTML_FlexyFramework::run('Noperm');
-        }
-        
-        $this->hasHistory = $this->doc->file ? 1: 0;
-        
-        // blank doc.. on edit..
-        if ($this->doc->file === null && $this->edit) {
-            $this->doc = new MTrack_Wiki_Item($this->pi);
-            $this->doc->content = " = {$this->pi} =\n";
-        }
-         
+          
 
         /* now just render */
-
-        $this->title = $this->pi;
-        if ($this->edit) {
-          $this->title .= " (edit)";
-        }
         
-        $this->canEdit = $this->edit ? false : $this->canEdit ; // if they are editing remove that permission..
-       
  
         if ($this->doc->file) {
             $this->evt = $this->doc->file->getChangeEvent();