/** * query if editable for current user */ static function getEditableById($id) { if ($e = Effort::getById(intval($id))) { if ($p = Project::getById($e->project)) { if ($p->validateEditItem($e)) { return $e; } } } return NULL; }
function render_tr(&$obj, $style = "") { global $PH; $str = ""; if (isset($obj->name)) { if ($effort = Effort::getById($obj->id)) { $str = $PH->getLink('effortView', $effort->name, array('effort' => $effort->id)); } } print "<td><b>{$str}</b></td>"; }