function processView() { $this->_notes = $this->_getNotesToShow(array_get($_REQUEST, 'assignee')); $this->_reassigning = $GLOBALS['user_system']->havePerm(PERM_BULKNOTE) && !empty($_REQUEST['reassigning']); if ($this->_reassigning && !empty($_POST['reassignments_submitted'])) { $dummy_note = new Abstract_Note(); foreach ($this->_notes as $id => $note) { $dummy_note->populate($id, $note); $dummy_note->setValue('assignee', $_POST['note_' . $id . '_assignee']); $dummy_note->save(); $dummy_note->releaseLock(); } add_message(_("Assignments Saved")); $this->_reassigning = FALSE; // these will have changed $this->_notes = $this->_getNotesToShow(); } }
</td> <td class="nowrap"><i class="icon-<?php echo $icon; ?> "></i> <?php echo ents($notee_name); ?> </td> <td><?php echo ents($note['subject']); ?> </td> <td class="nowrap"> <?php if ($reassigning) { $fake_note->populate($id, $note); if ($fake_note->haveLock() || $fake_note->canAcquireLock()) { $fake_note->acquireLock(); $fake_note->printFieldInterface('assignee', 'note_' . $id . '_'); } else { $fake_note->printFieldValue('assignee'); echo '<p class="alert alert-error">This note is locked by another user and cannot be edited at this time.</p>'; } } else { echo ents($note['assignee_fn'] . ' ' . $note['assignee_ln']); } ?> </td> <td class="nowrap"><?php echo format_date($note['action_date']); ?>