<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
- function run() {
+ public function run() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
$this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
- CRM_Pledge_Page_Tab::setContext();
+ CRM_Pledge_Page_Tab::setContext($this);
if ($this->_action & CRM_Core_Action::UPDATE) {
$this->edit();
- // set page title
- CRM_Contact_Page_View::setTitle($this->_contactId);
}
else {
$pledgeId = CRM_Utils_Request::retrieve('pledgeId', 'Positive', $this);
$this->assign('pledgeId', $pledgeId);
$this->assign('contactId', $this->_contactId);
- // check if we can process credit card contribs
- CRM_Core_Payment::allowBackofficeCreditCard($this);
+ // check if we can process credit card contributions
+ $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());
// check is the user has view/edit signer permission
$permission = 'view';
* This function is called when action is update or new
*
* return null
- * @access public
*/
- function edit() {
+ public function edit() {
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Payment',
'Update Pledge Payment',
$this->_action
return $controller->run();
}
}
-