From 03bc1ce70e982f1f1fd4ea5ad590de4944cae1a6 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 6 Jul 2009 13:08:45 +1000 Subject: [PATCH] Fix query to find children, add size_limit to query to ensure we get all children --- htdocs/delete_form.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/delete_form.php b/htdocs/delete_form.php index fbdf91d..8b3aec3 100644 --- a/htdocs/delete_form.php +++ b/htdocs/delete_form.php @@ -19,7 +19,10 @@ $request['dn'] = get_request('dn','GET'); # Check if the entry exists. if (! $request['dn'] || ! $app['server']->dnExists($request['dn'])) - error(sprintf(_('The entry (%s) does not exist.'),$request['dn']),'error','index.php'); + system_message(array( + 'title'=>_('Entry does not exist'), + 'body'=>sprintf('%s (%s)',_('The entry does not exist'),$request['dn']), + 'type'=>'error'),'index.php'); # We search all children, not only the visible children in the tree $request['children'] = $app['server']->getContainerContents($request['dn'],null,0,'(objectClass=*)',LDAP_DEREF_NEVER); @@ -34,13 +37,14 @@ echo '
'; if (count($request['children'])) { printf('%s

',_('Permanently delete all children also?')); - $search['href'] = htmlspecialchars(sprintf('cmd.php?cmd=search&search=true&server_id=%s&filter=%s&base_dn=%s&form=advanced&scope=sub', + $search['href'] = htmlspecialchars(sprintf('cmd.php?cmd=query_engine&server_id=%s&filter=%s&base=%s&scope=sub&query=none&format=list', $app['server']->getIndex(),rawurlencode('objectClass=*'),rawurlencode($request['dn']))); $query = array(); $query['base'] = $request['dn']; $query['scope'] = 'sub'; $query['attrs'] = array('dn'); + $query['size_limit'] = 0; $query['deref'] = LDAP_DEREF_NEVER; $request['search'] = $app['server']->query($query,null);