//format the survey response data.
$this->_formatSurveyResponseData($rows);
-
// custom code to alter rows
$entryFound = FALSE;
foreach ($rows as $rowNum => $row) {
$entryFound = TRUE;
}
-
if (array_key_exists('civicrm_activity_contact_contact_id', $row)) {
$rows[$rowNum]['civicrm_activity_contact_contact_id'] = CRM_Utils_Array::value($row['civicrm_activity_contact_contact_id'],
CRM_Campaign_BAO_Survey::getInterviewers()
$entryFound = TRUE;
}
-
if (array_key_exists('civicrm_activity_survey_id', $row)) {
$rows[$rowNum]['civicrm_activity_survey_id'] = CRM_Utils_Array::value($row['civicrm_activity_survey_id'],
CRM_Campaign_BAO_Survey::getSurveys()
'dataType' => $response->data_type,
'htmlType' => $response->html_type,
'required' => TRUE,
- 'alias' => ($response->data_type == 'ContactReference') ?
- $this->_columns[$resTable]['alias'] .
+ 'alias' => ($response->data_type == 'ContactReference') ? $this->_columns[$resTable]['alias'] .
'_contact' : $this->_columns[$resTable]['alias'],
'dbAlias' => $this->_columns[$resTable]['alias'] . '.' .
$response->column_name,
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::stateProvince( ), ),
),
-*/
+ */
),
'civicrm_phone' => array(
'dao' => 'CRM_Core_DAO_Phone',
foreach ($statistics['filters'] as $id => $value) {
if ($value['title'] == 'Case Type') {
$statistics['filters'][$id]['value'] = 'Is ' .
- $this->case_types[substr($statistics['filters'][$id]
- ['value'], -3, -2
+ $this->case_types[substr($statistics['filters'][$id]['value'], -3, -2
)];
}
}
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value("operatorType", $field) &
- CRM_Report_Form::OP_DATE
+ if (CRM_Utils_Array::value("operatorType", $field) & CRM_Report_Form::OP_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
),
),
'filters' => array(
- 'activity_date_time' => //'default' => 'this.month',
+ 'activity_date_time' => //'default' => 'this.month',
array(
'operatorType' => CRM_Report_Form::OP_DATE,
),
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) &
- CRM_Report_Form::OP_DATE
+ if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) &
- CRM_Report_Form::OP_DATE
+ if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
$entryFound = TRUE;
}
-
// skip looking further in rows, if first row itself doesn't
// have the column we need
if (!$entryFound) {
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) &
- CRM_Report_Form::OP_DATE
+ if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
parent::__construct();
$logTypes = array();
- foreach ( array_keys($this->_logTables) as $table ) {
+ foreach ( array_keys($this->_logTables) as $table ) {
$type = $this->getLogType($table);
$logTypes[$type] = $type;
}
CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $row['log_civicrm_entity_altered_contact_id']);
$row['log_civicrm_entity_altered_contact_hover'] = ts("Go to contact summary");
$entity = $this->getEntityValue($row['log_civicrm_entity_id'], $row['log_civicrm_entity_log_type'], $row['log_civicrm_entity_log_date']);
- if ($entity)
+ if ($entity) {
$row['log_civicrm_entity_altered_contact'] = $row['log_civicrm_entity_altered_contact'] . " [{$entity}]";
+ }
}
$row['altered_by_contact_display_name_link'] = CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $row['log_civicrm_entity_log_user_id']);
$row['altered_by_contact_display_name_hover'] = ts("Go to contact summary");
if ($newAction = $this->getEntityAction($row['log_civicrm_entity_id'],
$row['log_civicrm_entity_log_conn_id'],
$row['log_civicrm_entity_log_type'],
- CRM_Utils_Array::value('log_civicrm_entity_log_action', $row)))
+ CRM_Utils_Array::value('log_civicrm_entity_log_action', $row))) {
$row['log_civicrm_entity_log_action'] = $newAction;
+ }
$row['log_civicrm_entity_log_type'] = $this->getLogType($row['log_civicrm_entity_log_type']);
if ($this->cid) {
$q .= '&cid=' . $this->cid;
}
- $q .= (!empty($row['log_civicrm_entity_altered_contact'])) ?
- '&alteredName='.$row['log_civicrm_entity_altered_contact'] : '';
- $q .= (!empty($row['altered_by_contact_display_name'])) ?
- '&alteredBy='.$row['altered_by_contact_display_name'] : '';
- $q .= (!empty($row['log_civicrm_entity_log_user_id'])) ?
- '&alteredById='.$row['log_civicrm_entity_log_user_id'] : '';
+ $q .= (!empty($row['log_civicrm_entity_altered_contact'])) ? '&alteredName='.$row['log_civicrm_entity_altered_contact'] : '';
+ $q .= (!empty($row['altered_by_contact_display_name'])) ? '&alteredBy='.$row['altered_by_contact_display_name'] : '';
+ $q .= (!empty($row['log_civicrm_entity_log_user_id'])) ? '&alteredById='.$row['log_civicrm_entity_log_user_id'] : '';
$url1 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}&snippet=4§ion=2&layout=overlay", FALSE, TRUE);
$url2 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}§ion=2", FALSE, TRUE);
/**
* @param null $logTable
*/
- public function from( $logTable = null ) {
- static $entity = null;
+ public function from($logTable = NULL) {
+ static $entity = NULL;
if ( $logTable ) {
$entity = $logTable;
}
$detail = $this->_logTables[$entity];
$tableName = CRM_Utils_Array::value('table_name', $detail, $entity);
$clause = CRM_Utils_Array::value('entity_table', $detail);
- $clause = $clause ? "AND entity_log_civireport.entity_table = 'civicrm_contact'" : null;
+ $clause = $clause ? "AND entity_log_civireport.entity_table = 'civicrm_contact'" : NULL;
$joinClause = "
INNER JOIN civicrm_contact modified_contact_civireport
if (!empty($detail['joins'])) {
$clause = CRM_Utils_Array::value('entity_table', $detail);
- $clause = $clause ? "AND fk_table.entity_table = 'civicrm_contact'" : null;
+ $clause = $clause ? "AND fk_table.entity_table = 'civicrm_contact'" : NULL;
$joinClause = "
INNER JOIN `{$this->loggingDB}`.{$detail['joins']['table']} fk_table ON {$detail['joins']['join']}
INNER JOIN civicrm_contact modified_contact_civireport
!empty($this->_params['fields'][$fieldName])
) {
switch ($fieldName) {
- case 'credit_accounting_code' :
+ case 'credit_accounting_code':
$select[] = " CASE
WHEN {$this->_aliases['civicrm_financial_trxn']}.from_financial_account_id IS NOT NULL
THEN {$this->_aliases['civicrm_financial_account']}_credit_1.accounting_code
ELSE {$this->_aliases['civicrm_financial_account']}_credit_2.accounting_code
END AS civicrm_financial_account_credit_accounting_code ";
break;
- case 'amount' :
+
+ case 'amount':
$select[] = " CASE
WHEN {$this->_aliases['civicrm_entity_financial_trxn']}_item.entity_id IS NOT NULL
THEN {$this->_aliases['civicrm_entity_financial_trxn']}_item.amount
ELSE {$this->_aliases['civicrm_entity_financial_trxn']}.amount
END AS civicrm_entity_financial_trxn_amount ";
break;
- case 'credit_name' :
+
+ case 'credit_name':
$select[] = " CASE
WHEN {$this->_aliases['civicrm_financial_trxn']}.from_financial_account_id IS NOT NULL
THEN {$this->_aliases['civicrm_financial_account']}_credit_1.name
ELSE {$this->_aliases['civicrm_financial_account']}_credit_2.name
END AS civicrm_financial_account_credit_name ";
break;
- default :
+
+ default:
$select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
break;
}
list($alias, $rest) = explode('.', $clause);
$orderClause[] = $aliases[$alias] . "_" . $rest;
}
- $orderBy = (!empty($orderClause)) ?
- "ORDER BY " . implode(', ', $orderClause) : '';
+ $orderBy = (!empty($orderClause)) ? "ORDER BY " . implode(', ', $orderClause) : '';
}
// 6. show result set from temp table 3
}
else {
// other aliases are higher level; roll count into their total
- $totals[$key] = (array_key_exists($key, $totals)) ?
- $totals[$key] + $dao->ct : $dao->ct;
+ $totals[$key] = (array_key_exists($key, $totals)) ? $totals[$key] + $dao->ct : $dao->ct;
if ($showsumcontribs) {
- $sumcontribs[$key] = array_key_exists($key, $sumcontribs) ?
- $sumcontribs[$key] + $dao->sumcontribs : $dao->sumcontribs;
+ $sumcontribs[$key] = array_key_exists($key, $sumcontribs) ? $sumcontribs[$key] + $dao->sumcontribs : $dao->sumcontribs;
}
}
}
if ($fieldName == 'this_year' || $fieldName == 'other_year') {
continue;
}
- elseif (CRM_Utils_Array::value('type', $field) &
- CRM_Utils_Type::T_DATE
+ elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
return;
}
-
$last_primary = NULL;
foreach ($rows as $rowNum => $row) {
// Highlight primary contact and amount row
//replace retionship id by relationship name
if (array_key_exists('civicrm_relationship_relationship_type_id', $row)) {
if ($value = $row['civicrm_relationship_relationship_type_id']) {
- $rows[$rowNum]['civicrm_relationship_relationship_type_id'] = $this->relationTypes[
- $value . '_' . $type];
+ $rows[$rowNum]['civicrm_relationship_relationship_type_id'] = $this->relationTypes[$value . '_' . $type];
$entryFound = TRUE;
}
}
),
),
)
- + $this->addAddressFields()
- + array(
+ + $this->addAddressFields()
+ + array(
'civicrm_contribution' => array(
'dao' => 'CRM_Contribute_DAO_Contribution',
'fields' => array(
$current_year = $this->_params['yid_value'];
$previous_year = $current_year - 1;
-
foreach ($this->_columns as $tableName => $table) {
if (array_key_exists('fields', $table)) {
WHERE " . self::fiscalYearOffset('contri.receive_date') .
" = $previous_year AND contri.is_test = 0)";
}
- elseif (CRM_Utils_Array::value('type', $field) &
- CRM_Utils_Type::T_DATE
+ elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
}
// 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',
'frequency_unit' => array(
'title' => ts('Frequency Unit'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Core_OptionGroup::values('recur_frequency_units'),
+ 'options' => CRM_Core_OptionGroup::values('recur_frequency_units'),
'type' => CRM_Utils_Type::T_INT,
),
'frequency_interval' => array(
parent::__construct();
}
public function getTemplateName() {
- return 'CRM/Report/Form.tpl' ;
+ return 'CRM/Report/Form.tpl';
}
public function from() {
// installments * intervals using the mysql date_add function, along
// with the interval unit (e.g. DATE_ADD(start_date, INTERVAL 12 * 1 MONTH)
$date_suffixes = array('relative', 'from', 'to');
- while(list(,$suffix) = each($date_suffixes)) {
+ while(list(, $suffix) = each($date_suffixes)) {
// Check to see if the user wants to search by calculated date.
if(!empty($this->_params['calculated_end_date_' . $suffix])) {
// The calculated date field is in use - spring into action
if ($value = CRM_Utils_Array::value('civicrm_contribution_recur_contribution_status_id', $row)) {
$rows[$rowNum]['civicrm_contribution_recur_contribution_status_id'] = $contributionStatus[$value];
}
-
+
if ($value = CRM_Utils_Array::value('civicrm_contribution_recur_amount', $row)) {
- $rows[$rowNum]['civicrm_contribution_recur_amount'] = CRM_Utils_Money::format($rows[$rowNum]['civicrm_contribution_recur_amount'],$rows[$rowNum]['civicrm_contribution_recur_currency']);
+ $rows[$rowNum]['civicrm_contribution_recur_amount'] = CRM_Utils_Money::format($rows[$rowNum]['civicrm_contribution_recur_amount'], $rows[$rowNum]['civicrm_contribution_recur_currency']);
}
-
+
}
}
}
unset($clauses['receive_date1'], $clauses['total_amount1']);
}
- $whereClause = !empty($clauses) ?
- "WHERE " . implode(' AND ', $clauses) : '';
+ $whereClause = !empty($clauses) ? "WHERE " . implode(' AND ', $clauses) : '';
if ($replaceAliasWith) {
$whereClause = str_replace($this->_aliases['civicrm_contribution'], $replaceAliasWith, $whereClause);
}
}
- $this->_where = !empty($clauses) ?
- "WHERE " . implode(' AND ', $clauses) : '';
+ $this->_where = !empty($clauses) ? "WHERE " . implode(' AND ', $clauses) : '';
}
/**
),
'civicrm_financial_type' => array(
'dao' => 'CRM_Financial_DAO_FinancialType',
- 'fields' => array('financial_type' => NULL,),
+ 'fields' => array('financial_type' => NULL),
'filters' => array(
'id' => array(
'name' => 'id',
),
'civicrm_financial_type' => array(
'dao' => 'CRM_Financial_DAO_FinancialType',
- 'fields' => array('financial_type' => NULL,),
+ 'fields' => array('financial_type' => NULL),
'grouping' => 'contri-fields',
'group_bys' => array(
'financial_type' => array('title' => ts('Financial Type')),
'dao' => 'CRM_Contribute_DAO_Contribution',
//'bao' => 'CRM_Contribute_BAO_Contribution',
'fields' => array(
- 'contribution_source' => array('title' => ts('Source'),),
+ 'contribution_source' => array('title' => ts('Source')),
'currency' => array(
'required' => TRUE,
'no_display' => TRUE,
),
),
)
- + $this->addAddressFields()
- + array(
+ + $this->addAddressFields()
+ + array(
'civicrm_contribution' => array(
'dao' => 'CRM_Contribute_DAO_Contribution',
'fields' => array(
self::fiscalYearOffset('contri.receive_date') .
" = {$this->_params['yid_value']} AND contri.is_test = 0 )";
}
- elseif (CRM_Utils_Array::value('type', $field) &
- CRM_Utils_Type::T_DATE
+ elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
$from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
),
),
)
- + $this->getAddressColumns()
- + array(
+ + $this->getAddressColumns()
+ + array(
'civicrm_contribution' => array(
'dao' => 'CRM_Contribute_DAO_Contribution',
'fields' => array(
$this->limit();
-
//set the variable value rank, rows = 0
$setVariable = " SET @rows:=0, @rank=0 ";
CRM_Core_DAO::singleValueQuery($setVariable);
//if pageId is greator than last page then display last page.
if ((($pageId * self::ROW_COUNT_LIMIT) - 1) > $this->_rowsFound) {
- $pageId = ceil((float)$this->_rowsFound / (float)self::ROW_COUNT_LIMIT);
+ $pageId = ceil((float) $this->_rowsFound / (float) self::ROW_COUNT_LIMIT);
$this->set(CRM_Utils_Pager::PAGE_ID, $pageId);
}
$this->_limit = ($pageId - 1) * self::ROW_COUNT_LIMIT;
$entryFound = TRUE;
}
-
// skip looking further in rows, if first row itself doesn't
// have the column we need
if (!$entryFound) {
),
);
-
$this->_options = array(
'blank_column_begin' => array(
'title' => ts('Blank column at the Begining'),
// build query
$sql = $this->buildQuery(TRUE);
-
// build array of result based on column headers. This method also allows
// modifying column headers before using it to build result set i.e $rows.
$rows = array();
'title' => ts('Price Field Value Label'),
),
),
- 'group_bys' => //note that we have a requirement to group by label such that all 'Promo book' lines
+ 'group_bys' => //note that we have a requirement to group by label such that all 'Promo book' lines
// are grouped together across price sets but there may be a separate need to group
// by id so that entries in one price set are distinct from others. Not quite sure what
// to call the distinction for end users benefit
"({$values['percentage']}%)";
}
$totalAmt = implode(', ', $totalAmount);
- $count = (boolean) CRM_Utils_Array::value('count', $values, 0) ?
- $values['count'] . " ({$values['percentage']}%)" : '';
+ $count = (boolean) CRM_Utils_Array::value('count', $values, 0) ? $values['count'] . " ({$values['percentage']}%)" : '';
$row[] = array(
'civicrm_grant_total_grants' => $field,
'civicrm_grant_count' => $count,
$currencies = CRM_Core_PseudoConstant::get('CRM_Grant_DAO_Grant', 'currency', array('labelColumn' => 'symbol'));
$currency = $currencies[$values['civicrm_grant_currency']];
-
if (!$customData) {
if (!isset($grantStatistics['value'][$fieldValue]['currency'][$currency])
||
$form->add('text',
'row_count',
ts('Limit Dashboard Results'),
- array('maxlength' => 64,
+ array(
+ 'maxlength' => 64,
'size' => 5
)
);
// For now we only providing drilldown for one primary detail report only. In future this could be multiple reports
foreach ($form->_drilldownReport as $reportUrl => $drillLabel) {
$instanceList = CRM_Report_Utils_Report::getInstanceList($reportUrl);
- if (count($instanceList) > 1)
+ if (count($instanceList) > 1) {
$form->add('select', 'drilldown_id', $drillLabel, array('' => ts('- select -')) + $instanceList);
+ }
break;
}
$navigationDefaults = array();
if (!isset($defaults['permission'])){
- $permissions = array_flip(CRM_Core_Permission::basicPermissions( ));
- $defaults['permission'] = $permissions['CiviReport: access CiviReport'];
+ $permissions = array_flip(CRM_Core_Permission::basicPermissions( ));
+ $defaults['permission'] = $permissions['CiviReport: access CiviReport'];
}
$config = CRM_Core_Config::singleton();
}
}
-
if (!empty($this->_params['charts'])) {
$select[] = "COUNT({$this->_aliases['civicrm_mailing_event_bounce']}.id) as civicrm_mailing_bounce_count";
$this->_columnHeaders["civicrm_mailing_bounce_count"]['title'] = ts('Bounce Count');
'bar_3dChart' => 'Bar Chart',
);
- public $campaignEnabled = False;
+ public $campaignEnabled = FALSE;
/**
*
* @return array
*/
public static function getChartCriteria() {
- return array('count' => array('civicrm_mailing_event_delivered_delivered_count' => ts('Delivered'),
+ return array(
+ 'count' => array(
+ 'civicrm_mailing_event_delivered_delivered_count' => ts('Delivered'),
'civicrm_mailing_event_bounce_bounce_count' => ts('Bounce'),
'civicrm_mailing_event_opened_open_count' => ts('Opened'),
'civicrm_mailing_event_trackable_url_open_click_count' => ts('Clicks'),
'civicrm_mailing_event_unsubscribe_unsubscribe_count' => ts('Unsubscribe'),
),
- 'rate' => array('civicrm_mailing_event_delivered_accepted_rate' => ts('Accepted Rate'),
+ 'rate' => array(
+ 'civicrm_mailing_event_delivered_accepted_rate' => ts('Accepted Rate'),
'civicrm_mailing_event_bounce_bounce_rate' => ts('Bounce Rate'),
'civicrm_mailing_event_opened_open_rate' => ts('Confirmed Open Rate'),
'civicrm_mailing_event_trackable_url_open_CTR' => ts('Click through Rate'),
$criterias = self::getChartCriteria();
- $chartInfo = array('legend' => ts('Mail Summary'),
+ $chartInfo = array(
+ 'legend' => ts('Mail Summary'),
'xname' => ts('Mailing'),
'yname' => ts('Statistics'),
'xLabelAngle' => 20,
$entryFound = TRUE;
}
-
// skip looking further in rows, if first row itself doesn't
// have the column we need
if (!$entryFound) {
if (!empty($this->_noRepeats) && $this->_outputMode != 'csv') {
$repeatFound = FALSE;
-
$display_flag = NULL;
if (array_key_exists('civicrm_contact_id', $row)) {
if ($cid = $row['civicrm_contact_id']) {
}
}
-
if (array_key_exists('civicrm_membership_membership_type_id', $row)) {
if ($value = $row['civicrm_membership_membership_type_id']) {
$rows[$rowNum]['civicrm_membership_membership_type_id'] = CRM_Member_PseudoConstant::membershipType($value, FALSE);
ON {$this->_aliases['civicrm_membership_status']}.id =
{$this->_aliases['civicrm_membership']}.status_id ";
-
//used when address field is selected
if ($this->_addressField) {
$this->_from .= "
$this->_columns['civicrm_membership']['group_bys']['campaign_id'] = array('title' => ts('Campaign'));
}
-
$this->_groupFilter = TRUE;
$this->_currencyColumn = 'civicrm_contribution_currency';
parent::__construct();
$entryFound = TRUE;
}
-
// If using campaigns, convert campaign_id to campaign title
if (array_key_exists('civicrm_membership_campaign_id', $row)) {
if ($value = $row['civicrm_membership_campaign_id']) {
),
),
)
- + $this->getAddressColumns(array('group_by' => FALSE))
- + $this->getPhoneColumns();
+ + $this->getAddressColumns(array('group_by' => FALSE))
+ + $this->getPhoneColumns();
// If we have a campaign, build out the relevant elements
$this->_tagFilter = TRUE;
if ($campaignEnabled && !empty($this->activeCampaigns)) {
/**
* @param $shortCuts
*/
- public function creatNewShortcut(&$shortCuts) {}
+ public function creatNewShortcut(&$shortCuts) {
+ }
}
* Name of component if report list is filtered
*
* @var string
- **/
+ **/
protected $_compName = NULL;
/**
* ID of component if report list is filtered
*
* @var int
- **/
+ **/
protected $_compID = NULL;
/**
* ID of parent report template if list is filtered by template
*
* @var int
- **/
+ **/
protected $_ovID = NULL;
* Title of parent report template if list is filtered by template
*
* @var string
- **/
+ **/
protected $_title = NULL;
/**
case 'nnll':
$defaults["{$fieldName}_op"] = $fieldOP;
break;
+
case 'in':
case 'notin':
case 'mhas':
*/
public static function getNextUrl($urlValue, $query = 'reset=1', $absolute = FALSE, $instanceID = NULL, $drilldownReport = array()) {
if ($instanceID) {
- $drilldownInstanceID = false;
- if (array_key_exists($urlValue, $drilldownReport))
+ $drilldownInstanceID = FALSE;
+ if (array_key_exists($urlValue, $drilldownReport)) {
$drilldownInstanceID = CRM_Core_DAO::getFieldValue('CRM_Report_DAO_ReportInstance', $instanceID, 'drilldown_id', 'id');
+ }
- if (!$drilldownInstanceID)
+ if (!$drilldownInstanceID) {
$drilldownInstanceID = self::getInstanceIDForValue($urlValue);
+ }
if ($drilldownInstanceID) {
return CRM_Utils_System::url("civicrm/report/instance/{$drilldownInstanceID}",
* @return int|null|string
*/
public static function getInstanceCount($optionVal) {
- if (empty($optionVal)) return 0;
+ if (empty($optionVal)) { return 0;
+ }
$sql = "
SELECT count(inst.id)