diff --git a/CRM/Campaign/BAO/Campaign.php b/CRM/Campaign/BAO/Campaign.php index b8d6b1c4c6a1..b613455438fa 100644 --- a/CRM/Campaign/BAO/Campaign.php +++ b/CRM/Campaign/BAO/Campaign.php @@ -278,160 +278,6 @@ public static function isCampaignEnable(): bool { return self::isComponentEnabled(); } - /** - * Retrieve campaigns for dashboard. - * - * @param array $params - * @param bool $onlyCount - * - * @return array|int - */ - public static function getCampaignSummary($params = [], $onlyCount = FALSE) { - $campaigns = []; - - //build the limit and order clause. - $limitClause = $orderByClause = $lookupTableJoins = NULL; - if (!$onlyCount) { - $sortParams = [ - 'sort' => 'start_date', - 'offset' => 0, - 'rowCount' => 10, - 'sortOrder' => 'desc', - ]; - foreach ($sortParams as $name => $default) { - if (!empty($params[$name])) { - $sortParams[$name] = $params[$name]; - } - } - - //need to lookup tables. - $orderOnCampaignTable = TRUE; - if ($sortParams['sort'] === 'status') { - $orderOnCampaignTable = FALSE; - $lookupTableJoins = " - LEFT JOIN civicrm_option_value status ON ( status.value = campaign.status_id OR campaign.status_id IS NULL ) -INNER JOIN civicrm_option_group grp ON ( status.option_group_id = grp.id AND grp.name = 'campaign_status' )"; - $orderByClause = "ORDER BY status.label {$sortParams['sortOrder']}"; - } - elseif ($sortParams['sort'] === 'campaign_type') { - $orderOnCampaignTable = FALSE; - $lookupTableJoins = " - LEFT JOIN civicrm_option_value campaign_type ON ( campaign_type.value = campaign.campaign_type_id - OR campaign.campaign_type_id IS NULL ) -INNER JOIN civicrm_option_group grp ON ( campaign_type.option_group_id = grp.id AND grp.name = 'campaign_type' )"; - $orderByClause = "ORDER BY campaign_type.label {$sortParams['sortOrder']}"; - } - elseif ($sortParams['sort'] === 'isActive') { - $sortParams['sort'] = 'is_active'; - } - if ($orderOnCampaignTable) { - $orderByClause = "ORDER BY campaign.{$sortParams['sort']} {$sortParams['sortOrder']}"; - } - $orderByClause = ($orderByClause) ? $orderByClause . ", campaign.id {$sortParams['sortOrder']}" : $orderByClause; - $limitClause = "LIMIT {$sortParams['offset']}, {$sortParams['rowCount']}"; - } - - //build the where clause. - $queryParams = $where = []; - if (!empty($params['id'])) { - $where[] = "( campaign.id = %1 )"; - $queryParams[1] = [$params['id'], 'Positive']; - } - if (!empty($params['name'])) { - $where[] = "( campaign.name LIKE %2 )"; - $queryParams[2] = ['%' . trim($params['name']) . '%', 'String']; - } - if (!empty($params['title'])) { - $where[] = "( campaign.title LIKE %3 )"; - $queryParams[3] = ['%' . trim($params['title']) . '%', 'String']; - } - if (!empty($params['start_date'])) { - $startDate = CRM_Utils_Date::processDate($params['start_date']); - $where[] = "( campaign.start_date >= %4 OR campaign.start_date IS NULL )"; - $queryParams[4] = [$startDate, 'String']; - } - if (!empty($params['end_date'])) { - $endDate = CRM_Utils_Date::processDate($params['end_date'], '235959'); - $where[] = "( campaign.end_date <= %5 OR campaign.end_date IS NULL )"; - $queryParams[5] = [$endDate, 'String']; - } - if (!empty($params['description'])) { - $where[] = "( campaign.description LIKE %6 )"; - $queryParams[6] = ['%' . trim($params['description']) . '%', 'String']; - } - if (!empty($params['campaign_type_id'])) { - $where[] = "( campaign.campaign_type_id IN ( %7 ) )"; - $queryParams[7] = [implode(',', (array) $params['campaign_type_id']), 'CommaSeparatedIntegers']; - } - if (!empty($params['status_id'])) { - $where[] = "( campaign.status_id IN ( %8 ) )"; - $queryParams[8] = [implode(',', (array) $params['status_id']), 'CommaSeparatedIntegers']; - } - if (array_key_exists('is_active', $params)) { - $active = "( campaign.is_active = 1 )"; - if (!empty($params['is_active'])) { - $active = "campaign.is_active = 0"; - } - $where[] = $active; - } - $whereClause = NULL; - if (!empty($where)) { - $whereClause = ' WHERE ' . implode(" \nAND ", $where); - } - - $properties = [ - 'id', - 'name', - 'title', - 'start_date', - 'end_date', - 'status_id', - 'is_active', - 'description', - 'campaign_type_id', - ]; - - $selectClause = ' -SELECT campaign.id as id, - campaign.name as name, - campaign.title as title, - campaign.is_active as is_active, - campaign.status_id as status_id, - campaign.end_date as end_date, - campaign.start_date as start_date, - campaign.description as description, - campaign.campaign_type_id as campaign_type_id'; - if ($onlyCount) { - $selectClause = 'SELECT COUNT(*)'; - } - $fromClause = 'FROM civicrm_campaign campaign'; - - $query = "{$selectClause} {$fromClause} {$lookupTableJoins} {$whereClause} {$orderByClause} {$limitClause}"; - - //in case of only count. - if ($onlyCount) { - return (int) CRM_Core_DAO::singleValueQuery($query, $queryParams); - } - - $campaign = CRM_Core_DAO::executeQuery($query, $queryParams); - while ($campaign->fetch()) { - foreach ($properties as $property) { - $campaigns[$campaign->id][$property] = $campaign->$property; - } - } - - return $campaigns; - } - - /** - * Get the campaign count. - * - * @return int - */ - public static function getCampaignCount(): int { - return (int) CRM_Core_DAO::singleValueQuery('SELECT COUNT(*) FROM civicrm_campaign'); - } - /** * Get Campaigns groups. * diff --git a/CRM/Campaign/BAO/Petition.php b/CRM/Campaign/BAO/Petition.php index d75e2b612f09..887370953fa3 100644 --- a/CRM/Campaign/BAO/Petition.php +++ b/CRM/Campaign/BAO/Petition.php @@ -34,136 +34,6 @@ public function __construct() { $this->cookieExpire = (1 * 60 * 60 * 24); } - /** - * Get Petition Details for dashboard. - * - * @param array $params - * @param bool $onlyCount - * - * @return array|int - */ - public static function getPetitionSummary($params = [], $onlyCount = FALSE) { - //build the limit and order clause. - $limitClause = $orderByClause = $lookupTableJoins = NULL; - if (!$onlyCount) { - $sortParams = [ - 'sort' => 'created_date', - 'offset' => 0, - 'rowCount' => 10, - 'sortOrder' => 'desc', - ]; - foreach ($sortParams as $name => $default) { - if (!empty($params[$name])) { - $sortParams[$name] = $params[$name]; - } - } - - //need to lookup tables. - $orderOnPetitionTable = TRUE; - if ($sortParams['sort'] == 'campaign') { - $orderOnPetitionTable = FALSE; - $lookupTableJoins = ' - LEFT JOIN civicrm_campaign campaign ON ( campaign.id = petition.campaign_id )'; - $orderByClause = "ORDER BY campaign.title {$sortParams['sortOrder']}"; - } - elseif ($sortParams['sort'] == 'activity_type') { - $orderOnPetitionTable = FALSE; - $lookupTableJoins = " - LEFT JOIN civicrm_option_value activity_type ON ( activity_type.value = petition.activity_type_id - OR petition.activity_type_id IS NULL ) -INNER JOIN civicrm_option_group grp ON ( activity_type.option_group_id = grp.id AND grp.name = 'activity_type' )"; - $orderByClause = "ORDER BY activity_type.label {$sortParams['sortOrder']}"; - } - elseif ($sortParams['sort'] == 'isActive') { - $sortParams['sort'] = 'is_active'; - } - if ($orderOnPetitionTable) { - $orderByClause = "ORDER BY petition.{$sortParams['sort']} {$sortParams['sortOrder']}"; - } - $limitClause = "LIMIT {$sortParams['offset']}, {$sortParams['rowCount']}"; - } - - //build the where clause. - $queryParams = $where = []; - - //we only have activity type as a - //difference between survey and petition. - $petitionTypeID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Petition'); - if ($petitionTypeID) { - $where[] = "( petition.activity_type_id = %1 )"; - $queryParams[1] = [$petitionTypeID, 'Positive']; - } - if (!empty($params['title'])) { - $where[] = "( petition.title LIKE %2 )"; - $queryParams[2] = ['%' . trim($params['title']) . '%', 'String']; - } - if (!empty($params['campaign_id'])) { - $where[] = '( petition.campaign_id = %3 )'; - $queryParams[3] = [$params['campaign_id'], 'Positive']; - } - $whereClause = NULL; - if (!empty($where)) { - $whereClause = ' WHERE ' . implode(" \nAND ", $where); - } - - $selectClause = ' -SELECT petition.id as id, - petition.title as title, - petition.is_active as is_active, - petition.result_id as result_id, - petition.is_default as is_default, - petition.campaign_id as campaign_id, - petition.activity_type_id as activity_type_id'; - - if ($onlyCount) { - $selectClause = 'SELECT COUNT(*)'; - } - $fromClause = 'FROM civicrm_survey petition'; - - $query = "{$selectClause} {$fromClause} {$whereClause} {$orderByClause} {$limitClause}"; - - if ($onlyCount) { - return (int) CRM_Core_DAO::singleValueQuery($query, $queryParams); - } - - $petitions = []; - $properties = [ - 'id', - 'title', - 'campaign_id', - 'is_active', - 'is_default', - 'result_id', - 'activity_type_id', - ]; - - $petition = CRM_Core_DAO::executeQuery($query, $queryParams); - while ($petition->fetch()) { - foreach ($properties as $property) { - $petitions[$petition->id][$property] = $petition->$property; - } - } - - return $petitions; - } - - /** - * Get the petition count. - * - */ - public static function getPetitionCount() { - $whereClause = 'WHERE ( 1 )'; - $queryParams = []; - $petitionTypeID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Petition'); - if ($petitionTypeID) { - $whereClause = "WHERE ( petition.activity_type_id = %1 )"; - $queryParams[1] = [$petitionTypeID, 'Positive']; - } - $query = "SELECT COUNT(*) FROM civicrm_survey petition {$whereClause}"; - - return (int) CRM_Core_DAO::singleValueQuery($query, $queryParams); - } - /** * Takes an associative array and creates a petition signature activity. * diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index 5f9ee274931a..c6aa2dc2cbe9 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -63,141 +63,6 @@ public static function create(&$params) { return $dao; } - /** - * Retrieve surveys for dashboard. - * - * @param array $params - * @param bool $onlyCount - * - * @return array|int - */ - public static function getSurveySummary($params = [], $onlyCount = FALSE) { - //build the limit and order clause. - $limitClause = $orderByClause = $lookupTableJoins = NULL; - if (!$onlyCount) { - $sortParams = [ - 'sort' => 'created_date', - 'offset' => 0, - 'rowCount' => 10, - 'sortOrder' => 'desc', - ]; - foreach ($sortParams as $name => $default) { - if (!empty($params[$name])) { - $sortParams[$name] = $params[$name]; - } - } - - //need to lookup tables. - $orderOnSurveyTable = TRUE; - if ($sortParams['sort'] == 'campaign') { - $orderOnSurveyTable = FALSE; - $lookupTableJoins = ' - LEFT JOIN civicrm_campaign campaign ON ( campaign.id = survey.campaign_id )'; - $orderByClause = "ORDER BY campaign.title {$sortParams['sortOrder']}"; - } - elseif ($sortParams['sort'] == 'activity_type') { - $orderOnSurveyTable = FALSE; - $lookupTableJoins = " - LEFT JOIN civicrm_option_value activity_type ON ( activity_type.value = survey.activity_type_id - OR survey.activity_type_id IS NULL ) -INNER JOIN civicrm_option_group grp ON ( activity_type.option_group_id = grp.id AND grp.name = 'activity_type' )"; - $orderByClause = "ORDER BY activity_type.label {$sortParams['sortOrder']}"; - } - elseif ($sortParams['sort'] == 'isActive') { - $sortParams['sort'] = 'is_active'; - } - if ($orderOnSurveyTable) { - $orderByClause = "ORDER BY survey.{$sortParams['sort']} {$sortParams['sortOrder']}"; - } - $limitClause = "LIMIT {$sortParams['offset']}, {$sortParams['rowCount']}"; - } - - //build the where clause. - $queryParams = $where = []; - - //we only have activity type as a - //difference between survey and petition. - $petitionTypeID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Petition'); - if ($petitionTypeID) { - $where[] = "( survey.activity_type_id != %1 )"; - $queryParams[1] = [$petitionTypeID, 'Positive']; - } - - if (!empty($params['title'])) { - $where[] = "( survey.title LIKE %2 )"; - $queryParams[2] = ['%' . trim($params['title']) . '%', 'String']; - } - if (!empty($params['campaign_id'])) { - $where[] = '( survey.campaign_id = %3 )'; - $queryParams[3] = [$params['campaign_id'], 'Positive']; - } - if (!empty($params['activity_type_id'])) { - $typeId = $params['activity_type_id']; - if (is_array($params['activity_type_id'])) { - $typeId = implode(' , ', $params['activity_type_id']); - } - $where[] = "( survey.activity_type_id IN ( {$typeId} ) )"; - } - $whereClause = NULL; - if (!empty($where)) { - $whereClause = ' WHERE ' . implode(" \nAND ", $where); - } - - $selectClause = ' -SELECT survey.id as id, - survey.title as title, - survey.is_active as is_active, - survey.result_id as result_id, - survey.is_default as is_default, - survey.campaign_id as campaign_id, - survey.activity_type_id as activity_type_id, - survey.release_frequency as release_frequency, - survey.max_number_of_contacts as max_number_of_contacts, - survey.default_number_of_contacts as default_number_of_contacts'; - if ($onlyCount) { - $selectClause = 'SELECT COUNT(*)'; - } - $fromClause = 'FROM civicrm_survey survey'; - - $query = "{$selectClause} {$fromClause} {$lookupTableJoins} {$whereClause} {$orderByClause} {$limitClause}"; - - //return only count. - if ($onlyCount) { - return (int) CRM_Core_DAO::singleValueQuery($query, $queryParams); - } - - $surveys = []; - $properties = [ - 'id', - 'title', - 'campaign_id', - 'is_active', - 'is_default', - 'result_id', - 'activity_type_id', - 'release_frequency', - 'max_number_of_contacts', - 'default_number_of_contacts', - ]; - - $survey = CRM_Core_DAO::executeQuery($query, $queryParams); - while ($survey->fetch()) { - foreach ($properties as $property) { - $surveys[$survey->id][$property] = $survey->$property; - } - } - - return $surveys; - } - - /** - * Get the survey count. - * - */ - public static function getSurveyCount() { - return (int) CRM_Core_DAO::singleValueQuery('SELECT COUNT(*) FROM civicrm_survey'); - } - /** * Get Surveys. * diff --git a/CRM/Campaign/DAO/Survey.php b/CRM/Campaign/DAO/Survey.php index cbf590c94370..8343227f3855 100644 --- a/CRM/Campaign/DAO/Survey.php +++ b/CRM/Campaign/DAO/Survey.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Campaign/Survey.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:754f9a2e62e86ff340afea563b561dec) + * (GenCodeChecksum:b517a686715877b8cde6af69122dcc0d) */ /** @@ -45,6 +45,17 @@ class CRM_Campaign_DAO_Survey extends CRM_Core_DAO { */ public static $_log = FALSE; + /** + * Paths for accessing this entity in the UI. + * + * @var string[] + */ + protected static $_paths = [ + 'add' => 'civicrm/survey/add?reset=1', + 'update' => 'civicrm/survey/configure/main?reset=1&action=update&id=[id]', + 'delete' => 'civicrm/survey/delete?reset=1&id=[id]', + ]; + /** * Survey id. * diff --git a/CRM/Campaign/Form/Search/Campaign.php b/CRM/Campaign/Form/Search/Campaign.php deleted file mode 100644 index 3778ccea929b..000000000000 --- a/CRM/Campaign/Form/Search/Campaign.php +++ /dev/null @@ -1,119 +0,0 @@ -_search = $_GET['search'] ?? NULL; - $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE); - $this->_searchTab = CRM_Utils_Request::retrieve('type', 'String', $this, FALSE, 'campaign'); - - //when we do load tab, lets load the default objects. - $this->assign('force', $this->_force || $this->_searchTab); - $this->assign('searchParams', json_encode($this->get('searchParams'))); - $this->assign('buildSelector', $this->_search); - $this->assign('searchFor', $this->_searchTab); - $this->assign('campaignTypes', json_encode($this->get('campaignTypes'))); - $this->assign('campaignStatus', json_encode($this->get('campaignStatus'))); - $this->assign('suppressForm', TRUE); - - //set the form title. - $this->setTitle(ts('Find Campaigns')); - } - - /** - * Build the form object. - */ - public function buildQuickForm() { - if ($this->_search) { - return; - } - - $attributes = CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Campaign'); - $this->add('text', 'campaign_title', ts('Title'), $attributes['title']); - - //campaign description. - $this->add('text', 'description', ts('Description'), $attributes['description']); - - $this->add('datepicker', 'start_date', ts('Campaign Start Date'), [], FALSE, ['time' => FALSE]); - $this->add('datepicker', 'end_date', ts('Campaign End Date'), [], FALSE, ['time' => FALSE]); - - //campaign type. - $campaignTypes = CRM_Campaign_PseudoConstant::campaignType(); - $this->add('select', 'campaign_type_id', ts('Campaign Type'), - [ - '' => ts('- select -'), - ] + $campaignTypes - ); - - $this->set('campaignTypes', $campaignTypes); - $this->assign('campaignTypes', json_encode($campaignTypes)); - - //campaign status - $campaignStatus = CRM_Campaign_PseudoConstant::campaignStatus(); - $this->addElement('select', 'status_id', ts('Campaign Status'), - [ - '' => ts('- select -'), - ] + $campaignStatus - ); - $this->set('campaignStatus', $campaignStatus); - $this->assign('campaignStatus', json_encode($campaignStatus)); - - //active campaigns - $this->addElement('select', 'is_active', ts('Is Active?'), [ - '' => ts('- select -'), - '0' => ts('Yes'), - '1' => ts('No'), - ]); - - //build the array of all search params. - $this->_searchParams = []; - foreach ($this->_elements as $element) { - $name = $element->_attributes['name']; - $label = $element->_label; - if ($name == 'qfKey') { - continue; - } - $this->_searchParams[$name] = ($label) ? $label : $name; - } - $this->set('searchParams', $this->_searchParams); - $this->assign('searchParams', json_encode($this->_searchParams)); - } - -} diff --git a/CRM/Campaign/Form/Search/Petition.php b/CRM/Campaign/Form/Search/Petition.php deleted file mode 100644 index 49b94a12265f..000000000000 --- a/CRM/Campaign/Form/Search/Petition.php +++ /dev/null @@ -1,81 +0,0 @@ -_search = $_GET['search'] ?? NULL; - $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE); - $this->_searchTab = CRM_Utils_Request::retrieve('type', 'String', $this, FALSE, 'petition'); - - //when we do load tab, lets load the default objects. - $this->assign('force', $this->_force || $this->_searchTab); - $this->assign('searchParams', json_encode($this->get('searchParams'))); - $this->assign('buildSelector', $this->_search); - $this->assign('searchFor', $this->_searchTab); - $this->assign('petitionCampaigns', json_encode($this->get('petitionCampaigns'))); - $this->assign('suppressForm', TRUE); - - //set the form title. - $this->setTitle(ts('Find Petition')); - } - - /** - * Build the form object. - */ - public function buildQuickForm() { - if ($this->_search) { - return; - } - - $attributes = CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey'); - $this->add('text', 'petition_title', ts('Title'), $attributes['title']); - - //campaigns - $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(NULL, NULL, FALSE, FALSE, FALSE, TRUE); - $this->add('select', 'petition_campaign_id', ts('Campaign'), ['' => ts('- select -')] + $campaigns); - $this->set('petitionCampaigns', $campaigns); - $this->assign('petitionCampaigns', json_encode($campaigns)); - - //build the array of all search params. - $this->_searchParams = []; - foreach ($this->_elements as $element) { - $name = $element->_attributes['name']; - $label = $element->_label; - if ($name == 'qfKey') { - continue; - } - $this->_searchParams[$name] = ($label) ? $label : $name; - } - $this->set('searchParams', $this->_searchParams); - $this->assign('searchParams', json_encode($this->_searchParams)); - } - -} diff --git a/CRM/Campaign/Form/Search/Survey.php b/CRM/Campaign/Form/Search/Survey.php deleted file mode 100644 index 6ad51606c772..000000000000 --- a/CRM/Campaign/Form/Search/Survey.php +++ /dev/null @@ -1,92 +0,0 @@ -_search = $_GET['search'] ?? NULL; - $this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE); - $this->_searchTab = CRM_Utils_Request::retrieve('type', 'String', $this, FALSE, 'survey'); - - //when we do load tab, lets load the default objects. - $this->assign('force', $this->_force || $this->_searchTab); - $this->assign('searchParams', json_encode($this->get('searchParams'))); - $this->assign('buildSelector', $this->_search); - $this->assign('searchFor', $this->_searchTab); - $this->assign('surveyTypes', json_encode($this->get('surveyTypes'))); - $this->assign('surveyCampaigns', json_encode($this->get('surveyCampaigns'))); - $this->assign('suppressForm', TRUE); - - //set the form title. - $this->setTitle(ts('Find Survey')); - } - - /** - * Build the form object. - */ - public function buildQuickForm() { - if ($this->_search) { - return; - } - - $attributes = CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey'); - $this->add('text', 'survey_title', ts('Title'), $attributes['title']); - - //activity Type id - $surveyTypes = CRM_Campaign_BAO_Survey::getSurveyActivityType(); - $this->add('select', 'activity_type_id', - ts('Activity Type'), [ - '' => ts('- select -'), - ] + $surveyTypes - ); - $this->set('surveyTypes', $surveyTypes); - $this->assign('surveyTypes', json_encode($surveyTypes)); - - //campaigns - $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(NULL, NULL, FALSE, FALSE, FALSE, TRUE); - $this->add('select', 'survey_campaign_id', ts('Campaign'), ['' => ts('- select -')] + $campaigns); - $this->set('surveyCampaigns', $campaigns); - $this->assign('surveyCampaigns', json_encode($campaigns)); - - //build the array of all search params. - $this->_searchParams = []; - foreach ($this->_elements as $element) { - $name = $element->_attributes['name']; - $label = $element->_label; - if ($name == 'qfKey') { - continue; - } - $this->_searchParams[$name] = ($label) ? $label : $name; - } - $this->set('searchParams', $this->_searchParams); - $this->assign('searchParams', json_encode($this->_searchParams)); - } - -} diff --git a/CRM/Campaign/Form/Survey.php b/CRM/Campaign/Form/Survey.php index e06367831d00..e299f192e90e 100644 --- a/CRM/Campaign/Form/Survey.php +++ b/CRM/Campaign/Form/Survey.php @@ -58,6 +58,9 @@ public function getEntityId() { } public function preProcess() { + // Multistep form doesn't play well with popups + $this->preventAjaxSubmit(); + if (!CRM_Campaign_BAO_Campaign::accessCampaign()) { CRM_Utils_System::permissionDenied(); } diff --git a/CRM/Campaign/Page/AJAX.php b/CRM/Campaign/Page/AJAX.php index f5e857c2d358..6236287a3030 100644 --- a/CRM/Campaign/Page/AJAX.php +++ b/CRM/Campaign/Page/AJAX.php @@ -501,312 +501,4 @@ public static function campaignGroups() { CRM_Utils_JSON::output($results); } - /** - * This function uses the deprecated v1 datatable api and needs updating. See CRM-16353. - * @deprecated - */ - public static function campaignList() { - //get the search criteria params. - $searchCriteria = CRM_Utils_Request::retrieve('searchCriteria', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'POST'); - $searchParams = explode(',', $searchCriteria); - - $params = $searchRows = []; - foreach ($searchParams as $param) { - if (isset($_POST[$param])) { - $params[$param] = $_POST[$param]; - } - } - - //this is sequence columns on datatable. - $selectorCols = [ - 'id', - 'name', - 'title', - 'description', - 'start_date', - 'end_date', - 'campaign_type_id', - 'campaign_type', - 'status_id', - 'status', - 'is_active', - 'isActive', - 'action', - ]; - - // get the data table params. - $dataTableParams = [ - 'sEcho' => [ - 'name' => 'sEcho', - 'type' => 'Integer', - 'default' => 0, - ], - 'offset' => [ - 'name' => 'iDisplayStart', - 'type' => 'Integer', - 'default' => 0, - ], - 'rowCount' => [ - 'name' => 'iDisplayLength', - 'type' => 'Integer', - 'default' => 25, - ], - 'sort' => [ - 'name' => 'iSortCol_0', - 'type' => 'Integer', - 'default' => 'start_date', - ], - 'sortOrder' => [ - 'name' => 'sSortDir_0', - 'type' => 'String', - 'default' => 'desc', - ], - ]; - foreach ($dataTableParams as $pName => $pValues) { - $$pName = $pValues['default']; - if (!empty($_POST[$pValues['name']])) { - $$pName = CRM_Utils_Type::escape($_POST[$pValues['name']], $pValues['type']); - if ($pName == 'sort') { - $$pName = $selectorCols[$$pName]; - } - } - } - foreach ([ - 'sort', - 'offset', - 'rowCount', - 'sortOrder', - ] as $sortParam) { - $params[$sortParam] = $$sortParam; - } - - $searchCount = CRM_Campaign_BAO_Campaign::getCampaignSummary($params, TRUE); - $campaigns = CRM_Campaign_Page_DashBoard::getCampaignSummary($params); - $iTotal = $searchCount; - - if ($searchCount > 0) { - if ($searchCount < $offset) { - $offset = 0; - } - foreach ($campaigns as $campaignID => $values) { - foreach ($selectorCols as $col) { - $searchRows[$campaignID][$col] = $values[$col] ?? NULL; - } - } - } - - $selectorElements = $selectorCols; - - $iFilteredTotal = $iTotal; - - CRM_Utils_System::setHttpHeader('Content-Type', 'application/json'); - echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements); - CRM_Utils_System::civiExit(); - } - - /** - * This function uses the deprecated v1 datatable api and needs updating. See CRM-16353. - * @deprecated - */ - public static function surveyList() { - //get the search criteria params. - $searchCriteria = CRM_Utils_Request::retrieve('searchCriteria', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'POST'); - $searchParams = explode(',', $searchCriteria); - - $params = $searchRows = []; - foreach ($searchParams as $param) { - if (!empty($_POST[$param])) { - $params[$param] = $_POST[$param]; - } - } - - //this is sequence columns on datatable. - $selectorCols = [ - 'id', - 'title', - 'campaign_id', - 'campaign', - 'activity_type_id', - 'activity_type', - 'release_frequency', - 'default_number_of_contacts', - 'max_number_of_contacts', - 'is_default', - 'is_active', - 'isActive', - 'result_id', - 'action', - 'voterLinks', - ]; - - // get the data table params. - $dataTableParams = [ - 'sEcho' => [ - 'name' => 'sEcho', - 'type' => 'Integer', - 'default' => 0, - ], - 'offset' => [ - 'name' => 'iDisplayStart', - 'type' => 'Integer', - 'default' => 0, - ], - 'rowCount' => [ - 'name' => 'iDisplayLength', - 'type' => 'Integer', - 'default' => 25, - ], - 'sort' => [ - 'name' => 'iSortCol_0', - 'type' => 'Integer', - 'default' => 'created_date', - ], - 'sortOrder' => [ - 'name' => 'sSortDir_0', - 'type' => 'String', - 'default' => 'desc', - ], - ]; - foreach ($dataTableParams as $pName => $pValues) { - $$pName = $pValues['default']; - if (!empty($_POST[$pValues['name']])) { - $$pName = CRM_Utils_Type::escape($_POST[$pValues['name']], $pValues['type']); - if ($pName == 'sort') { - $$pName = $selectorCols[$$pName]; - } - } - } - foreach ([ - 'sort', - 'offset', - 'rowCount', - 'sortOrder', - ] as $sortParam) { - $params[$sortParam] = $$sortParam; - } - - $surveys = CRM_Campaign_Page_DashBoard::getSurveySummary($params); - $searchCount = CRM_Campaign_BAO_Survey::getSurveySummary($params, TRUE); - $iTotal = $searchCount; - - if ($searchCount > 0) { - if ($searchCount < $offset) { - $offset = 0; - } - foreach ($surveys as $surveyID => $values) { - foreach ($selectorCols as $col) { - $searchRows[$surveyID][$col] = $values[$col] ?? NULL; - } - } - } - - $selectorElements = $selectorCols; - - $iFilteredTotal = $iTotal; - - CRM_Utils_System::setHttpHeader('Content-Type', 'application/json'); - echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements); - CRM_Utils_System::civiExit(); - } - - /** - * This function uses the deprecated v1 datatable api and needs updating. See CRM-16353. - * @deprecated - */ - public static function petitionList() { - //get the search criteria params. - $searchCriteria = CRM_Utils_Request::retrieve('searchCriteria', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'POST'); - $searchParams = explode(',', $searchCriteria); - - $params = $searchRows = []; - foreach ($searchParams as $param) { - if (!empty($_POST[$param])) { - $params[$param] = $_POST[$param]; - } - } - - //this is sequence columns on datatable. - $selectorCols = [ - 'id', - 'title', - 'campaign_id', - 'campaign', - 'activity_type_id', - 'activity_type', - 'is_default', - 'is_active', - 'isActive', - 'action', - ]; - - // get the data table params. - $dataTableParams = [ - 'sEcho' => [ - 'name' => 'sEcho', - 'type' => 'Integer', - 'default' => 0, - ], - 'offset' => [ - 'name' => 'iDisplayStart', - 'type' => 'Integer', - 'default' => 0, - ], - 'rowCount' => [ - 'name' => 'iDisplayLength', - 'type' => 'Integer', - 'default' => 25, - ], - 'sort' => [ - 'name' => 'iSortCol_0', - 'type' => 'Integer', - 'default' => 'created_date', - ], - 'sortOrder' => [ - 'name' => 'sSortDir_0', - 'type' => 'String', - 'default' => 'desc', - ], - ]; - foreach ($dataTableParams as $pName => $pValues) { - $$pName = $pValues['default']; - if (!empty($_POST[$pValues['name']])) { - $$pName = CRM_Utils_Type::escape($_POST[$pValues['name']], $pValues['type']); - if ($pName == 'sort') { - $$pName = $selectorCols[$$pName]; - } - } - } - foreach ([ - 'sort', - 'offset', - 'rowCount', - 'sortOrder', - ] as $sortParam) { - $params[$sortParam] = $$sortParam; - } - - $petitions = CRM_Campaign_Page_DashBoard::getPetitionSummary($params); - $searchCount = CRM_Campaign_BAO_Petition::getPetitionSummary($params, TRUE); - $iTotal = $searchCount; - - if ($searchCount > 0) { - if ($searchCount < $offset) { - $offset = 0; - } - foreach ($petitions as $petitionID => $values) { - foreach ($selectorCols as $col) { - $searchRows[$petitionID][$col] = $values[$col] ?? NULL; - } - } - } - - $selectorElements = $selectorCols; - - $iFilteredTotal = $iTotal; - - CRM_Utils_System::setHttpHeader('Content-Type', 'application/json'); - echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements); - CRM_Utils_System::civiExit(); - } - } diff --git a/CRM/Campaign/Page/DashBoard.php b/CRM/Campaign/Page/DashBoard.php deleted file mode 100644 index 013ebcec4da8..000000000000 --- a/CRM/Campaign/Page/DashBoard.php +++ /dev/null @@ -1,499 +0,0 @@ - [ - 'name' => ts('Edit'), - 'url' => 'civicrm/campaign/add', - 'qs' => 'reset=1&action=update&id=%%id%%', - 'title' => ts('Update Campaign'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'title' => ts('Disable Campaign'), - 'ref' => 'crm-enable-disable', - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'title' => ts('Enable Campaign'), - 'ref' => 'crm-enable-disable', - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/campaign/add', - 'qs' => 'action=delete&reset=1&id=%%id%%', - 'title' => ts('Delete Campaign'), - ], - ]; - } - - return self::$_campaignActionLinks; - } - - /** - * @return array - */ - public static function surveyActionLinks() { - // check if variable _actionsLinks is populated - if (!isset(self::$_surveyActionLinks)) { - self::$_surveyActionLinks = [ - CRM_Core_Action::UPDATE => [ - 'name' => ts('Edit'), - 'url' => 'civicrm/survey/configure/main', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Update Survey'), - ], - CRM_Core_Action::DISABLE => [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Survey'), - ], - CRM_Core_Action::ENABLE => [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Survey'), - ], - CRM_Core_Action::DELETE => [ - 'name' => ts('Delete'), - 'url' => 'civicrm/survey/delete', - 'qs' => 'id=%%id%%&reset=1', - 'title' => ts('Delete Survey'), - ], - ]; - } - - return self::$_surveyActionLinks; - } - - /** - * @return array - */ - public static function petitionActionLinks() { - if (!isset(self::$_petitionActionLinks)) { - self::$_petitionActionLinks = self::surveyActionLinks(); - self::$_petitionActionLinks[CRM_Core_Action::UPDATE] = [ - 'name' => ts('Edit'), - 'url' => 'civicrm/petition/add', - 'qs' => 'action=update&id=%%id%%&reset=1', - 'title' => ts('Update Petition'), - ]; - self::$_petitionActionLinks[CRM_Core_Action::DISABLE] = [ - 'name' => ts('Disable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Disable Petition'), - ]; - self::$_petitionActionLinks[CRM_Core_Action::ENABLE] = [ - 'name' => ts('Enable'), - 'ref' => 'crm-enable-disable', - 'title' => ts('Enable Petition'), - ]; - self::$_petitionActionLinks[CRM_Core_Action::DELETE] = [ - 'name' => ts('Delete'), - 'url' => 'civicrm/petition/add', - 'qs' => 'action=delete&id=%%id%%&reset=1', - 'title' => ts('Delete Petition'), - ]; - self::$_petitionActionLinks[CRM_Core_Action::PROFILE] = [ - 'name' => ts('Sign'), - 'url' => 'civicrm/petition/sign', - 'qs' => 'sid=%%id%%&reset=1', - 'title' => ts('Sign Petition'), - 'fe' => TRUE, - //CRM_Core_Action::PROFILE is used because there isn't a specific action for sign - ]; - self::$_petitionActionLinks[CRM_Core_Action::BROWSE] = [ - 'name' => ts('Signatures'), - 'url' => 'civicrm/activity/search', - 'qs' => 'survey=%%id%%&force=1', - 'title' => ts('List the signatures'), - //CRM_Core_Action::PROFILE is used because there isn't a specific action for sign - ]; - } - - return self::$_petitionActionLinks; - } - - /** - * @return mixed - */ - public function browseCampaign() { - // ensure valid javascript (these must have a value set) - $this->assign('searchParams', json_encode(NULL)); - $this->assign('campaignTypes', json_encode(NULL)); - $this->assign('campaignStatus', json_encode(NULL)); - - $this->assign('addCampaignUrl', CRM_Utils_System::url('civicrm/campaign/add', 'reset=1&action=add')); - $campaignCount = CRM_Campaign_BAO_Campaign::getCampaignCount(); - //don't load find interface when no campaigns in db. - if (!$campaignCount) { - $this->assign('hasCampaigns', FALSE); - return; - } - $this->assign('hasCampaigns', TRUE); - - //build the ajaxify campaign search and selector. - $controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Search_Campaign', ts('Search Campaigns')); - $controller->set('searchTab', 'campaign'); - $controller->setEmbedded(TRUE); - $controller->process(); - return $controller->run(); - } - - /** - * @param array $params - * - * @return array - */ - public static function getCampaignSummary($params = []) { - $campaignsData = []; - - //get the campaigns. - $campaigns = CRM_Campaign_BAO_Campaign::getCampaignSummary($params); - if (!empty($campaigns)) { - $config = CRM_Core_Config::singleton(); - $campaignType = CRM_Campaign_PseudoConstant::campaignType(); - $campaignStatus = CRM_Campaign_PseudoConstant::campaignStatus(); - $properties = [ - 'id', - 'name', - 'title', - 'status_id', - 'description', - 'campaign_type_id', - 'is_active', - 'start_date', - 'end_date', - ]; - foreach ($campaigns as $cmpid => $campaign) { - foreach ($properties as $prop) { - $campaignsData[$cmpid][$prop] = $campaign[$prop] ?? NULL; - } - $statusId = $campaign['status_id'] ?? NULL; - $campaignsData[$cmpid]['status'] = $campaignStatus[$statusId] ?? NULL; - $campaignsData[$cmpid]['campaign_id'] = $campaign['id']; - $campaignsData[$cmpid]['campaign_type'] = $campaignType[$campaign['campaign_type_id']]; - - $action = array_sum(array_keys(self::campaignActionLinks())); - if ($campaign['is_active']) { - $action -= CRM_Core_Action::ENABLE; - } - else { - $action -= CRM_Core_Action::DISABLE; - } - - $isActive = ts('No'); - if ($campaignsData[$cmpid]['is_active']) { - $isActive = ts('Yes'); - } - $campaignsData[$cmpid]['isActive'] = $isActive; - - if (!empty($campaignsData[$cmpid]['start_date'])) { - $campaignsData[$cmpid]['start_date'] = CRM_Utils_Date::customFormat($campaignsData[$cmpid]['start_date'], - $config->dateformatFull - ); - } - if (!empty($campaignsData[$cmpid]['end_date'])) { - $campaignsData[$cmpid]['end_date'] = CRM_Utils_Date::customFormat($campaignsData[$cmpid]['end_date'], - $config->dateformatFull - ); - } - $campaignsData[$cmpid]['action'] = CRM_Core_Action::formLink(self::campaignActionLinks(), - $action, - ['id' => $campaign['id']], - ts('more'), - FALSE, - 'campaign.dashboard.row', - 'Campaign', - $campaign['id'] - ); - } - } - - return $campaignsData; - } - - /** - * @return mixed - */ - public function browseSurvey() { - // ensure valid javascript - this must have a value set - $this->assign('searchParams', json_encode(NULL)); - $this->assign('surveyTypes', json_encode(NULL)); - $this->assign('surveyCampaigns', json_encode(NULL)); - - $this->assign('addSurveyUrl', CRM_Utils_System::url('civicrm/survey/add', 'reset=1&action=add')); - - $surveyCount = CRM_Campaign_BAO_Survey::getSurveyCount(); - //don't load find interface when no survey in db. - if (!$surveyCount) { - $this->assign('hasSurveys', FALSE); - return; - } - $this->assign('hasSurveys', TRUE); - - //build the ajaxify survey search and selector. - $controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Search_Survey', ts('Search Survey')); - $controller->set('searchTab', 'survey'); - $controller->setEmbedded(TRUE); - $controller->process(); - return $controller->run(); - } - - /** - * @param array $params - * - * @return array - */ - public static function getSurveySummary($params = []) { - $surveysData = []; - - //get the survey. - $config = CRM_Core_Config::singleton(); - $surveys = CRM_Campaign_BAO_Survey::getSurveySummary($params); - if (!empty($surveys)) { - $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(NULL, NULL, FALSE, FALSE, FALSE, TRUE); - $surveyType = CRM_Campaign_BAO_Survey::getSurveyActivityType(); - foreach ($surveys as $sid => $survey) { - $surveysData[$sid] = $survey; - $campaignId = $survey['campaign_id'] ?? NULL; - $surveysData[$sid]['campaign'] = $campaigns[$campaignId] ?? NULL; - $surveysData[$sid]['activity_type'] = $surveyType[$survey['activity_type_id']]; - if (!empty($survey['release_frequency'])) { - $surveysData[$sid]['release_frequency'] = ts('1 Day', ['plural' => '%count Days', 'count' => $survey['release_frequency']]); - } - - $action = array_sum(array_keys(self::surveyActionLinks($surveysData[$sid]['activity_type']))); - if ($survey['is_active']) { - $action -= CRM_Core_Action::ENABLE; - } - else { - $action -= CRM_Core_Action::DISABLE; - } - - $isActive = ts('No'); - if ($surveysData[$sid]['is_active']) { - $isActive = ts('Yes'); - } - $surveysData[$sid]['isActive'] = $isActive; - - // For some reason, 'is_default' is coming as a string. - $surveysData[$sid]['is_default'] = boolval($surveysData[$sid]['is_default']); - - if ($surveysData[$sid]['result_id']) { - $resultSet = '' . ts('Result Set') . ''; - $surveysData[$sid]['result_id'] = $resultSet; - } - else { - $resultUrl = CRM_Utils_System::url("civicrm/survey/configure/results", "action=update&id={$sid}&reset=1"); - $surveysData[$sid]['result_id'] = "(" . ts('Incomplete. Click to configure result set.') . ')'; - } - $surveysData[$sid]['action'] = CRM_Core_Action::formLink(self::surveyActionLinks($surveysData[$sid]['activity_type']), - $action, - ['id' => $sid], - ts('more'), - FALSE, - 'survey.dashboard.row', - 'Survey', - $sid - ); - - if (($surveysData[$sid]['activity_type'] ?? NULL) != 'Petition') { - $surveysData[$sid]['voterLinks'] = CRM_Campaign_BAO_Survey::buildPermissionLinks($sid, - TRUE, - ts('more') - ); - } - - if ($reportID = CRM_Campaign_BAO_Survey::getReportID($sid)) { - $url = CRM_Utils_System::url("civicrm/report/instance/{$reportID}", 'reset=1'); - $surveysData[$sid]['title'] = "{$surveysData[$sid]['title']}"; - } - } - } - - return $surveysData; - } - - /** - * Browse petitions. - * - * @return mixed|null - */ - public function browsePetition() { - // Ensure valid javascript - this must have a value set - $this->assign('searchParams', json_encode(NULL)); - $this->assign('petitionCampaigns', json_encode(NULL)); - - $this->assign('addPetitionUrl', CRM_Utils_System::url('civicrm/petition/add', 'reset=1&action=add')); - - $petitionCount = CRM_Campaign_BAO_Petition::getPetitionCount(); - //don't load find interface when no petition in db. - if (!$petitionCount) { - $this->assign('hasPetitions', FALSE); - return NULL; - } - $this->assign('hasPetitions', TRUE); - - // Build the ajax petition search and selector. - $controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Search_Petition', ts('Search Petition')); - $controller->set('searchTab', 'petition'); - $controller->setEmbedded(TRUE); - $controller->process(); - return $controller->run(); - } - - /** - * @param array $params - * - * @return array - */ - public static function getPetitionSummary($params = []) { - $config = CRM_Core_Config::singleton(); - $petitionsData = []; - - //get the petitions. - $petitions = CRM_Campaign_BAO_Petition::getPetitionSummary($params); - if (!empty($petitions)) { - $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(NULL, NULL, FALSE, FALSE, FALSE, TRUE); - $petitionType = CRM_Campaign_BAO_Survey::getSurveyActivityType('label', TRUE); - foreach ($petitions as $pid => $petition) { - $petitionsData[$pid] = $petition; - $camapignId = $petition['campaign_id'] ?? NULL; - $petitionsData[$pid]['campaign'] = $campaigns[$camapignId] ?? NULL; - $petitionsData[$pid]['activity_type'] = $petitionType[$petition['activity_type_id']]; - - $action = array_sum(array_keys(self::petitionActionLinks())); - - if ($petition['is_active']) { - $action -= CRM_Core_Action::ENABLE; - } - else { - $action -= CRM_Core_Action::DISABLE; - } - - $isActive = ts('No'); - if ($petitionsData[$pid]['is_active']) { - $isActive = ts('Yes'); - } - $petitionsData[$pid]['isActive'] = $isActive; - - // For some reason, 'is_default' is coming as a string. - $petitionsData[$pid]['is_default'] = boolval($petitionsData[$pid]['is_default']); - - $petitionsData[$pid]['action'] = CRM_Core_Action::formLink(self::petitionActionLinks(), - $action, - ['id' => $pid], - ts('more'), - FALSE, - 'petition.dashboard.row', - 'Petition', - $pid - ); - } - } - - return $petitionsData; - } - - public function browse() { - $this->_tabs = [ - 'campaign' => ts('Campaigns'), - 'survey' => ts('Surveys'), - 'petition' => ts('Petitions'), - ]; - - $subPageType = CRM_Utils_Request::retrieve('type', 'String', $this); - // Load the data for a specific tab - if ($subPageType) { - if (!isset($this->_tabs[$subPageType])) { - CRM_Utils_System::permissionDenied(); - } - //load the data in tabs. - $this->{'browse' . ucfirst($subPageType)}(); - } - // Initialize tabs - else { - $this->buildTabs(); - } - $this->assign('subPageType', ucfirst($subPageType)); - } - - /** - * @return string - */ - public function run() { - if (!CRM_Campaign_BAO_Campaign::accessCampaign()) { - CRM_Utils_System::permissionDenied(); - } - - $this->browse(); - - return parent::run(); - } - - public function buildTabs() { - $allTabs = []; - foreach ($this->_tabs as $name => $title) { - $allTabs[$name] = [ - 'title' => $title, - 'valid' => TRUE, - 'active' => TRUE, - 'link' => CRM_Utils_System::url('civicrm/campaign', "reset=1&type=$name"), - 'extra' => NULL, - 'template' => NULL, - 'count' => NULL, - 'icon' => NULL, - 'class' => NULL, - ]; - } - $allTabs['campaign']['class'] = 'livePage'; - $this->assign('tabHeader', $allTabs); - CRM_Core_Resources::singleton() - ->addScriptFile('civicrm', 'templates/CRM/common/TabHeader.js', 1, 'html-header') - ->addSetting([ - 'tabSettings' => [ - // Tabs should use selectedChild, but Campaign has many legacy links - 'active' => strtolower($_GET['subPage'] ?? $_GET['selectedChild'] ?? 'campaign'), - ], - ]); - } - -} diff --git a/CRM/Campaign/xml/Menu/Campaign.xml b/CRM/Campaign/xml/Menu/Campaign.xml index 5d051df2493b..9e4be74c218b 100644 --- a/CRM/Campaign/xml/Menu/Campaign.xml +++ b/CRM/Campaign/xml/Menu/Campaign.xml @@ -1,13 +1,6 @@