Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
b4089afe
Commit
b4089afe
authored
Oct 12, 2015
by
Côme Chilliet
Browse files
Fixes
#4195
Avoiding problems with incomplete object groups nodes
parent
78570cde
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/admin/groups/class_groupManagement.inc
View file @
b4089afe
...
...
@@ -50,8 +50,12 @@ class groupManagement extends simpleManagement
static
function
filterProperties
(
$row
,
$dn
,
$gosaGroupObjects
=
NULL
)
{
if
(
!
empty
(
$gosaGroupObjects
))
{
return
self
::
filterGroupObjects
(
$row
,
$gosaGroupObjects
);
if
(
objects
::
isOfType
(
$attrs
,
'ogroup'
))
{
if
(
empty
(
$gosaGroupObjects
))
{
return
' '
;
}
else
{
return
self
::
filterGroupObjects
(
$row
,
$gosaGroupObjects
);
}
}
global
$config
;
static
$grouptabs
=
array
();
...
...
@@ -71,9 +75,9 @@ class groupManagement extends simpleManagement
// Load information if needed
$ldap
=
$config
->
get_ldap_link
();
$ldap
->
cat
(
$dn
);
$result
=
"
<input class=
'
center
'
type=
'
image
'
src=
'
geticon.php?context=types&icon=user-group&size=16
' "
.
"
alt=
'
"
.
_
(
'Posix'
)
.
"
' title=
'
"
.
_
(
'Edit posix properties'
)
.
"' "
.
"
name=
'
listing_edit_tab_group_
$row
'
style=
'
padding:1px
'
/>
"
;
$result
=
'
<input class=
"
center
"
type=
"
image
"
src=
"
geticon.php?context=types&icon=user-group&size=16
" '
.
'
alt="
'
.
_
(
'Posix'
)
.
'
"
title="
'
.
_
(
'Edit posix properties'
)
.
'" '
.
'
name=
"
listing_edit_tab_group_
'
.
$row
.
'"
style=
"
padding:1px
"
/>
'
;
if
(
$attrs
=
$ldap
->
fetch
())
{
if
(
objects
::
isOfType
(
$attrs
,
'role'
))
{
return
'<input class="center" type="image" src="geticon.php?context=types&icon=role&size=16" '
.
...
...
@@ -84,9 +88,9 @@ class groupManagement extends simpleManagement
if
(
$grouptab
->
is_this_account
(
$attrs
))
{
$infos
=
pluglist
::
pluginInfos
(
$class
);
if
(
isset
(
$infos
[
'plSmallIcon'
]))
{
$result
.
=
"
<input class=
'
center
'
type=
'
image
'
src=
'
"
.
htmlentities
(
$infos
[
'plSmallIcon'
],
ENT_COMPAT
,
'UTF-8'
)
.
"' "
.
"
alt=
'
"
.
$infos
[
'plShortName'
]
.
"
' title=
'
"
.
$infos
[
'plShortName'
]
.
"' "
.
"
name=
'
listing_edit_tab_
"
.
$class
.
"_
$row
'
style=
'
padding:1px
'
/>
"
;
$result
.
=
'
<input class=
"
center
"
type=
"
image
"
src="
'
.
htmlentities
(
$infos
[
'plSmallIcon'
],
ENT_COMPAT
,
'UTF-8'
)
.
'" '
.
'
alt="
'
.
$infos
[
'plShortName'
]
.
'
"
title="
'
.
$infos
[
'plShortName'
]
.
'" '
.
'
name=
"
listing_edit_tab_
'
.
$class
.
'_'
.
$row
.
'"
style=
"
padding:1px
"
/>
'
;
}
else
{
@
DEBUG
(
DEBUG_TRACE
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$infos
[
'plShortName'
]
.
" (
$class
)"
,
'No icon for'
);
}
...
...
@@ -101,8 +105,8 @@ class groupManagement extends simpleManagement
static
function
filterGroupObjects
(
$row
,
$gosaGroupObjects
)
{
$types
=
preg_replace
(
"
/[^a-z]/i
"
,
""
,
$gosaGroupObjects
[
0
]);
$result
=
""
;
$types
=
preg_replace
(
'
/[^a-z]/i
'
,
''
,
$gosaGroupObjects
[
0
]);
$result
=
''
;
for
(
$i
=
0
;
$i
<
strlen
(
$types
);
$i
++
)
{
if
(
$types
[
$i
]
==
'I'
)
{
continue
;
...
...
@@ -111,7 +115,7 @@ class groupManagement extends simpleManagement
$result
.
=
'<img class="center" src="'
.
htmlentities
(
$info
[
'icon'
],
ENT_COMPAT
,
'UTF-8'
)
.
'" '
.
'alt="'
.
$info
[
'name'
]
.
'" title="'
.
$info
[
'name'
]
.
'" style="padding:1px"/>'
;
}
if
(
$result
==
""
)
{
if
(
$result
==
''
)
{
return
' '
;
}
return
$result
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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