+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
/**
//append breadcrumb to survey dashboard.
if (CRM_Campaign_BAO_Campaign::accessCampaign()) {
$url = CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey');
- CRM_Utils_System::appendBreadCrumb(array(array('title' => ts('Survey(s)'), 'url' => $url)));
+ CRM_Utils_System::appendBreadCrumb([['title' => ts('Survey(s)'), 'url' => $url]]);
}
//set the form title.
CRM_Campaign_BAO_Query::buildSearchForm($this);
//build the array of all search params.
- $this->_searchParams = array();
+ $this->_searchParams = [];
foreach ($this->_elements as $element) {
$name = $element->_attributes['name'];
if ($name == 'qfKey') {
$this->set('searchParams', $this->_searchParams);
$this->assign('searchParams', json_encode($this->_searchParams));
- $defaults = array();
+ $defaults = [];
if (!$this->_surveyId) {
$this->_surveyId = key(CRM_Campaign_BAO_Survey::getSurveys(TRUE, TRUE));
}
public function validateIds() {
- $errorMessages = array();
+ $errorMessages = [];
//check for required permissions.
if (!CRM_Core_Permission::check('manage campaign') &&
!CRM_Core_Permission::check('administer CiviCampaign') &&
$surveys = CRM_Campaign_BAO_Survey::getSurveys();
if (empty($surveys)) {
- $errorMessages[] = ts("Oops. It looks like no surveys have been created. <a href='%1'>Click here to create a new survey.</a>", array(1 => CRM_Utils_System::url('civicrm/survey/add', 'reset=1&action=add')));
+ $errorMessages[] = ts("Oops. It looks like no surveys have been created. <a href='%1'>Click here to create a new survey.</a>", [1 => CRM_Utils_System::url('civicrm/survey/add', 'reset=1&action=add')]);
}
if ($this->_force && !$this->_surveyId) {