Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel CAZAL
co2
Commits
20d047c7
Commit
20d047c7
authored
Jan 04, 2018
by
Raph El
Browse files
test list region
parent
d8f9983f
Changes
1
Hide whitespace changes
Inline
Side-by-side
controllers/DatamigrationController.php
View file @
20d047c7
...
...
@@ -3518,5 +3518,33 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
}
else
echo
"Pas d'envoie pour toi ma cocote !! Tu vas aller au four plutot"
;
}
public
function
actionRegionList
(){
//if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){
ini_set
(
'memory_limit'
,
'-1'
);
$nbelement
=
0
;
$erreur
=
array
();
$region
=
array
();
$aggregate
=
array
(
array
(
'$group'
=>
array
(
"_id"
=>
array
(
"level3Name"
=>
'$level3Name'
,
"country"
=>
'$country'
),
),
),
);
$cities
=
PHDB
::
aggregate
(
City
::
COLLECTION
,
$aggregate
);
//var_dump($cities);
if
(
!
empty
(
$cities
[
"result"
])){
foreach
(
@
$cities
[
"result"
]
as
$keyElt
=>
$city
)
{
if
(
!
empty
(
$city
[
"_id"
][
"level3Name"
])
&&
(
!
empty
(
$city
[
"_id"
][
"country"
])
&&
$city
[
"_id"
][
"country"
]
==
"FR"
)
)
echo
'"'
.
$city
[
"_id"
][
"level3Name"
]
.
'"<br/>'
;
}
}
//}
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment