php8
[web.mtrack] / MTrackWeb / Projects.php
index a615265..0de9013 100644 (file)
@@ -18,12 +18,12 @@ class MTrackWeb_Projects extends MTrackWeb
     
     //function getAuth-- inherit
     
-    function get() {
+    function get($pi='') {
         
         
         $kv = $this->userProjects();
         $ret = array();
-        foreach($kv as $kv) {
+        foreach($kv as $k=>$v) {
             $ret[] = array('id'=>$k, 'name' => $v);
         }
         $this->jdata($ret); 
@@ -36,9 +36,13 @@ class MTrackWeb_Projects extends MTrackWeb
      * - permission updates 
      *
      */
-    function post()
+    function post($id)
     {
-         
+          if (isset($id)) {
+            $this->currentProject($id);
+            return $this->jok($this->currentProject());
+        }
+        
         
         
     }