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
69888aa5
Commit
69888aa5
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: get_full_tree was not working correctly.
parent
1239e713
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/user/class/user.class.php
+6
-6
6 additions, 6 deletions
htdocs/user/class/user.class.php
with
6 additions
and
6 deletions
htdocs/user/class/user.class.php
+
6
−
6
View file @
69888aa5
...
...
@@ -2196,8 +2196,8 @@ class User extends CommonObject
// Load array[child]=parent
$sql
=
"SELECT fk_user as id_parent, rowid as id_son"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"user"
;
$sql
.
=
" WHERE fk_user
!=
0"
;
$sql
.
=
" AND entity
= "
.
$conf
->
entity
;
$sql
.
=
" WHERE fk_user
<>
0"
;
$sql
.
=
" AND entity
IN ("
.
getEntity
(
'user'
,
1
)
.
")"
;
dol_syslog
(
get_class
(
$this
)
.
"::load_parentof sql="
.
$sql
);
$resql
=
$this
->
db
->
query
(
$sql
);
...
...
@@ -2237,7 +2237,7 @@ class User extends CommonObject
// Init this->parentof that is array(id_son=>id_parent, ...)
$this
->
load_parentof
();
// Init $this->users array
$sql
=
"SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut, u.entity"
;
// Distinct reduce pb with old tables with duplicates
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"user as u"
;
...
...
@@ -2326,13 +2326,13 @@ class User extends CommonObject
// Define fullpath and fullname
$this
->
users
[
$id_user
][
'fullpath'
]
=
'_'
.
$id_user
;
$this
->
users
[
$id_user
][
'fullname'
]
=
$this
->
users
[
$id_user
][
'la
bel
'
];
$this
->
users
[
$id_user
][
'fullname'
]
=
$this
->
users
[
$id_user
][
'la
stname
'
];
$i
=
0
;
$cursor_user
=
$id_user
;
while
((
empty
(
$protection
)
||
$i
<
$protection
)
&&
!
empty
(
$this
->
parentof
[
$cursor_user
]))
while
((
empty
(
$protection
)
||
$i
<
$protection
)
&&
!
empty
(
$this
->
parentof
[
$cursor_user
]))
// Loop on each parent, one after one
{
$this
->
users
[
$id_user
][
'fullpath'
]
=
'_'
.
$this
->
parentof
[
$cursor_user
]
.
$this
->
users
[
$id_user
][
'fullpath'
];
$this
->
users
[
$id_user
][
'fullname'
]
=
$this
->
users
[
$this
->
parentof
[
$cursor_user
]][
'la
bel
'
]
.
' >> '
.
$this
->
users
[
$id_user
][
'fullname'
];
$this
->
users
[
$id_user
][
'fullname'
]
=
$this
->
users
[
$this
->
parentof
[
$cursor_user
]][
'la
stname
'
]
.
' >> '
.
$this
->
users
[
$id_user
][
'fullname'
];
$i
++
;
$cursor_user
=
$this
->
parentof
[
$cursor_user
];
}
...
...
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