From: Alan Knowles Date: Thu, 24 Mar 2011 06:03:39 +0000 (+0800) Subject: MTrackWeb.php X-Git-Url: http://git.roojs.org/?p=web.mtrack;a=commitdiff_plain;h=5f68f6e8e7b450d6fb166e517a975d720342944a MTrackWeb.php --- diff --git a/MTrackWeb.php b/MTrackWeb.php index 5b4d654e..ed536307 100644 --- a/MTrackWeb.php +++ b/MTrackWeb.php @@ -76,6 +76,8 @@ class MTrackWeb extends HTML_FlexyFramework_Page function currentProject() { + // we do need the option for me to look at all projects... + $p = DB_DataObject::factory('Projects'); $ar = array(); if ($this->authUser) { @@ -116,14 +118,7 @@ class MTrackWeb extends HTML_FlexyFramework_Page $this->elements['active_project_id'] = new HTML_Template_Flexy_Element(); $this->elements['active_project_id']->setOptions($ar); - if (empty($_SESSION[__CLASS__]['active_project_id']) || - !isset($ar[$_SESSION[__CLASS__]['active_project_id']])) - { - $p = DB_DataObject::factory('Projects'); - - $p->get('code', '*PUBLIC'); - $_SESSION[__CLASS__]['active_project_id'] = $p->id; - } + $this->elements['active_project_id']->setValue( $_SESSION[__CLASS__]['active_project_id']);