Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
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
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
84f4f2d4
Commit
84f4f2d4
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX The search on user/group was not using new code. Fiels used for
search was not visible.
parent
38e5b773
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/core/search.php
+13
-2
13 additions, 2 deletions
htdocs/core/search.php
htdocs/user/group/index.php
+19
-1
19 additions, 1 deletion
htdocs/user/group/index.php
htdocs/user/home.php
+7
-15
7 additions, 15 deletions
htdocs/user/home.php
with
39 additions
and
18 deletions
htdocs/core/search.php
+
13
−
2
View file @
84f4f2d4
...
...
@@ -126,8 +126,19 @@ if (GETPOST('search_project') != '')
}
if
(
GETPOST
(
'search_task'
)
!=
''
)
{
header
(
"Location: "
.
DOL_URL_ROOT
.
'/projet/tasks/list.php?mode=search&search_all='
.
urlencode
(
GETPOST
(
'search_task'
)));
exit
;
header
(
"Location: "
.
DOL_URL_ROOT
.
'/projet/tasks/list.php?mode=search&search_all='
.
urlencode
(
GETPOST
(
'search_task'
)));
exit
;
}
if
(
GETPOST
(
'search_user'
)
!=
''
)
{
header
(
"Location: "
.
DOL_URL_ROOT
.
'/user/index.php?mode=search&sall='
.
urlencode
(
GETPOST
(
'search_user'
)));
exit
;
}
if
(
GETPOST
(
'search_group'
)
!=
''
)
{
header
(
"Location: "
.
DOL_URL_ROOT
.
'/user/group/index.php?mode=search&sall='
.
urlencode
(
GETPOST
(
'search_group'
)));
exit
;
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/user/group/index.php
+
19
−
1
View file @
84f4f2d4
...
...
@@ -49,6 +49,12 @@ $pagenext = $page + 1;
if
(
!
$sortfield
)
$sortfield
=
"g.nom"
;
if
(
!
$sortorder
)
$sortorder
=
"ASC"
;
// List of fields to search into when doing a "search in all"
$fieldstosearchall
=
array
(
'g.nom'
=>
"Group"
,
'g.note'
=>
"Note"
);
/*
* View
...
...
@@ -85,7 +91,19 @@ if ($resql)
$param
=
"&search_group="
.
urlencode
(
$search_group
)
.
"&sall="
.
urlencode
(
$sall
);
if
(
$optioncss
!=
''
)
$param
.
=
'&optioncss='
.
$optioncss
;
print
'<table class="noborder" width="100%">'
;
if
(
$sall
)
{
foreach
(
$fieldstosearchall
as
$key
=>
$val
)
$fieldstosearchall
[
$key
]
=
$langs
->
trans
(
$val
);
print
$langs
->
trans
(
"FilterOnInto"
,
$sall
)
.
join
(
', '
,
$fieldstosearchall
);
}
$moreforfilter
=
''
;
//$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
//$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print
'<table class="liste '
.
(
$moreforfilter
?
"listwithfilterbefore"
:
""
)
.
'">'
;
print
'<tr class="liste_titre">'
;
print_liste_field_titre
(
$langs
->
trans
(
"Group"
),
$_SERVER
[
"PHP_SELF"
],
"g.nom"
,
$param
,
""
,
""
,
$sortfield
,
$sortorder
);
//multicompany
...
...
This diff is collapsed.
Click to expand it.
htdocs/user/home.php
+
7
−
15
View file @
84f4f2d4
<?php
/* Copyright (C) 2005-201
3
Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-201
6
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -63,31 +63,23 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Search User
$var
=
false
;
print
'<form method="post" action="'
.
DOL_URL_ROOT
.
'/
user/index
.php">'
;
print
'<form method="post" action="'
.
DOL_URL_ROOT
.
'/
core/search
.php">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<table class="noborder nohover" width="100%">'
;
print
'<tr class="liste_titre"><td colspan="3">'
.
$langs
->
trans
(
"Search
AUser
"
)
.
'</td></tr>'
;
print
'<tr class="liste_titre"><td colspan="3">'
.
$langs
->
trans
(
"Search"
)
.
'</td></tr>'
;
print
'<tr '
.
$bc
[
$var
]
.
'><td>'
;
print
$langs
->
trans
(
"Ref"
)
.
':</td><td><input class="flat" type="text" name="search_user" size="18"></td><td rowspan="2"><input type="submit" value="'
.
$langs
->
trans
(
"Search"
)
.
'" class="button"></td></tr>'
;
print
'<tr '
.
$bc
[
$var
]
.
'><td class="nowrap">'
.
$langs
->
trans
(
"Other"
)
.
':</td><td><input type="text" class="flat" name="sall" size="18"></td></tr>'
;
print
"</table><br>
\n
"
;
print
'</form>'
;
print
$langs
->
trans
(
"User"
)
.
':</td><td><input class="flat" type="text" name="search_user" size="18"></td><td'
.
(
$canreadperms
?
' rowspan="2"'
:
''
)
.
'><input type="submit" value="'
.
$langs
->
trans
(
"Search"
)
.
'" class="button"></td></tr>'
;
// Search Group
if
(
$canreadperms
)
{
$var
=
false
;
print
'<form method="post" action="'
.
DOL_URL_ROOT
.
'/user/group/index.php">'
;
print
'<input type="hidden" name="token" value="'
.
$_SESSION
[
'newtoken'
]
.
'">'
;
print
'<table class="noborder nohover" width="100%">'
;
print
'<tr class="liste_titre"><td colspan="3">'
.
$langs
->
trans
(
"SearchAGroup"
)
.
'</td></tr>'
;
print
'<tr '
.
$bc
[
$var
]
.
'><td>'
;
print
$langs
->
trans
(
"Ref"
)
.
':</td><td><input class="flat" type="text" name="search_group" size="18"></td><td rowspan="2"><input type="submit" value="'
.
$langs
->
trans
(
"Search"
)
.
'" class="button"></td></tr>'
;
print
'<tr '
.
$bc
[
$var
]
.
'><td class="nowrap">'
.
$langs
->
trans
(
"Other"
)
.
':</td><td><input type="text" class="flat" name="sall" size="18"></td></tr>'
;
print
"</table><br>
\n
"
;
print
'</form>'
;
print
$langs
->
trans
(
"Group"
)
.
':</td><td><input class="flat" type="text" name="search_group" size="18"></td></tr>'
;
}
print
"</table><br>
\n
"
;
print
'</form>'
;
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
print
'</div><div class="fichetwothirdright"><div class="ficheaddleft">'
;
...
...
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