예제 #1
0
 function preProcess()
 {
     $this->_entityTable = $this->get('entityTable');
     $this->_entityId = $this->get('entityId');
     $this->_id = $this->get('id');
     $this->_parentId = CRM_Utils_Array::value('parentId', $_GET, 0);
     if ($this->_parentId) {
         $this->assign('parentId', $this->_parentId);
     }
     if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
         CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
     }
     $this->setPageTitle($this->_parentId ? ts('Comment') : ts('Note'));
 }
예제 #2
0
 function preProcess()
 {
     $this->_entityTable = $this->get('entityTable');
     $this->_entityId = $this->get('entityId');
     $this->_id = $this->get('id');
     $this->_parentId = CRM_Utils_Array::value('parentId', $_GET, 0);
     if ($this->_parentId) {
         $this->assign('parentId', $this->_parentId);
     }
     if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
         CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
     }
     // set title to "Note - "+Contact Name
     $displayName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_entityId, 'display_name');
     $pageTitle = 'Note - ' . $displayName;
     $this->assign('pageTitle', $pageTitle);
 }
예제 #3
0
파일: Note.php 프로젝트: hguru/224Civi
 function preProcess()
 {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
         CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
     }
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
     $this->assign('contactId', $this->_contactId);
     // check logged in url permission
     CRM_Contact_Page_View::checkUserPermission($this);
     // set page title
     CRM_Contact_Page_View::setTitle($this->_contactId);
     $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
     CRM_Utils_System::setTitle(ts('Notes for') . ' ' . $displayName);
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->assign('action', $this->_action);
 }
예제 #4
0
 function preProcess()
 {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     require_once 'CRM/Core/BAO/Note.php';
     if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
         CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
     }
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, true);
     $this->assign('contactId', $this->_contactId);
     // check logged in url permission
     require_once 'CRM/Contact/Page/View.php';
     CRM_Contact_Page_View::checkUserPermission($this);
     // set page title
     CRM_Contact_Page_View::setTitle($this->_contactId);
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse');
     $this->assign('action', $this->_action);
 }