️ avoid "missing index" warnings

This commit is contained in:
Marc Michalsky forumZFD 2021-04-12 11:39:59 +02:00
parent 4bcc4cf1fb
commit 9b45d4a1fa
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
2 changed files with 6 additions and 4 deletions

View file

@ -74,7 +74,9 @@ abstract class CRM_TwingleCampaign_BAO_Campaign {
); );
// Set id // Set id
if (isset($this->id)) {
$values_prepared_for_import['id'] = $this->id; $values_prepared_for_import['id'] = $this->id;
}
// Set a flag to not trigger the hook // Set a flag to not trigger the hook
if ($no_hook) { if ($no_hook) {

View file

@ -107,9 +107,9 @@ function civicrm_api3_twingle_campaign_Get(array $params): array {
Cache::getInstance() Cache::getInstance()
->getCampaignIds()['campaign_types']['twingle_campaign']['id']; ->getCampaignIds()['campaign_types']['twingle_campaign']['id'];
// If no id but a project_id is provided, get all TwingleCampaign children of // If no id but a parent_id or a project_id is provided, get all
// this TwingleProject // TwingleCampaign children of this TwingleProject
if (array_key_exists('project_id', $params) && $params['project_id']) { if (isset($params['project_id']) && !isset($params['parent_id'])) {
// Get TwingleProject // Get TwingleProject
$project = civicrm_api3('TwingleProject', $project = civicrm_api3('TwingleProject',