RELEASE 1.1.0

This commit is contained in:
Deon George
2009-06-30 20:46:00 +10:00
parent a08bc4e9e1
commit dd581eb5c8
191 changed files with 25012 additions and 10177 deletions

View File

@@ -1,11 +1,9 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/copy_form.php,v 1.29 2007/03/18 02:18:14 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/copy_form.php,v 1.30 2007/12/15 07:50:30 wurley Exp $
/**
* Copies a given object to create a new one.
*
* Variables that come in via common.php
* - server_id
* Variables that come in via GET variables
* - dn (rawurlencoded)
*
@@ -18,22 +16,17 @@ require './common.php';
if ($ldapserver->isReadOnly())
pla_error(_('You cannot perform updates while server is in read-only mode'));
if (! $ldapserver->haveAuthInfo())
pla_error(_('Not enough information to login to server. Please check your configuration.'));
$dn = $_GET['dn'] ;
$rdn = get_rdn($dn);
$attrs = $ldapserver->getDNAttrs($dn);
$select_server_html = server_select_list($ldapserver->server_id,true,'dest_server_id');
$children = $ldapserver->getContainerContents($dn);
$entry['dn'] = get_request('dn','GET');
$entry['rdn'] = get_rdn($entry['dn']);
include './header.php';
# We search all children, not only the visible children in the tree
$entry['children'] = $ldapserver->getContainerContents($entry['dn']);
# Draw some javaScrpt to enable/disable the filter field if this may be a recursive copy
if (is_array($children) && count($children) > 0) { ?>
if (is_array($entry['children']) && count($entry['children']) > 0) { ?>
<script type="text/javascript" language="javascript">
//<!--
function toggle_disable_filter_field(recursive_checkbox)
{
if (recursive_checkbox.checked) {
@@ -45,24 +38,21 @@ if (is_array($children) && count($children) > 0) { ?>
recursive_checkbox.form.filter.disabled = true;
}
}
//-->
</script>
<?php
}
<?php }
echo '<body>';
printf('<h3 class="title">%s %s</h3>',_('Copy'),htmlspecialchars($rdn));
printf('<h3 class="title">%s %s</h3>',_('Copy'),htmlspecialchars($entry['rdn']));
printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',_('Server'),$ldapserver->name,
_('Distinguished Name'),htmlspecialchars($dn));
_('Distinguished Name'),htmlspecialchars($entry['dn']));
echo "\n";
echo '<center>';
printf('%s <b>%s</b> %s:<br /><br />',_('Copy'),htmlspecialchars($rdn),_('to a new object'));
printf('%s <b>%s</b> %s:<br /><br />',_('Copy'),htmlspecialchars($entry['rdn']),_('to a new object'));
echo '<form action="copy.php" method="post" name="copy_form">';
printf('<input type="hidden" name="old_dn" value="%s" />',htmlspecialchars($dn));
echo '<form action="cmd.php" method="post" name="copy_form">';
echo '<input type="hidden" name="cmd" value="copy" />';
printf('<input type="hidden" name="old_dn" value="%s" />',htmlspecialchars($entry['dn']));
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
echo "\n";
@@ -72,15 +62,15 @@ echo "\n";
echo '<tr>';
printf('<td><acronym title="%s">%s</acronym>:</td>',
_('The full DN of the new entry to be created when copying the source entry'),_('Destination DN'));
printf('<td><input type="text" name="new_dn" size="45" value="%s" />',htmlspecialchars($dn));
draw_chooser_link('copy_form.new_dn','true',htmlspecialchars($rdn));
printf('<td><input type="text" name="new_dn" size="45" value="%s" />',htmlspecialchars($entry['dn']));
draw_chooser_link('copy_form.new_dn','true',htmlspecialchars($entry['rdn']));
echo '</td></tr>';
echo "\n";
printf('<tr><td>%s</td><td>%s</td></tr>',_('Destination Server'),$select_server_html);
printf('<tr><td>%s</td><td>%s</td></tr>',_('Destination Server'),server_select_list($ldapserver->server_id,true,'dest_server_id'));
echo "\n";
if (is_array($children) && count($children) > 0) {
if (is_array($entry['children']) && count($entry['children']) > 0) {
echo '<tr>';
printf('<td><label for="recursive">%s</label>:</td>',_('Recursive copy'));
echo '<td><input type="checkbox" id="recursive" name="recursive" onClick="toggle_disable_filter_field(this)" />';
@@ -94,7 +84,7 @@ if (is_array($children) && count($children) > 0) {
echo '<tr>';
printf('<td>%s</td>',_('Delete after copy (move):'));
echo '<td><input type="checkbox" name="remove" value="yes"/ disabled>';
echo '<td><input type="checkbox" name="remove" value="yes" disabled />';
printf('<small>(%s)</small)</td>',_('Make sure your filter (above) will select all child records.'));
echo '</tr>';
@@ -108,15 +98,8 @@ echo "\n";
echo '</table></form>';
echo "\n";
echo '<script type="text/javascript" language="javascript">';
echo '<!--';
echo '/* If the user uses the back button, this way we draw the filter field properly. */';
echo 'toggle_disable_filter_field(document.copy_form.recursive);';
echo '//-->';
echo '</script>';
if ($config->GetValue('appearance','show_hints'))
if ($_SESSION['plaConfig']->GetValue('appearance','show_hints'))
printf('<small><img src="images/light.png" alt="Light" /><span class="hint">%s</span></small>',_('Hint: Copying between different servers only works if there are no schema violations'));
echo '</center></body></html>';
echo '</center>';
?>