✨️ avoid "missing index" warnings
This commit is contained in:
parent
4bcc4cf1fb
commit
9b45d4a1fa
2 changed files with 6 additions and 4 deletions
|
@ -74,7 +74,9 @@ abstract class CRM_TwingleCampaign_BAO_Campaign {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Set id
|
// Set id
|
||||||
$values_prepared_for_import['id'] = $this->id;
|
if (isset($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) {
|
||||||
|
|
|
@ -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',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue