From 753f8fa315dc52497e3058e9782ff45dead59117 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Mon, 30 Jun 2008 17:10:06 +0000 Subject: [PATCH] Fix a bug where people who had completed requests under "My submissions" would get a fatal error. --- .../requests/views/scripts/index/index.phtml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/application/modules/requests/views/scripts/index/index.phtml b/application/modules/requests/views/scripts/index/index.phtml index e0cf8736..74d89467 100644 --- a/application/modules/requests/views/scripts/index/index.phtml +++ b/application/modules/requests/views/scripts/index/index.phtml @@ -132,14 +132,16 @@ $action = $requestData['action']; $comments = $requestData['comments']; $viewTime = $requestData['viewTime']; - $decisions = array('_null' => '--Decision--') + $action->getResultStatusStrings($request, $this->user); - $vote = '_null'; - if ($requestData['vote']) { - if ($requestData['vote']->getApprovalAction() == $action->getId()) { - $vote = $requestData['vote']->getVote(); - } else { - $decisions['_null'] = 'PREVOTE: ' . $requestData['vote']->getVote(); - } + if ($request->isSubmitterAttentionRequired()) { + $decisions = array('_null' => '--Decision--') + $action->getResultStatusStrings($request, $this->user); + $vote = '_null'; + if ($requestData['vote']) { + if ($requestData['vote']->getApprovalAction() == $action->getId()) { + $vote = $requestData['vote']->getVote(); + } else { + $decisions['_null'] = 'PREVOTE: ' . $requestData['vote']->getVote(); + } + } } ?> <tr <?php echo (++$row % 2 ? 'class="odd"' : ''); ?>> @@ -149,7 +151,7 @@ </td> <td><?php echo htmlentities($originalCourse->getCollege(), NULL, 'UTF-8'); ?></td> <td><?php echo htmlentities($request->getType(), NULL, 'UTF-8'); ?></td> - <td><?php echo htmlentities($action->getCurrentApprovalBody(), NULL, 'UTF-8'); ?></td> + <td><?php if($action) { echo htmlentities($action->getCurrentApprovalBody(), NULL, 'UTF-8'); } ?></td> <td> <?php if ($request->isSubmitterAttentionRequired()) { -- GitLab