diff options
author | wei <> | 2006-07-28 06:24:40 +0000 |
---|---|---|
committer | wei <> | 2006-07-28 06:24:40 +0000 |
commit | 994065ffd524ade2db3de900226143f5123c5fb1 (patch) | |
tree | 35d760954194fdafe7a32e0c227265ec6112e974 /demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php | |
parent | 5fc75a5f53fa07971b604c5318da5bf07379ef89 (diff) |
Update time-tracker
Diffstat (limited to 'demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php')
-rw-r--r-- | demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php b/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php index a134289c..28611c3c 100644 --- a/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php +++ b/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php @@ -88,21 +88,24 @@ class LogTimeEntry extends TPage if(!$this->IsValid)
return;
- $entry = new TimeEntry;
- $entry->CreatorUserName = $this->User->Name;
- $category = new Category;
- $category->ID = $this->category->SelectedValue;
- $entry->Category = $category;
- $entry->Description = $this->description->Text;
- $entry->Duration = floatval($this->hours->Text);
- $entry->ReportDate = $this->day->TimeStamp;
- $entry->Username = $this->projectMembers->SelectedItem->Text;
-
- $this->hours->Text = '';
- $this->description->Text = '';
-
- $this->getTimeEntryDao()->addNewTimeEntry($entry);
- $this->showTimeSheet();
+ if($this->projectMembers->SelectedItem)
+ {
+ $entry = new TimeEntry;
+ $entry->CreatorUserName = $this->User->Name;
+ $category = new Category;
+ $category->ID = $this->category->SelectedValue;
+ $entry->Category = $category;
+ $entry->Description = $this->description->Text;
+ $entry->Duration = floatval($this->hours->Text);
+ $entry->ReportDate = $this->day->TimeStamp;
+ $entry->Username = $this->projectMembers->SelectedItem->Text;
+
+ $this->hours->Text = '';
+ $this->description->Text = '';
+
+ $this->getTimeEntryDao()->addNewTimeEntry($entry);
+ $this->showTimeSheet();
+ }
}
}
|