summaryrefslogtreecommitdiff
path: root/core/models/task.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-03-09 07:28:19 +0000
committerBharat Mediratta <bharat@menalto.com>2009-03-09 07:28:19 +0000
commite37faa0008df38088a55932786955e68ee1f955f (patch)
tree78fc0df349fb5a55335c81f2608c202eee9fcd5a /core/models/task.php
parent622358ebc8eba1cfd17f8e7cbb5c8557fd7c4bee (diff)
More tasks cleanup.
Don't join through to the users table; that won't work in embedded mode. Instead, add Tasks_Model::owner() that calls user::lookup() and refer to the object directly in the view. Add Admin_Maintenance:remove_finished_tasks() so that we can easily do old task cleanup. Hide Running / Finished sections if there aren't any running or finished tasks.
Diffstat (limited to 'core/models/task.php')
-rw-r--r--core/models/task.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/models/task.php b/core/models/task.php
index 85713419..0255a6ad 100644
--- a/core/models/task.php
+++ b/core/models/task.php
@@ -34,7 +34,7 @@ class Task_Model extends ORM {
return parent::__get($column);
}
}
-
+
public function get($key, $default=null) {
$context = unserialize($this->context);
if (array_key_exists($key, $context)) {
@@ -56,4 +56,8 @@ class Task_Model extends ORM {
}
return parent::save();
}
+
+ public function owner() {
+ return user::lookup($this->owner_id);
+ }
} \ No newline at end of file