Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
agallavardin
fusiondirectory-plugins
Commits
55d4678a
Commit
55d4678a
authored
12 years ago
by
Côme Bernigaud
Committed by
Benoit Mortier
12 years ago
Browse files
Options
Download
Patches
Plain Diff
Fixes: #2221 Systems now snapshots dhcp and dns
parent
d2b6e0d3
1.4-dev
1.0.19-2-debian
1.2
1.2.3-fixes
1.3-fixes
6017-create-a-plugin-for-managing-groupofuniquename
master
fusiondirectory-1.3
fusiondirectory-1.2.3
fusiondirectory-1.2.2
fusiondirectory-1.2.1
fusiondirectory-1.2
fusiondirectory-1.1.1
fusiondirectory-1.1
fusiondirectory-1.0.20
fusiondirectory-1.0.19
fusiondirectory-1.0.18
fusiondirectory-1.0.17
fusiondirectory-1.0.16
fusiondirectory-1.0.15
fusiondirectory-1.0.14
fusiondirectory-1.0.13
fusiondirectory-1.0.12
fusiondirectory-1.0.11
fusiondirectory-1.0.10
fusiondirectory-1.0.9.3
fusiondirectory-1.0.9.2
fusiondirectory-1.0.9.1
fusiondirectory-1.0.9
fusiondirectory-1.0.8.9
fusiondirectory-1.0.8.8
fusiondirectory-1.0.8.7
fusiondirectory-1.0.8.6
fusiondirectory-1.0.8.5
fusiondirectory-1.0.8.4
fusiondirectory-1.0.8.3
fusiondirectory-1.0.8.2
fusiondirectory-1.0.8.1
fusiondirectory-1.0.8
fusiondirectory-1.0.7.5
fusiondirectory-1.0.7.4
fusiondirectory-1.0.7.3
fusiondirectory-1.0.7.2
fusiondirectory-1.0.7.1
fusiondirectory-1.0.7
fusiondirectory-1.0.6
fusiondirectory-1.0.5
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
systems/admin/systems/class_systemManagement.inc
+35
-0
systems/admin/systems/class_systemManagement.inc
with
35 additions
and
0 deletions
+35
-0
systems/admin/systems/class_systemManagement.inc
+
35
−
0
View file @
55d4678a
...
...
@@ -325,6 +325,41 @@ class systemManagement extends management
}
}
function
saveSnapshot
(
$action
=
""
,
$target
=
array
(),
$all
=
array
())
{
if
(
!
is_object
(
$this
->
dialogObject
))
return
;
$this
->
dialogObject
->
save_object
();
$msgs
=
$this
->
dialogObject
->
check
();
if
(
count
(
$msgs
))
{
foreach
(
$msgs
as
$msg
)
{
msg_dialog
::
display
(
_
(
"Error"
),
$msg
,
ERROR_DIALOG
);
}
}
else
{
$this
->
dn
=
$this
->
dialogObject
->
dn
;
$dns
=
array
(
$this
->
dn
);
/* Check if other dns needs to be included in this snapshot */
$entry
=
$this
->
getHeadpage
()
->
getEntry
(
$this
->
dn
);
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
->
cd
(
$this
->
config
->
current
[
'BASE'
]);
/* DHCP entry */
$ldap
->
search
(
"(&(objectClass=dhcpHost)(cn="
.
$entry
[
'cn'
][
0
]
.
"))"
,
array
(
"uid"
,
"cn"
,
"dn"
));
if
(
$ldap
->
count
())
{
$attr
=
$ldap
->
fetch
();
$dns
[]
=
$attr
[
'dn'
];
}
/* DNS entry */
$dnsEntry
=
DNS
::
getDNSHostEntries
(
$this
->
config
,
$entry
[
'cn'
][
0
]);
if
(
$dnsEntry
[
'exists'
])
{
$dns
[]
=
"relativeDomainName="
.
$entry
[
'cn'
][
0
]
.
","
.
DNS
::
getDNSZoneDN
(
$this
->
config
,
$dnsEntry
[
'zoneName'
]);
}
print_r
(
$dns
);
$this
->
snapHandler
->
create_snapshot
(
$dns
,
$this
->
dialogObject
->
CurrentDescription
);
@
DEBUG
(
DEBUG_TRACE
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$this
->
dn
,
"Snaptshot created!"
);
$this
->
closeDialogs
();
}
}
/*! \brief Queue selected objects to be removed.
* Checks ACLs, Locks and ask for confirmation.
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets