MTrackWeb/Wiki.php
authorAlan Knowles <alan@akbkhome.com>
Sun, 20 Mar 2011 05:20:40 +0000 (13:20 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 20 Mar 2011 05:20:40 +0000 (13:20 +0800)
MTrackWeb/Wiki.php

index 27c1062..c4424bf 100644 (file)
@@ -46,13 +46,8 @@ class MTrackWeb_Wiki extends MTrackWeb
          if (!$this->canEdit && $this->edit) {
             return HTML_FlexyFramework::run('Noperm');
         }
+        $this->hasHistory = $this->doc ? true: false;
         
-        if ($this->doc) {
-            
-            $this->hasHistory = true;
-        } else {
-            MTrackACL::requireAnyRights("wiki:$this->pi",   $this->edit ? 'modify' : 'read');
-        }
         // blank doc.. on edit..
         if ($this->doc === null && $this->edit) {
             $this->doc = new MTrack_Wiki_Item($this->pi);
@@ -66,7 +61,8 @@ class MTrackWeb_Wiki extends MTrackWeb
         if ($this->edit) {
           $this->title .= " (edit)";
         }
-        $this->canEdit = !$this->edit && MTrackACL::hasAnyRights("wiki:{$this->pi}", 'modify');
+        
+        $this->canEdit = $this->edit ? false $this->canEdit ; // if they are editing remove that permission..
        
  
         if ($this->doc && $this->doc->file) {