MTrackWeb/Ticket.php
authorAlan Knowles <alan@akbkhome.com>
Thu, 24 Mar 2011 11:43:19 +0000 (19:43 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 24 Mar 2011 11:43:19 +0000 (19:43 +0800)
MTrackWeb/Ticket.php

index 579b81f..7faec66 100644 (file)
@@ -384,45 +384,14 @@ class MTrackWeb_Ticket extends MTrackWeb
         }
         
     
-          $this->change_status = array();
-          $this->resolve_status = array();
-          if ($this->id) {
-         
-            // for coder's they can only change this ticke to certian states
-            
-            //print_r($groups);
-            // Nasty - I really do not like the acl code in this ...
-            require_once 'MTrack/TicketState.php';
-            
-            $ST = new MTrackTicketState;
-            $ST = $ST->enumerate();
-            //print_r($ST);
-            unset($ST['closed']);
-            unset($ST[$this->issue->status]);
            
-            $this->change_status = empty($ST) ? array() : array_keys($ST);
-            
-            $ac = MTrackAuth::getUserClass($this->authUser->userid);
-            //var_dump($ac);exit;
-// KLUDGE! - remove later...
-            if ($ac == 'admin') {
-                
-                $this->resolve_status= array('fixed');
-                $R = new MTrackResolution;
-                $resolutions = $R->enumerate();
-                unset($resolutions['fixed']);
-                
-                $this->resolve_status= array_keys($resolutions);
-                array_unshift($this->resolve_status, 'fixed');
-               // $html .= $this->mtrack_chg_status('action', 'resolve', 'Resolve as:', 'resolution', $resolutions, $this->issue );
-            } 
-
-           // } else {
-           //   $html .= mtrack_radio('action', 'reopen', $_POST['action']);
-           //   $html .= " <label for='reopen'>Reopen ticket</label><br>\n";
-           // }
+        //    unset($ST['closed']);
+        //    unset($ST[$this->issue->status]);
            
-        }
+        //    $this->change_status = empty($ST) ? array() : array_keys($ST);
+        
+        // admin can only change to 'fixed'?
+             
         $this->elements = HTML_Template_Flexy_Factory::fromArray($this->issue->toArray(), $this->elements);
         if (!empty($_POST)) {
             $this->elements = HTML_Template_Flexy_Factory::fromArray($_POST, $this->elements);