\n";
echo "
Copying " . htmlspecialchars( $source_dn ) . "
\n";
echo "Recursive copy progress
\n";
echo "
";
echo "\n";
echo "Building snapshot of tree to copy... ";
flush();
build_tree( $source_server_id, $source_dn, $snapshot_tree );
echo " Success
\n";
flush();
// prevent script from bailing early on a long delete
@set_time_limit( 0 );
$copy_result = r_copy_dn( $source_server_id, $dest_server_id, $snapshot_tree, $source_dn, $dest_dn );
echo "\n";
} else {
$copy_result = copy_dn( $source_server_id, $source_dn, $dest_server_id, $dest_dn );
}
if( $copy_result )
{
$edit_url="edit.php?server_id=$dest_server_id&dn=" . rawurlencode( $dest_dn );
$new_rdn = get_rdn( $dest_dn );
$container = get_container( $dest_dn );
if( session_is_registered( 'tree' ) )
{
$tree = $_SESSION['tree'];
$tree_icons = $_SESSION['tree_icons'];
if( isset( $tree[$dest_server_id][$container] ) )
{
$tree[$dest_server_id][$container][] = $dest_dn;
$tree_icons[$dest_server_id][$dest_dn] = get_icon( $dest_server_id, $dest_dn );
$_SESSION['tree'] = $tree;
$_SESSION['tree_icons'] = $tree_icons;
session_write_close();
}
}
?>
Copy successful! Would you like to view the new entry?