| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
//format multi-select group and contact types.
foreach (array(
'group',
- 'contact_type'
+ 'contact_type',
) as $param) {
$paramValue = CRM_Utils_Array::value($param, $params);
if ($paramValue) {
foreach (array(
'campaign_survey_id',
'survey_interviewer_id',
- 'campaign_search_voter_for'
+ 'campaign_search_voter_for',
) as $fld) {
$voterClauseParams[$fld] = CRM_Utils_Array::value($fld, $params);
}
$iFilteredTotal = $iTotal;
+ header('Content-Type: application/json');
echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
CRM_Utils_System::civiExit();
}
array(
'value' => '',
'title' => ts('- select -'),
- )
+ ),
);
foreach ($campaigns as $value => $title) {
$class = NULL;
array(
'value' => '',
'title' => ts('- select -'),
- )
+ ),
);
foreach ($campGroups as $grpId => $title) {
$groups[] = array(
/**
* Retrieve campaigns as for campaign dashboard.
*
- **/
+ */
public function campaignList() {
//get the search criteria params.
$searchParams = explode(',', CRM_Utils_Array::value('searchCriteria', $_POST));
'sort',
'offset',
'rowCount',
- 'sortOrder'
+ 'sortOrder',
) as $sortParam) {
$params[$sortParam] = $$sortParam;
}
$iFilteredTotal = $iTotal;
+ header('Content-Type: application/json');
echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
CRM_Utils_System::civiExit();
}
/**
* Retrieve survey for survey dashboard.
*
- **/
+ */
public function surveyList() {
//get the search criteria params.
$searchParams = explode(',', CRM_Utils_Array::value('searchCriteria', $_POST));
'sort',
'offset',
'rowCount',
- 'sortOrder'
+ 'sortOrder',
) as $sortParam) {
$params[$sortParam] = $$sortParam;
}
$iFilteredTotal = $iTotal;
+ header('Content-Type: application/json');
echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
CRM_Utils_System::civiExit();
}
/**
* Retrieve petitions for petition dashboard.
*
- **/
+ */
public function petitionList() {
//get the search criteria params.
$searchParams = explode(',', CRM_Utils_Array::value('searchCriteria', $_POST));
'sort',
'offset',
'rowCount',
- 'sortOrder'
+ 'sortOrder',
) as $sortParam) {
$params[$sortParam] = $$sortParam;
}
$iFilteredTotal = $iTotal;
+ header('Content-Type: application/json');
echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
CRM_Utils_System::civiExit();
}
+
}