Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

enh(BE): optimizing the data sent when importing contact #7559

Merged
merged 4 commits into from
Jun 3, 2019

Conversation

sc979
Copy link
Contributor

@sc979 sc979 commented May 23, 2019

Pull Request Template

Description

Remove useless LDAP data sent to BE when importing contacts.

Please check the description and screenshots on ticket MON-3871

Fixes # (none)

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)

Target serie

  • 18.10.x
  • 19.04.x (master)

How this pull request can be tested ?

Please check the ticket MON-3871 for screenshots

Checklist

  • I followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  •  I have rebased my development branch on the base branch (master, maintenance).
  • I have made sure that acceptance tests related to the story are successful (local and CI)

@sc979 sc979 force-pushed the MON-3871-remove-useless-LDAP-data-sent-to-back-end branch from 62df334 to 639600d Compare May 23, 2019 13:47
$arrayToReturn = array();
foreach ($_POST["contact_select"] as $key => $subKey) {
$arrayToKeep[$key] = array_intersect_key($_POST["contact_select"][$key], $selectedUsers);
$arrayToReturn += $arrayToKeep;
Copy link
Contributor Author

@sc979 sc979 May 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't use intentionally array_merge to avoid performance issues, as I add arrays in an array to be returned

@sc979 sc979 changed the title enh(BE): optimizing the data sent when importing data enh(BE): optimizing the data sent when importing user May 23, 2019
@sc979 sc979 changed the title enh(BE): optimizing the data sent when importing user enh(BE): optimizing the data sent when importing contact May 23, 2019
@sc979 sc979 force-pushed the MON-3871-remove-useless-LDAP-data-sent-to-back-end branch 2 times, most recently from 6b49393 to f1aa746 Compare May 27, 2019 09:19
@sc979 sc979 changed the base branch from master to 19.04.x May 28, 2019 11:48
@sc979
Copy link
Contributor Author

sc979 commented May 28, 2019

branch rebased on the 19.04.x

@sc979 sc979 force-pushed the MON-3871-remove-useless-LDAP-data-sent-to-back-end branch from f1aa746 to 252efb3 Compare June 3, 2019 09:59
@sc979 sc979 merged commit 47676de into 19.04.x Jun 3, 2019
@sc979 sc979 deleted the MON-3871-remove-useless-LDAP-data-sent-to-back-end branch June 3, 2019 12:31
lpinsivy pushed a commit that referenced this pull request Jun 6, 2019
* enh(BE): optimizing the data sent when importing data
* renaming variable and removing useless steps
* udpating the composer.lock
* fix(ldap): login after manual import
miteto pushed a commit that referenced this pull request Jun 7, 2019
* enh(BE): optimizing the data sent when importing data
* renaming variable and removing useless steps
* udpating the composer.lock
* fix(ldap): login after manual import
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants