Merge pull request #4971 from kurund/batch-16
[civicrm-core.git] / CRM / PCP / Form / PCPAccount.php
index c82b8b075d29848755dfec513929d669c0bcc9e6..9c4447f06c297c17114b7acfc1b169e49e30cee5 100644 (file)
@@ -40,8 +40,7 @@
 class CRM_PCP_Form_PCPAccount extends CRM_Core_Form {
 
   /**
-   *Variable defined for Contribution Page Id
-   *
+   * Variable defined for Contribution Page Id
    */
 
   public $_pageId = NULL;
@@ -64,12 +63,12 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form {
 
 
   public function preProcess() {
-    $session          = CRM_Core_Session::singleton();
-    $config           = CRM_Core_Config::singleton();
-    $this->_action    = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE);
-    $this->_pageId    = CRM_Utils_Request::retrieve('pageId', 'Positive', $this);
+    $session = CRM_Core_Session::singleton();
+    $config = CRM_Core_Config::singleton();
+    $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE);
+    $this->_pageId = CRM_Utils_Request::retrieve('pageId', 'Positive', $this);
     $this->_component = CRM_Utils_Request::retrieve('component', 'String', $this);
-    $this->_id        = CRM_Utils_Request::retrieve('id', 'Positive', $this);
+    $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
 
     if (!$this->_pageId && $config->userFramework == 'Joomla' && $config->userFrameworkFrontend) {
       $this->_pageId = $this->_id;
@@ -186,7 +185,6 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form {
       }
     }
 
-
     if ($this->_component == 'contribute') {
       $this->assign('campaignName', CRM_Contribute_PseudoConstant::contributionPage($this->_pageId));
     }
@@ -196,7 +194,8 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form {
 
     if ($this->_single) {
       $button = array(
-        array('type' => 'next',
+        array(
+          'type' => 'next',
           'name' => ts('Save'),
           'spacing' => '         ',
           'isDefault' => TRUE,
@@ -210,7 +209,7 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form {
     else {
       $button[] = array(
         'type' => 'next',
-        'name' => ts('Continue >>'),
+        'name' => ts('Continue'),
         'spacing' => '         ',
         'isDefault' => TRUE,
       );
@@ -222,13 +221,15 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form {
   /**
    * Global form rule
    *
-   * @param array $fields the input form values
-   * @param array $files the uploaded files if any
+   * @param array $fields
+   *   The input form values.
+   * @param array $files
+   *   The uploaded files if any.
    * @param $self
    *
    *
-   * @return true if no errors, else array of errors
-   * @static
+   * @return bool|array
+   *   true if no errors, else array of errors
    */
   public static function formRule($fields, $files, $self) {
     $errors = array();