Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
30fd38a0
Commit
30fd38a0
authored
9 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #3120 change sql search and add firstname in display
parent
0f588d00
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
maarch_entreprise/trunk/admin/users/users_list_by_name.php
+4
-3
4 additions, 3 deletions
maarch_entreprise/trunk/admin/users/users_list_by_name.php
maarch_entreprise/trunk/admin/users/users_management_controler.php
+4
-5
4 additions, 5 deletions
...treprise/trunk/admin/users/users_management_controler.php
with
8 additions
and
8 deletions
maarch_entreprise/trunk/admin/users/users_list_by_name.php
+
4
−
3
View file @
30fd38a0
...
@@ -46,13 +46,14 @@ if ($whereSecurityOnEntities == '') {
...
@@ -46,13 +46,14 @@ if ($whereSecurityOnEntities == '') {
$db
=
new
Database
();
$db
=
new
Database
();
$stmt
=
$db
->
query
(
$stmt
=
$db
->
query
(
"SELECT DISTINCT(users.user_id), users.lastname as tag FROM users, users_entities "
"SELECT DISTINCT(users.user_id),
CONCAT(
users.lastname
,' ',users.firstname)
as tag FROM users, users_entities "
.
" WHERE ("
.
" WHERE ("
.
"lower(users.lastname) like lower(:what) "
.
"lower(users.lastname) like lower(:what) "
.
" or lower(users.user_id) like lower(:what) "
.
" or lower(users.user_id) like lower(:what) "
.
" or lower(users.firstname) like lower(:what) "
.
") and users.status <> 'DEL' "
.
$whereSecurityOnEntities
.
" and (users.user_id = users_entities.user_id) "
.
") and users.status <> 'DEL' "
.
$whereSecurityOnEntities
.
" and (users.user_id = users_entities.user_id) "
.
" order by
users.lastname
"
,
.
" order by
tag
"
,
array
(
':what'
=>
$_REQUEST
[
'what'
]
.
'%'
)
array
(
':what'
=>
'%'
.
$_REQUEST
[
'what'
]
.
'%'
)
);
);
$listArray
=
array
();
$listArray
=
array
();
...
...
This diff is collapsed.
Click to expand it.
maarch_entreprise/trunk/admin/users/users_management_controler.php
+
4
−
5
View file @
30fd38a0
...
@@ -175,8 +175,8 @@ function display_list(){
...
@@ -175,8 +175,8 @@ function display_list(){
$arrayPDO
=
array
();
$arrayPDO
=
array
();
if
(
isset
(
$_REQUEST
[
'what'
])){
if
(
isset
(
$_REQUEST
[
'what'
])){
$what
=
$_REQUEST
[
'what'
];
$what
=
$_REQUEST
[
'what'
];
$where
.
=
" and (lower(lastname) like lower(?) or lower(users.user_id) like lower(?) )"
;
$where
.
=
" and (lower(lastname) like lower(?) or lower(users.user_id) like lower(?)
or CONCAT(users.lastname,' ',users.firstname) like ?
)"
;
$arrayPDO
=
array
(
$what
.
'%'
,
$what
.
'%'
);
$arrayPDO
=
array
(
$what
.
'%'
,
$what
.
'%'
,
$what
);
}
}
// Checking order and order_field values
// Checking order and order_field values
...
@@ -195,7 +195,6 @@ function display_list(){
...
@@ -195,7 +195,6 @@ function display_list(){
if
(
$entities_loaded
==
true
){
if
(
$entities_loaded
==
true
){
$tab
=
$request
->
PDOselect
(
$select
,
$where
,
$arrayPDO
,
$orderstr
,
$_SESSION
[
'config'
][
'databasetype'
]);
$tab
=
$request
->
PDOselect
(
$select
,
$where
,
$arrayPDO
,
$orderstr
,
$_SESSION
[
'config'
][
'databasetype'
]);
}
else
{
}
else
{
require_once
(
'modules'
.
DIRECTORY_SEPARATOR
.
'entities'
.
DIRECTORY_SEPARATOR
.
'class'
.
DIRECTORY_SEPARATOR
.
'class_manage_entities.php'
);
require_once
(
'modules'
.
DIRECTORY_SEPARATOR
.
'entities'
.
DIRECTORY_SEPARATOR
.
'class'
.
DIRECTORY_SEPARATOR
.
'class_manage_entities.php'
);
$ent
=
new
entity
();
$ent
=
new
entity
();
$my_tab_entities_id
=
$ent
->
get_all_entities_id_user
(
$_SESSION
[
'user'
][
'entities'
]);
$my_tab_entities_id
=
$ent
->
get_all_entities_id_user
(
$_SESSION
[
'user'
][
'entities'
]);
...
@@ -209,8 +208,8 @@ function display_list(){
...
@@ -209,8 +208,8 @@ function display_list(){
$what
=
''
;
$what
=
''
;
if
(
isset
(
$_REQUEST
[
'what'
])){
if
(
isset
(
$_REQUEST
[
'what'
])){
$what
=
$_REQUEST
[
'what'
];
$what
=
$_REQUEST
[
'what'
];
$where
.
=
" and lower(lastname) like lower(?)"
;
$where
.
=
" and lower(lastname) like lower(?)
or CONCAT(users.lastname,' ',users.firstname) like ?
"
;
$arrayPDO
=
array
(
$what
.
'%'
);
$arrayPDO
=
array
(
$what
.
'%'
,
$what
);
}
}
// Checking order and order_field values
// Checking order and order_field values
...
...
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