X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=CRM%2FReport%2FForm%2FContribute%2FOrganizationSummary.php;h=b7a766d54d7dc9e02def55d8b48c425e23f6445f;hb=fa65697b919b2f7c294e9dfed039d52135dfe84b;hp=d58ddbff8d116d6d68ad6c341094b78db9627c3b;hpb=87d422669cee2e65706fe72821613ad846cd0adb;p=civicrm-core.git diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index d58ddbff8d..b7a766d54d 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -1,8 +1,7 @@ enableComponents); @@ -211,11 +208,11 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { parent::__construct(); } - function preProcess() { + public function preProcess() { parent::preProcess(); } - function select() { + public function select() { $this->_columnHeaders = $select = array(); foreach ($this->_columns as $tableName => $table) { if (array_key_exists('fields', $table)) { @@ -249,7 +246,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { $this->_select = "SELECT " . implode(', ', $select) . " "; } - function from() { + public function from() { $this->_from = NULL; $this->_from = " @@ -276,7 +273,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { } } - function where() { + public function where() { $clauses = array(); foreach ($this->_columns as $tableName => $table) { if (array_key_exists('filters', $table)) { @@ -325,11 +322,11 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { } } - function groupBy() { + public function groupBy() { $this->_groupBy = " GROUP BY {$this->_aliases['civicrm_relationship']}.$this->orgContact, {$this->_aliases['civicrm_relationship']}.$this->otherContact , {$this->_aliases['civicrm_contribution']}.id, {$this->_aliases['civicrm_relationship']}.relationship_type_id "; } - function orderBy() { + public function orderBy() { $this->_orderBy = " ORDER BY {$this->_aliases['civicrm_contact_organization']}.organization_name, {$this->_aliases['civicrm_relationship']}.$this->orgContact, {$this->_aliases['civicrm_contact']}.sort_name, {$this->_aliases['civicrm_relationship']}.$this->otherContact"; } @@ -338,7 +335,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { * * @return array */ - function statistics(&$rows) { + public function statistics(&$rows) { $statistics = parent::statistics($rows); //hack filter display for relationship type @@ -352,7 +349,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { return $statistics; } - function postProcess() { + public function postProcess() { $this->beginPostProcess(); $this->buildACLClause(array($this->_aliases['civicrm_contact'], $this->_aliases['civicrm_contact_organization'])); $sql = $this->buildQuery(TRUE); @@ -366,7 +363,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { /** * Set variables to be accessed by API and form layer in processing */ - function beginPostProcessCommon() { + public function beginPostProcessCommon() { $getRelationship = $this->_params['relationship_type_id_value']; $type = substr($getRelationship, -3); $this->relationshipId = intval((substr($getRelationship, 0, strpos($getRelationship, '_')))); @@ -380,7 +377,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { } } - function validRelationships() { + public function validRelationships() { $this->relationTypes = $relationTypes = array(); $params = array('contact_type_b' => 'Organization', 'version' => 3); @@ -412,7 +409,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { /** * @param array $rows */ - function alterDisplay(&$rows) { + public function alterDisplay(&$rows) { // custom code to alter rows $type = substr($this->_params['relationship_type_id_value'], -3); @@ -458,8 +455,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { } // convert Organization display name to links - if (array_key_exists('civicrm_contact_organization_organization_name', $row) && !empty($rows[$rowNum] - ['civicrm_contact_organization_organization_name']) && + if (array_key_exists('civicrm_contact_organization_organization_name', $row) && !empty($rows[$rowNum]['civicrm_contact_organization_organization_name']) && array_key_exists('civicrm_contact_organization_id', $row) ) { $url = CRM_Utils_System::url('civicrm/contact/view', @@ -566,4 +562,3 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { } } } -