fix warnings
[web.mtrack] / MTrackWeb.php
index d0e65e3..27a511a 100644 (file)
@@ -111,7 +111,7 @@ class MTrackWeb extends HTML_FlexyFramework_Page
         
         
         $ar = $this->userProjects();
-        //print_r($ar);
+         
         if (!isset($ar[$currentProject])) {
             $currentProject = false;
             $_SESSION[__CLASS__]['active_project_id'] = false;
@@ -156,16 +156,20 @@ class MTrackWeb extends HTML_FlexyFramework_Page
            
             $ar = $p->fetchAll('id', 'name');
         } else {
-            //DB_DAtaObject::debugLevel(1);
+            
+           // DB_DAtaObject::debugLevel(1);
             $p->applyFilters(array(), $this->authUser, $this);
             if (!$this->authUser->hasPerm('Core.Projects_All', 'S')) { 
                 $p->whereAdd("Projects.id in (SELECT ProjectDirectory.project_id FROM ProjectDirectory WHERE
                         person_id = ". $this->authUser->id . " and role != '')");
             }
+            /*
+             * SOME PROJECTS MIGHT NOT HAVE REPO's...
             $p->whereAdd('id in (SELECT distinct(project_id) FROM mtrack_repos)');
+            */
             // $pd->whereAdd("role != ''");
             
-            $p->orderBy('Projects.name ASC');
+            $p->orderBy('core_project.name ASC');
             unset($p->client_id); // default projects serach enforces this..
             $ar = $p->fetchAll('id', 'name');
         }
@@ -192,7 +196,7 @@ class MTrackWeb extends HTML_FlexyFramework_Page
     
     function getAuthUser()
     {
-        $u = DB_DataObject::factory('core_project');
+        $u = DB_DataObject::factory('core_person');
         if (!$u->isAuth()) {
             return false;
         }
@@ -272,7 +276,7 @@ class MTrackWeb extends HTML_FlexyFramework_Page
         return HTML_FlexyFramework::run('Wiki/Today'); 
  
     }
-    function post()
+    function post($request)
     {
         header("Status: 404 Not Found");
         die("invalid post request? ");