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
fusiondirectory
fusiondirectory-plugins
Commits
e2bd260b
Commit
e2bd260b
authored
Jun 02, 2014
by
Côme Bernigaud
Committed by
Benoit Mortier
Jun 02, 2014
Browse files
Fixes
#3145
Missing class OPSIServerAttribute
parent
40909cf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
opsi/admin/opsi/class_opsiProfile.inc
View file @
e2bd260b
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 201
3
FusionDirectory
Copyright (C) 201
4
FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -18,21 +18,37 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class
Submitting
OPSIServerAttribute
extends
OPSIServer
Attribute
class
OPSIServerAttribute
extends
Select
Attribute
{
function
__construct
(
$label
,
$description
,
$ldapName
,
$required
=
FALSE
,
$acl
=
""
)
function
setParent
(
&
$plugin
)
{
parent
::
__construct
(
$label
,
$description
,
$ldapName
,
$required
,
array
(),
""
,
NULL
,
$acl
);
$this
->
setSubmitForm
(
TRUE
);
parent
::
setParent
(
$plugin
);
if
(
is_object
(
$this
->
plugin
))
{
$this
->
updateChoices
();
}
}
function
setValue
(
$value
)
function
updateChoices
(
)
{
$v
=
$this
->
getValue
();
parent
::
setValue
(
$value
);
if
(
is_object
(
$this
->
plugin
)
&&
(
$v
!=
$this
->
getValue
()))
{
$this
->
plugin
->
server_changed
();
$ldap
=
$this
->
plugin
->
config
->
get_ldap_link
();
$ldap
->
cd
(
$this
->
plugin
->
config
->
current
[
'BASE'
]);
$ldap
->
search
(
'(objectClass=opsiServer)'
,
array
(
'cn'
));
$serversdn
=
array
();
$serverslabel
=
array
();
while
(
$attrs
=
$ldap
->
fetch
())
{
$serversdn
[]
=
$attrs
[
'dn'
];
$serverslabel
[]
=
$attrs
[
'cn'
][
0
];
}
$this
->
setChoices
(
$serversdn
,
$serverslabel
);
}
}
class
SubmittingOPSIServerAttribute
extends
OPSIServerAttribute
{
function
__construct
(
$label
,
$description
,
$ldapName
,
$required
=
FALSE
,
$acl
=
""
)
{
parent
::
__construct
(
$label
,
$description
,
$ldapName
,
$required
,
array
(),
""
,
NULL
,
$acl
);
$this
->
setSubmitForm
(
'server_changed'
);
}
}
...
...
agallavardin
@agallavardin
mentioned in issue
#966 (closed)
·
Sep 02, 2017
mentioned in issue
#966 (closed)
mentioned in issue #966
Toggle commit list
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