0 ) pla_error( "You cannot rename an entry which has children entries (eg, the rename operation is not allowed on non-leaf entries)" ); check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) ); have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." ); $ds = pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP sever" ); // build the container string $old_rdn = pla_explode_dn( $dn ); $container = $old_rdn[ 1 ]; for( $i=2; $i $children ) { foreach( $children as $i => $child_dn ) { if( 0 == strcasecmp( $child_dn, $old_dn ) ) { $tree[$server_id][$parent_dn][$i] = $new_dn; } } } // Update the icon tree to reflect the change (remove the old DN and add the new one) $tree_icons[ $server_id ][ $new_dn ] = $tree_icons[ $server_id ][ $old_dn ]; unset( $tree_icons[ $server_id ][ $old_dn ] ); $_SESSION['tree'] = $tree; $_SESSION['tree_icons'] = $tree_icons; session_write_close(); $edit_url="edit.php?server_id=$server_id&dn=" . rawurlencode( "$new_rdn,$container" ); ?> Redirecting... click here if you're impatient.