Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
OSE
Commits
f13484e8
Commit
f13484e8
authored
5 years ago
by
Laurent Lecluse
Browse files
Options
Downloads
Patches
Plain Diff
Amélioration de performances pour l'affichage des données personnelles
parent
e28745a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
module/Application/src/Application/Service/PaysService.php
+13
-5
13 additions, 5 deletions
module/Application/src/Application/Service/PaysService.php
with
14 additions
and
5 deletions
CHANGELOG.md
+
1
−
0
View file @
f13484e8
...
...
@@ -30,6 +30,7 @@ les nouveaux volumes horaires négatifs générés portent maintenant les mêmes
*
Les coordonnées bancaires peuvent être saisies même si elles sont hors zone SEPA (une case à cocher limite le contrôle)
*
L'export PDF des services est maintenant personnalisable.
*
Le pays "France" est détecté automatiquement. Il n'a donc plus besoin d'être identifié via administration/paramètres généraux.
*
Amélioration de performances pour l'affichage des données personnelles
## Notes de mise à jour
...
...
This diff is collapsed.
Click to expand it.
module/Application/src/Application/Service/PaysService.php
+
13
−
5
View file @
f13484e8
...
...
@@ -18,6 +18,10 @@ class PaysService extends AbstractEntityService
use
ParametresServiceAwareTrait
;
/**
* @var array
*/
private
$idsByLibelle
;
/**
...
...
@@ -49,15 +53,19 @@ class PaysService extends AbstractEntityService
*/
public
function
getIdByLibelle
(
string
$libelle
)
{
if
(
!
isset
(
$this
->
idsByLibelle
[
$libelle
]))
{
$sql
=
'SELECT id FROM pays WHERE ose_divers.str_reduce(libelle_court) = :pays AND histo_destruction IS NULL'
;
$res
=
$this
->
getEntityManager
()
->
getConnection
()
->
fetchAll
(
$sql
,
[
'pays'
=>
Util
::
reduce
(
$libelle
)]);
if
(
isset
(
$res
[
0
][
'ID'
]))
{
return
(
int
)
$res
[
0
][
'ID'
];
$this
->
idsByLibelle
[
$libelle
]
=
(
int
)
$res
[
0
][
'ID'
];
}
else
{
$this
->
idsByLibelle
[
$libelle
]
=
null
;
}
}
return
null
;
return
$this
->
idsByLibelle
[
$libelle
]
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment