Merge pull request #4859 from eileenmcnaughton/CRM-15771-fix
[civicrm-core.git] / CRM / Pledge / Page / Payment.php
index 6d5ab08dc20fcbb688869e69a07b68b32d66e4b4..bee1d2284afbdde11889e33cd0bbd09758c9ad34 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -38,9 +38,8 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
    * 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);
 
@@ -53,8 +52,6 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
 
     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);
@@ -65,7 +62,7 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
       $this->assign('pledgeId', $pledgeId);
       $this->assign('contactId', $this->_contactId);
 
-      // check if we can process credit card contribs
+      // check if we can process credit card contributions
       $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments());
 
       // check is the user has view/edit signer permission
@@ -83,9 +80,8 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
    * 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
@@ -99,4 +95,3 @@ class CRM_Pledge_Page_Payment extends CRM_Core_Page {
     return $controller->run();
   }
 }
-