X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FPCP%2FForm%2FPCPAccount.php;h=9c4447f06c297c17114b7acfc1b169e49e30cee5;hb=87878ac8e6101fc5bed04f356c677b5f9ec54bc7;hp=4d05185bb8ac85c1e3b4592eee4e10d440b1a8db;hpb=a335f6b228626e3e1b2f1549c8ddcbb9232b3c6b;p=civicrm-core.git diff --git a/CRM/PCP/Form/PCPAccount.php b/CRM/PCP/Form/PCPAccount.php index 4d05185bb8..9c4447f06c 100644 --- a/CRM/PCP/Form/PCPAccount.php +++ b/CRM/PCP/Form/PCPAccount.php @@ -1,7 +1,7 @@ _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; @@ -119,7 +116,7 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { /** * @return array */ - function setDefaultValues() { + public function setDefaultValues() { $this->_defaults = array(); if ($this->_contactID) { foreach ($this->_fields as $name => $dontcare) { @@ -145,7 +142,6 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { * Build the form object * * @return void - * @access public */ public function buildQuickForm() { $id = CRM_PCP_BAO_PCP::getSupporterProfileId($this->_pageId, $this->_component); @@ -189,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)); } @@ -199,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, @@ -213,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, ); @@ -225,16 +221,17 @@ 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 - * @access public - * @static + * @return bool|array + * true if no errors, else array of errors */ - static function formRule($fields, $files, $self) { + public static function formRule($fields, $files, $self) { $errors = array(); foreach ($fields as $key => $value) { if (strpos($key, 'email-') !== FALSE && !empty($value)) { @@ -250,7 +247,6 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { /** * Process the form submission * - * @access public * * @return void */ @@ -295,4 +291,3 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { CRM_Contribute_BAO_Contribution_Utils::createCMSUser($params, $contactID, 'email'); } } -