php8
[web.mtrack] / MTrackWeb / Milestone.php
index 1f96c31..f70fcc9 100644 (file)
@@ -28,7 +28,7 @@ class MTrackWeb_Milestone extends MTrackWeb
             return;
         }
         $m = DB_DataObject::factory('mtrack_milestone');
-        if (!$m->get($pi) || $m->project_id != $this->currentProject()) {
+        if (!$m->get($this->id) || $m->project_id != $this->currentProject()) {
             $this->jerr("invalid milestone id");
         }
 
@@ -61,7 +61,7 @@ class MTrackWeb_Milestone extends MTrackWeb
         }
         
         
-        if ($m->id &&   !$m->hasPerm('MTrack.Issue','E')   ) {
+        if ($m->id &&   !$this->hasPerm('MTrack.Issue','E')   ) {
             $this->jerr('Permission denied = no rights to edit milestones', array('noperm' => true));
             return HTML_FlexyFramework::run('Noperm');
         }