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
fusiondirectory
fusiondirectory
Commits
6f90084e
Commit
6f90084e
authored
8 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
Removed recursive_remove (unused and did the same thing as rmdir_recursive)
parent
31febd47
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
fusiondirectory-1.3.1
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
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class_ldap.inc
+3
-26
include/class_ldap.inc
include/class_ldapMultiplexer.inc
+1
-1
include/class_ldapMultiplexer.inc
with
4 additions
and
27 deletions
+4
-27
include/class_ldap.inc
+
3
−
26
View file @
6f90084e
...
@@ -665,7 +665,7 @@ class LDAP
...
@@ -665,7 +665,7 @@ class LDAP
/*!
/*!
* \brief Function rmdir_recursive
* \brief Function rmdir_recursive
*
*
* Based
i
n recursive_remove, adding two thing: full subtree remove, and delete own node.
* Based
o
n recursive_remove, adding two thing: full subtree remove, and delete own node.
*
*
* \param $srp srp
* \param $srp srp
*
*
...
@@ -681,7 +681,7 @@ class LDAP
...
@@ -681,7 +681,7 @@ class LDAP
/* Get sorted list of dn's to delete */
/* Get sorted list of dn's to delete */
$this
->
cd
(
$deletedn
);
$this
->
cd
(
$deletedn
);
$this
->
search
(
$srp
,
"
(objectClass=*)
"
,
array
(
'dn'
));
$this
->
search
(
$srp
,
'
(objectClass=*)
'
,
array
(
'dn'
));
while
(
$attrs
=
$this
->
fetch
(
$srp
))
{
while
(
$attrs
=
$this
->
fetch
(
$srp
))
{
$delarray
[
$attrs
[
'dn'
]]
=
strlen
(
$attrs
[
'dn'
]);
$delarray
[
$attrs
[
'dn'
]]
=
strlen
(
$attrs
[
'dn'
]);
}
}
...
@@ -690,7 +690,7 @@ class LDAP
...
@@ -690,7 +690,7 @@ class LDAP
/* Really Delete ALL dn's in subtree */
/* Really Delete ALL dn's in subtree */
foreach
(
array_keys
(
$delarray
)
as
$key
)
{
foreach
(
array_keys
(
$delarray
)
as
$key
)
{
$r
=
@
ldap_delete
(
$this
->
cid
,
LDAP
::
fix
(
$key
)
)
;
$r
=
@
ldap_delete
(
$this
->
cid
,
$key
);
if
(
$r
===
FALSE
)
{
if
(
$r
===
FALSE
)
{
break
;
break
;
}
}
...
@@ -901,29 +901,6 @@ class LDAP
...
@@ -901,29 +901,6 @@ class LDAP
return
TRUE
;
return
TRUE
;
}
}
/*!
* \brief Recursive remove
*
* \param integer $srp
*/
function
recursive_remove
(
$srp
)
{
$delarray
=
array
();
/* Get sorted list of dn's to delete */
$this
->
search
(
$srp
,
'(objectClass=*)'
);
while
(
$attrs
=
$this
->
fetch
(
$srp
))
{
$delarray
[
$attrs
[
'dn'
]]
=
strlen
(
$attrs
[
'dn'
]);
}
arsort
(
$delarray
);
reset
(
$delarray
);
/* Delete all dn's in subtree */
foreach
(
array_keys
(
$delarray
)
as
$key
)
{
$this
->
rmdir
(
$key
);
}
}
/*!
/*!
* \brief Read a entry from a directory
* \brief Read a entry from a directory
*
*
...
...
This diff is collapsed.
Click to expand it.
include/class_ldapMultiplexer.inc
+
1
−
1
View file @
6f90084e
...
@@ -60,7 +60,7 @@ class ldapMultiplexer {
...
@@ -60,7 +60,7 @@ class ldapMultiplexer {
public
function
__call
(
$methodName
,
$parameters
)
public
function
__call
(
$methodName
,
$parameters
)
{
{
/* Add resource pointer if the mentioned methods are used */
/* Add resource pointer if the mentioned methods are used */
if
(
in_array
(
$methodName
,
array
(
'search'
,
'ls'
,
'cat'
,
'fetch'
,
'clearResult'
,
'resetResult'
,
'count'
,
'getDN'
,
'
recursive_remove'
,
'
rmdir_recursive'
,
'create_missing_trees'
,
'import_single_entry'
,
'import_complete_ldif'
)))
{
if
(
in_array
(
$methodName
,
array
(
'search'
,
'ls'
,
'cat'
,
'fetch'
,
'clearResult'
,
'resetResult'
,
'count'
,
'getDN'
,
'rmdir_recursive'
,
'create_missing_trees'
,
'import_single_entry'
,
'import_complete_ldif'
)))
{
array_unshift
(
$parameters
,
$this
->
sr
);
array_unshift
(
$parameters
,
$this
->
sr
);
}
}
...
...
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