From e049d911474155934bea1ca298842bf517c1d646 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 6 Jan 2015 13:21:22 -0800 Subject: [PATCH] INFRA-132 - CRM/PCP - phpcbf --- CRM/PCP/Controller/PCP.php | 1 - CRM/PCP/Form/Campaign.php | 4 +--- CRM/PCP/Form/Event.php | 4 ++-- CRM/PCP/Form/PCP.php | 4 ++-- CRM/PCP/Form/PCPAccount.php | 6 +++--- CRM/PCP/Page/PCP.php | 7 ++++--- CRM/PCP/Page/PCPInfo.php | 5 +---- 7 files changed, 13 insertions(+), 18 deletions(-) diff --git a/CRM/PCP/Controller/PCP.php b/CRM/PCP/Controller/PCP.php index e2fedad9f7..9e0ce154dc 100644 --- a/CRM/PCP/Controller/PCP.php +++ b/CRM/PCP/Controller/PCP.php @@ -53,7 +53,6 @@ class CRM_PCP_Controller_PCP extends CRM_Core_Controller { parent::__construct($title, $modal); - $this->_stateMachine = new CRM_PCP_StateMachine_PCP($this, $action); // create and instantiate the pages diff --git a/CRM/PCP/Form/Campaign.php b/CRM/PCP/Form/Campaign.php index 21b9fd14bb..24bcf2ca53 100644 --- a/CRM/PCP/Form/Campaign.php +++ b/CRM/PCP/Form/Campaign.php @@ -120,7 +120,7 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form { } $attrib = array('rows' => 8, 'cols' => 60); - $this->add('textarea', 'page_text', ts('Your Message'), null, false ); + $this->add('textarea', 'page_text', ts('Your Message'), NULL, FALSE ); $maxAttachments = 1; CRM_Core_BAO_File::buildAttachment($this, 'civicrm_pcp', $this->_pageId, $maxAttachments); @@ -227,7 +227,6 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form { $pcp = CRM_PCP_BAO_PCP::add($params, FALSE); - // add attachments as needed CRM_Core_BAO_File::formatAttachment($params, $params, @@ -267,7 +266,6 @@ class CRM_PCP_Form_Campaign extends CRM_Core_Form { $supporterName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $pcp->contact_id, 'display_name'); $this->assign('supporterName', $supporterName); - if ($this->_component == 'contribute') { $pageUrl = CRM_Utils_System::url('civicrm/contribute/transact', "reset=1&id={$pcpBlock->entity_id}", diff --git a/CRM/PCP/Form/Event.php b/CRM/PCP/Form/Event.php index 02ead9c237..9570b112ee 100644 --- a/CRM/PCP/Form/Event.php +++ b/CRM/PCP/Form/Event.php @@ -62,8 +62,8 @@ class CRM_PCP_Form_Event extends CRM_Event_Form_ManageEvent { $defaults = array(); if (isset($this->_id)) { - $title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title'); - CRM_Utils_System::setTitle(ts('Personal Campaign Page Settings (%1)', array(1 => $title))); + $title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title'); + CRM_Utils_System::setTitle(ts('Personal Campaign Page Settings (%1)', array(1 => $title))); $params = array('entity_id' => $this->_id, 'entity_table' => 'civicrm_event'); CRM_Core_DAO::commonRetrieve('CRM_PCP_DAO_PCPBlock', $params, $defaults); diff --git a/CRM/PCP/Form/PCP.php b/CRM/PCP/Form/PCP.php index bafc8bc570..1458f31e38 100644 --- a/CRM/PCP/Form/PCP.php +++ b/CRM/PCP/Form/PCP.php @@ -75,7 +75,6 @@ class CRM_PCP_Form_PCP extends CRM_Core_Form { $this->assign('context', $this->_context); - $session = CRM_Core_Session::singleton(); $context = $session->popUserContext(); $userID = $session->get('userID'); @@ -198,7 +197,8 @@ class CRM_PCP_Form_PCP extends CRM_Core_Form { * @return array list of errors to be posted back to the form * @static */ - public static function formRule($fields, $files, $form) {} + public static function formRule($fields, $files, $form) { + } /** * Process the form diff --git a/CRM/PCP/Form/PCPAccount.php b/CRM/PCP/Form/PCPAccount.php index 49744abe39..9c2f0fc1d0 100644 --- a/CRM/PCP/Form/PCPAccount.php +++ b/CRM/PCP/Form/PCPAccount.php @@ -40,7 +40,7 @@ class CRM_PCP_Form_PCPAccount extends CRM_Core_Form { /** - *Variable defined for Contribution Page Id + * Variable defined for Contribution Page Id * */ @@ -186,7 +186,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 +195,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, diff --git a/CRM/PCP/Page/PCP.php b/CRM/PCP/Page/PCP.php index 28ec1336c2..e8efea3723 100644 --- a/CRM/PCP/Page/PCP.php +++ b/CRM/PCP/Page/PCP.php @@ -91,12 +91,14 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic { 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"', 'title' => ts('Delete Personal Campaign Page'), ), - CRM_Core_Action::ENABLE => array('name' => ts('Enable'), + CRM_Core_Action::ENABLE => array( + 'name' => ts('Enable'), 'url' => 'civicrm/admin/pcp', 'qs' => 'action=enable&id=%%id%%', 'title' => ts('Enable'), ), - CRM_Core_Action::DISABLE => array('name' => ts('Disable'), + CRM_Core_Action::DISABLE => array( + 'name' => ts('Disable'), 'url' => 'civicrm/admin/pcp', 'qs' => 'action=disable&id=%%id%%', 'title' => ts('Disable'), @@ -176,7 +178,6 @@ class CRM_PCP_Page_PCP extends CRM_Core_Page_Basic { $this->_sortByCharacter = ''; } - $status = CRM_PCP_BAO_PCP::buildOptions('status_id', 'create'); $pcpSummary = $params = array(); diff --git a/CRM/PCP/Page/PCPInfo.php b/CRM/PCP/Page/PCPInfo.php index f92e7c598e..6e9f9cd38e 100644 --- a/CRM/PCP/Page/PCPInfo.php +++ b/CRM/PCP/Page/PCPInfo.php @@ -160,7 +160,7 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page { $hints = array( CRM_Core_Action::UPDATE => ts('Change the content and appearance of your page'), CRM_Core_Action::DETACH => ts('Send emails inviting your friends to support your campaign!'), - CRM_Core_Action::VIEW => ts('Copy this link to share directly with your network!'), + CRM_Core_Action::VIEW => ts('Copy this link to share directly with your network!'), CRM_Core_Action::BROWSE => ts('Update your personal contact information'), CRM_Core_Action::DISABLE => ts('De-activate the page (you can re-activate it later)'), CRM_Core_Action::ENABLE => ts('Activate the page (you can de-activate it later)'), @@ -207,7 +207,6 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page { $totalAmount = CRM_PCP_BAO_PCP::thermoMeter($this->_id); $achieved = round($totalAmount / $pcpInfo['goal_amount'] * 100, 2); - if ($pcpBlock->is_active == 1) { $linkTextUrl = CRM_Utils_System::url('civicrm/contribute/campaign', "action=add&reset=1&pageId={$pcpInfo['page_id']}&component={$pcpInfo['page_type']}", @@ -235,7 +234,6 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page { $endDate = CRM_Utils_Date::unixTime(CRM_Utils_Array::value('end_date', $pageInfo)); } - $now = time(); $validDate = TRUE; if ($startDate && $startDate >= $now) { @@ -265,7 +263,6 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page { $this->assign('parentURL', $parentUrl); - if ($validDate) { $contributionText = ts('Contribute Now'); -- 2.25.1