From e37faa0008df38088a55932786955e68ee1f955f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 9 Mar 2009 07:28:19 +0000 Subject: 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. --- core/models/task.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/models') 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 -- cgit v1.2.3