RELEASE 0.9.8

This commit is contained in:
Deon George
2009-06-30 20:26:08 +10:00
parent 1f7f96122f
commit fdee1bdbd1
242 changed files with 34529 additions and 34446 deletions

View File

@@ -1,11 +1,12 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare.php,v 1.10.2.3 2005/10/16 20:19:16 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare.php,v 1.12.2.5 2005/12/17 01:28:33 wurley Exp $
/**
* Compare two DNs - the destination DN is editable.
* @package phpLDAPadmin
*/
/**
* @todo: Must fix dc/domainComponent evaluation.
*/
require './common.php';
@@ -20,20 +21,22 @@ $server_id_src = (isset($_POST['server_id_src']) ? $_POST['server_id_src'] : '')
$server_id_dst = (isset($_POST['server_id_dst']) ? $_POST['server_id_dst'] : '');
$ldapserver_src = $ldapservers->Instance($server_id_src);
if ( ! $ldapserver_src->haveAuthInfo())
pla_error($lang['not_enough_login_info']);
if (! $ldapserver_src->haveAuthInfo())
pla_error(_('Not enough information to login to server. Please check your configuration.'));
$ldapserver_dst = $ldapservers->Instance($server_id_dst);
if ( ! $ldapserver_src->haveAuthInfo())
pla_error($lang['not_enough_login_info']);
if (! $ldapserver_src->haveAuthInfo())
pla_error(_('Not enough information to login to server. Please check your configuration.'));
dn_exists($ldapserver_src,$dn_src) or pla_error(sprintf($lang['no_such_entry'],pretty_print_dn($dn_src)));
dn_exists($ldapserver_dst,$dn_dst) or pla_error(sprintf($lang['no_such_entry'],pretty_print_dn($dn_dst)));
if (! $ldapserver_src->dnExists($dn_src))
pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn_src)));
if (! $ldapserver_dst->dnExists($dn_dst))
pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn_dst)));
$friendly_attrs = process_friendly_attr_table();
$attrs_src = get_object_attrs($ldapserver_src,$dn_src,false,$config->GetValue('deref','view'));
$attrs_dst = get_object_attrs($ldapserver_dst,$dn_dst,false,$config->GetValue('deref','view'));
$attrs_src = $ldapserver_src->getDNAttrs($dn_src,false,$config->GetValue('deref','view'));
$attrs_dst = $ldapserver_dst->getDNAttrs($dn_dst,false,$config->GetValue('deref','view'));
# Get a list of all attributes.
$attrs_all = array_keys($attrs_src);
@@ -48,18 +51,18 @@ include './header.php';
<table class="comp_dn" border=0>
<tr><td colspan=6>
<h3 class="title"><?php echo $lang['comparing']; ?></h3>
<h3 class="title"><?php echo _('Comparing the following DNs'); ?></h3>
</td></tr>
<tr>
<td colspan=2 width=20%>
<h3 class="subtitle"><?php echo $lang['attribute']; ?><br />&nbsp;</h3>
<h3 class="subtitle"><?php echo _('Attribute'); ?><br />&nbsp;</h3>
</td>
<td colspan=2 width=40%>
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $ldapserver_src->name; ?></b><br /><?php echo $lang['distinguished_name'];?>: <b><?php echo htmlspecialchars(($dn_src)); ?></b></h3>
<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver_src->name; ?></b><br /><?php echo _('Distinguished Name');?>: <b><?php echo htmlspecialchars(($dn_src)); ?></b></h3>
</td>
<td colspan=2 width=40%>
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $ldapserver_dst->name; ?></b><br /><?php echo $lang['distinguished_name'];?>: <b><?php echo htmlspecialchars(($dn_dst)); ?></b></h3>
<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver_dst->name; ?></b><br /><?php echo _('Distinguished Name');?>: <b><?php echo htmlspecialchars(($dn_dst)); ?></b></h3>
</td>
</tr>
<tr>
@@ -67,16 +70,16 @@ include './header.php';
<form action="compare.php" method="post" name="compare_form">
<input type="hidden" name="server_id_src" value="<?php echo $ldapserver_dst->server_id; ?>" />
<input type="hidden" name="server_id_dst" value="<?php echo $ldapserver_src->server_id; ?>" />
<input type="hidden" name="dn_src" value="<?php echo htmlspecialchars( $dn_dst ); ?>" />
<input type="hidden" name="dn_dst" value="<?php echo htmlspecialchars( $dn_src ); ?>" />
<input type="submit" value="<?php echo $lang['switch_entry']; ?>" />
<input type="hidden" name="dn_src" value="<?php echo htmlspecialchars($dn_dst); ?>" />
<input type="hidden" name="dn_dst" value="<?php echo htmlspecialchars($dn_src); ?>" />
<input type="submit" value="<?php echo _('Switch Entry'); ?>" />
</form>
</td>
</tr>
<?php
if(! $attrs_all || ! is_array($attrs_all)) {
printf('<tr><td colspan="2">(%s)</td></tr>',$lang['no_attributes']);
if (! $attrs_all || ! is_array($attrs_all)) {
printf('<tr><td colspan="2">(%s)</td></tr>',_('This entry has no attributes'));
print '</table>';
print '</html>';
die();
@@ -93,7 +96,7 @@ foreach ($attrs_all as $attr) {
continue;
# Has the config.php specified that this attribute is to be hidden or shown?
if (is_attr_hidden($ldapserver_src,$attr) || is_attr_hidden($ldapserver_dst,$attr))
if ($ldapserver_src->isAttrHidden($attr) || $ldapserver_dst->isAttrHidden($attr))
continue;
?>
@@ -121,7 +124,7 @@ foreach ($attrs_all as $attr) {
# is there a user-friendly translation available for this attribute?
if (isset($friendly_attrs[strtolower($attr)])) {
$attr_display = $friendly_attrs[strtolower($attr)];
$attr_note = sprintf('<acronym title="%s">alias</acronym>',sprintf($lang['alias_for'],$attr_display,$attr));
$attr_note = sprintf('<acronym title="%s">alias</acronym>',sprintf(_('Note: \'%s\' is an alias for \'%s\''),$attr_display,$attr));
} else {
$attr_note = '';
@@ -139,7 +142,7 @@ foreach ($attrs_all as $attr) {
$required_by .= $required . ' ';
# It seems that some LDAP servers (Domino) returns attributes in lower case?
elseif( isset($attrs_src['objectclass']) && in_array(strtolower($required),arrayLower($attrs_src['objectclass'])))
elseif (isset($attrs_src['objectclass']) && in_array(strtolower($required),arrayLower($attrs_src['objectclass'])))
$required_by .= $required . ' ';
break;
@@ -160,7 +163,7 @@ foreach ($attrs_all as $attr) {
if ($side == 'src') { ?>
<td class="attr">
<?php $schema_href="schema.php?server_id=$server_id_src&amp;view=attributes&amp;viewvalue=".real_attr_name($attr); ?>
<b><a title="<?php echo sprintf($lang['attr_name_tooltip'],$attr) ?>" href="<?php echo $schema_href; ?>"><?php echo $attr_display; ?></a></b>
<b><a title="<?php echo sprintf(_('Click to view the schema defintion for attribute type \'%s\''),$attr) ?>" href="<?php echo $schema_href; ?>"><?php echo $attr_display; ?></a></b>
</td>
<td class="attr_note">
@@ -169,7 +172,7 @@ foreach ($attrs_all as $attr) {
<?php }
if ($required_by) {
$required_note .= sprintf('<acronym title="%s">%s</acronym>',sprintf($lang['required_for'],$required_by),$lang['required']);
$required_note .= sprintf('<acronym title="%s">%s</acronym>',sprintf(_('Required attribute for objectClass(es) %s'),$required_by),_('required'));
?>
<td colspan=2 class="attr_note">
<sup><small><?php echo $required_note; ?></small></sup>
@@ -178,8 +181,8 @@ foreach ($attrs_all as $attr) {
<td colspan=2 class="attr_note">&nbsp;</td>
<?php } ?>
<?php if (is_attr_read_only($ldapserver,$attr)) { ?>
<small>(<acronym title="<?php echo $lang['read_only_tooltip']; ?>"><?php echo $lang['read_only']; ?></acronym>)</small>
<?php if ($ldapserver->isAttrReadOnly($attr)) { ?>
<small>(<acronym title="<?php echo _('This attribute has been flagged as read only by the phpLDAPadmin administrator'); ?>"><?php echo _('read only'); ?></acronym>)</small>
<?php } ?>
</td>
@@ -204,7 +207,7 @@ foreach ($attrs_all as $attr) {
print '<td colspan=2>&nbsp</td><td class="attr">';
if (! isset($attrs_src[$attr])) {
echo "<small>&lt;". $lang['no_value']."&gt;</small></td>";
echo "<small>&lt;". _('No Value')."&gt;</small></td>";
$toJump = 1;
continue;
} else
@@ -217,7 +220,7 @@ foreach ($attrs_all as $attr) {
print '<td colspan=2>&nbsp</td><td class="val">';
if (! isset($attrs_dst[$attr])) {
echo "<small>&lt;". $lang['no_value']."&gt;</small></td>";
echo "<small>&lt;". _('No Value')."&gt;</small></td>";
$toJump = 1;
continue;
} else
@@ -228,24 +231,26 @@ foreach ($attrs_all as $attr) {
}
if ($toJump) continue;
if (! is_array($vals))
$vals = array($vals);
/*
* Is this attribute a jpegPhoto?
*/
if (is_jpeg_photo($ldapserver,$attr)) {
if ($ldapserver->isJpegPhoto($attr)) {
switch ($side) {
case 'src':
// Don't draw the delete buttons if there is more than one jpegPhoto
// (phpLDAPadmin can't handle this case yet)
draw_jpeg_photos( $ldapserver, $dn_src, $attr, false );
draw_jpeg_photos($ldapserver,$dn_src,$attr,false);
break;
case 'dst':
if( $ldapserver_dst->isReadOnly() || is_attr_read_only( $ldapserver_dst, $attr ) )
draw_jpeg_photos( $ldapserver, $dn_dst, $attr, false );
if ($ldapserver_dst->isReadOnly() || $ldapserver_dst->isAttrReadOnly($attr))
draw_jpeg_photos($ldapserver,$dn_dst,$attr,false);
else
draw_jpeg_photos( $ldapserver, $dn_dst, $attr, true );
draw_jpeg_photos($ldapserver,$dn_dst,$attr,true);
break;
}
@@ -258,7 +263,7 @@ foreach ($attrs_all as $attr) {
/*
* Is this attribute binary?
*/
if( is_attr_binary( $ldapserver, $attr ) ) {
if ($ldapserver->isAttrBinary($attr)) {
switch ($side) {
case 'src':
$href = sprintf("download_binary_attr.php?server_id=%s&dn=%s&attr=%s",$ldapserver->server_id,$encoded_dn_src,$attr);
@@ -272,20 +277,20 @@ foreach ($attrs_all as $attr) {
<small>
<?php echo $lang['binary_value']; ?><br />
<?php echo _('Binary value'); ?><br />
<?php if( count( $vals ) > 1 ) { for( $i=1; $i<=count($vals); $i++ ) { ?>
<?php if (count($vals) > 1) { for($i=1; $i<=count($vals); $i++) { ?>
<a href="<?php echo $href . "&amp;value_num=$i"; ?>"><img
src="images/save.png" /> <?php echo $lang['download_value']; ?>(<?php echo $i; ?>)</a><br />
src="images/save.png" /> <?php echo _('download value'); ?>(<?php echo $i; ?>)</a><br />
<?php } } else { ?>
<a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo $lang['download_value']; ?></a><br />
<a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo _('download value'); ?></a><br />
<?php }
if( $side == 'dst' && ! $ldapserver_dst->isReadOnly() && ! is_attr_read_only( $ldapserver, $attr ) ) { ?>
if ($side == 'dst' && ! $ldapserver_dst->isReadOnly() && ! $ldapserver->isAttrReadOnly($attr)) { ?>
<a href="javascript:deleteAttribute( '<?php echo $attr; ?>' );" style="color:red;"><img src="images/trash.png" /> <?php echo $lang['delete_attribute']; ?></a>
<a href="javascript:deleteAttribute('<?php echo $attr; ?>');" style="color:red;"><img src="images/trash.png" /> <?php echo _('delete attribute'); ?></a>
<?php } ?>
@@ -304,22 +309,23 @@ foreach ($attrs_all as $attr) {
* simply draw the attribute values and continue.
*/
if( $side == 'dst' && ($ldapserver->isReadOnly() || is_attr_read_only( $ldapserver, $attr )) ) {
if( is_array( $vals ) ) {
foreach( $vals as $i => $val ) {
if( trim( $val ) == "" )
echo "<span style=\"color:red\">[" . $lang['empty'] . "]</span><br />\n";
if ($side == 'dst' && ($ldapserver->isReadOnly() || $ldapserver->isAttrReadOnly($attr))) {
if (is_array($vals)) {
foreach ($vals as $i => $val) {
if (trim($val) == "")
echo "<span style=\"color:red\">[" . _('empty') . "]</span><br />\n";
elseif( 0 == strcasecmp( $attr, 'userPassword' ) && $config->GetValue('appearance','obfuscate_password_display'))
echo preg_replace( '/./', '*', $val ) . "<br />";
elseif (0 == strcasecmp($attr,'userPassword') && $config->GetValue('appearance','obfuscate_password_display'))
echo preg_replace('/./','*',$val) . "<br />";
else
echo htmlspecialchars( $val ) . "<br />";
echo htmlspecialchars($val) . "<br />";
}
// @todo: redundant - $vals is always an array.
} else {
if( 0 == strcasecmp( $attr, 'userPassword' ) && $config->GetValue('appearance','obfuscate_password_display'))
echo preg_replace( '/./', '*', $vals ) . "<br />";
if (0 == strcasecmp($attr,'userPassword') && $config->GetValue('appearance','obfuscate_password_display'))
echo preg_replace('/./','*',$vals) . "<br />";
else
echo $vals . "<br />";
}
@@ -330,13 +336,13 @@ foreach ($attrs_all as $attr) {
/*
* Is this a userPassword attribute?
*/
if( ! strcasecmp( $attr, 'userpassword' ) ) {
if (! strcasecmp($attr,'userpassword')) {
$user_password = $vals[0];
$enc_type = get_enc_type( $user_password );
$enc_type = get_enc_type($user_password);
// Set the default hashing type if the password is blank (must be newly created)
if( $user_password == '' ) {
$enc_type = get_default_hash( $server_id );
if ($user_password == '') {
$enc_type = get_default_hash($server_id);
}
if ($side == 'dst') { ?>
@@ -348,17 +354,17 @@ foreach ($attrs_all as $attr) {
<?php }
if( obfuscate_password_display( $enc_type ) ) {
echo htmlspecialchars( preg_replace( "/./", "*", $user_password ) );
if (obfuscate_password_display($enc_type)) {
echo htmlspecialchars(preg_replace('/./','*',$user_password));
} else {
echo htmlspecialchars( $user_password );
echo htmlspecialchars($user_password);
} ?>
<br />
<?php if ($side == 'dst') { ?>
<input style="width: 260px" type="password" name="new_values[userpassword]" value="<?php echo htmlspecialchars( $user_password ); ?>" />
<input style="width: 260px" type="password" name="new_values[userpassword]" value="<?php echo htmlspecialchars($user_password); ?>" />
<?php echo enc_type_select_list($enc_type);
@@ -370,15 +376,15 @@ foreach ($attrs_all as $attr) {
<!--
function passwordComparePopup()
{
mywindow = open( 'password_checker.php', 'myname', 'resizable=no,width=450,height=200,scrollbars=1' );
mywindow = open('password_checker.php','myname','resizable=no,width=450,height=200,scrollbars=1');
mywindow.location.href = 'password_checker.php?hash=<?php echo base64_encode($user_password); ?>&base64=true';
if( mywindow.opener == null )
if (mywindow.opener == null)
mywindow.opener = self;
}
-->
</script>
<small><a href="javascript:passwordComparePopup()"><?php echo $lang['t_check_pass']; ?></a></small>
<small><a href="javascript:passwordComparePopup()"><?php echo _('Check password'); ?></a></small>
</td>
@@ -388,17 +394,17 @@ foreach ($attrs_all as $attr) {
/*
* Is this a boolean attribute?
*/
if( is_attr_boolean( $ldapserver, $attr) ) {
if ($ldapserver->isAttrBoolean($attr)) {
$val = $vals[0];
if ($side = 'dst') {?>
<input type="hidden" name="old_values[<?php echo htmlspecialchars( $attr ); ?>]" value="<?php echo htmlspecialchars($val); ?>" />
<input type="hidden" name="old_values[<?php echo htmlspecialchars($attr); ?>]" value="<?php echo htmlspecialchars($val); ?>" />
<select name="new_values[<?php echo htmlspecialchars( $attr ); ?>]">
<option value="TRUE"<?php echo ($val=='TRUE' ? ' selected' : ''); ?>><?php echo $lang['true']; ?></option>
<option value="FALSE"<?php echo ($val=='FALSE' ? ' selected' : ''); ?>><?php echo $lang['false']; ?></option>
<option value="">(<?php echo $lang['none_remove_value']; ?>)</option>
<select name="new_values[<?php echo htmlspecialchars($attr); ?>]">
<option value="TRUE"<?php echo ($val=='TRUE' ? ' selected' : ''); ?>><?php echo _('true'); ?></option>
<option value="FALSE"<?php echo ($val=='FALSE' ? ' selected' : ''); ?>><?php echo _('false'); ?></option>
<option value="">(<?php echo _('none, remove value'); ?>)</option>
</select>
<?php } ?>
@@ -412,28 +418,28 @@ foreach ($attrs_all as $attr) {
* End of special case attributes (non plain text).
*/
foreach( $vals as $i => $val ) {
foreach ($vals as $i => $val) {
if ($side == 'dst') {
$input_name = "new_values[" . htmlspecialchars( $attr ) . "][$i]";
$input_name = "new_values[" . htmlspecialchars($attr) . "][$i]";
// We smack an id="..." tag in here that doesn't have [][] in it to allow the
// draw_chooser_link() to identify it after the user clicks.
$input_id = "new_values_" . htmlspecialchars($attr) . "_" . $i; ?>
<!-- The old_values array will let update.php know if the entry contents changed
between the time the user loaded this page and saved their changes. -->
<input type="hidden" name="old_values[<?php echo htmlspecialchars( $attr ); ?>][<?php echo $i; ?>]" value="<?php echo htmlspecialchars($val); ?>" />
<input type="hidden" name="old_values[<?php echo htmlspecialchars($attr); ?>][<?php echo $i; ?>]" value="<?php echo htmlspecialchars($val); ?>" />
<?php }
// Is this value is a structural objectClass, make it read-only
if( 0 == strcasecmp( $attr, 'objectClass' ) ) { ?>
if (0 == strcasecmp($attr,'objectClass')) { ?>
<a title="<?php echo $lang['view_schema_for_oclass']; ?>" href="schema.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;view=objectClasses&amp;viewvalue=<?php echo htmlspecialchars( $val ); ?>"><img src="images/info.png" /></a>
<a title="<?php echo _('View the schema description for this objectClass'); ?>" href="schema.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;view=objectClasses&amp;viewvalue=<?php echo htmlspecialchars($val); ?>"><img src="images/info.png" /></a>
<?php $schema_object = $ldapserver->getSchemaObjectClass($val);
if ($schema_object->getType() == 'structural') {
echo "$val <small>(<acronym title=\"" . sprintf( $lang['structural_object_class_cannot_remove'] ) . "\">" . $lang['structural'] . "</acronym>)</small><br />";
echo "$val <small>(<acronym title=\"" . sprintf(_('This is a structural ObjectClass and cannot be removed.')) . "\">" . _('structural') . "</acronym>)</small><br />";
if ($side == 'dst') {?>
@@ -444,21 +450,21 @@ foreach ($attrs_all as $attr) {
}
}
if( is_dn_string( $val ) || is_dn_attr( $ldapserver, $attr ) ) { ?>
if (is_dn_string($val) || $ldapserver->isDNAttr($attr)) { ?>
<a title="<?php echo sprintf( $lang['go_to_dn'], htmlspecialchars($val) ); ?>" href="edit.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;dn=<?php echo rawurlencode($val); ?>"><img style="vertical-align: top" src="images/go.png" /></a>
<a title="<?php echo sprintf(_('Go to %s'),htmlspecialchars($val)); ?>" href="template_engine.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;dn=<?php echo rawurlencode($val); ?>"><img style="vertical-align: top" src="images/go.png" /></a>
<?php } elseif( is_mail_string( $val ) ) { ?>
<?php } elseif (is_mail_string($val)) { ?>
<a href="mailto:<?php echo htmlspecialchars($val); ?>"><img style="vertical-align: center" src="images/mail.png" /></a>
<?php } elseif( is_url_string( $val ) ) { ?>
<?php } elseif (is_url_string($val)) { ?>
<a href="<?php echo htmlspecialchars($val); ?>" target="new"><img style="vertical-align: center" src="images/dc.png" /></a>
<?php }
if( is_multi_line_attr( $attr, $val, $ldapserver->server_id ) ) {
if ($ldapserver->isMultiLineAttr($attr,$val)) {
if ($side == 'dst') {?>
<textarea class="val" rows="3" cols="30" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>"><?php echo htmlspecialchars($val); ?></textarea>
@@ -480,8 +486,8 @@ foreach ($attrs_all as $attr) {
// draw a link for popping up the entry browser if this is the type of attribute
// that houses DNs.
if( is_dn_attr( $ldapserver, $attr ) )
draw_chooser_link( "edit_form.$input_id", false ); ?>
if ($ldapserver->isDNAttr($attr))
draw_chooser_link("edit_form.$input_id",false); ?>
<br />
<?php } ?>
@@ -516,23 +522,26 @@ foreach ($attrs_all as $attr) {
if (! $isOK) {
if (count($src_oclass) == 1) {
$add_href = "add_oclass_form.php?server_id=$ldapserver_dst->server_id&dn=$encoded_dn_dst&new_oclass=$src_oclass[0]";
$add_href = sprintf('add_oclass_form.php?server_id=%s&dn=%s&new_oclass=%s',
$ldapserver_dst->server_id,$encoded_dn_dst,$src_oclass[0]);
} else {
$add_href = "add_value_form.php?server_id=$ldapserver_dst->server_id&dn=$encoded_dn_dst&attr=objectClass";
$add_href = sprintf('add_value_form.php?server_id=%s&dn=%s&attr=objectClass',
$ldapserver_dst->server_id,$encoded_dn_dst);
}
if ($attr == 'objectClass')
printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,$lang['add_oclass_and_attrs'],$lang['add_value']);
printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,_('Add ObjectClass and Attributes'),_('add value'));
else
printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,sprintf($lang['need_oclass'], implode(" ",$src_oclass)),$lang['add_new_objectclass']);
printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,sprintf(_('You need one of the following ObjectClass(es) to add this attribute %s.'),implode(" ",$src_oclass)),_('Add new ObjectClass'));
} else {
if(! $schema_attr_dst->getIsSingleValue() || (! isset($vals))) {
if (! $schema_attr_dst->getIsSingleValue() || (! isset($vals))) {
$add_href = "add_value_form.php?server_id=$ldapserver_dst->server_id&dn=$encoded_dn_dst&attr=" . rawurlencode( $attr );
$add_href = sprintf('add_value_form.php?server_id=%s&dn=%s&attr=%s',
$ldapserver_dst->server_id,$encoded_dn_dst,rawurlencode($attr));
printf('<div class="add_value">(<a href="%s" title="%s">%s</a>)</div>',
$add_href,sprintf($lang['add_value_tooltip'],$attr),$lang['add_value']);
$add_href,sprintf(_('Add an additional value to attribute \'%s\''),$attr),_('add value'));
}
}
}
@@ -545,22 +554,22 @@ foreach ($attrs_all as $attr) {
</tr>
<?php } /* End foreach( $attrs as $attr => $vals ) */
<?php } /* End foreach ($attrs as $attr => $vals) */
if( ! $ldapserver_dst->isReadOnly( ) ) { ?>
if (! $ldapserver_dst->isReadOnly()) { ?>
<td colspan="2">&nbsp</td><td colspan=2><center><input type="submit" value="<?php echo $lang['save_changes']; ?>" /></center></td></tr></form>
<td colspan="2">&nbsp</td><td colspan=2><center><input type="submit" value="<?php echo _('Save Changes'); ?>" /></center></td></tr></form>
<?php } ?>
</table>
<?php /* If this entry has a binary attribute, we need to provide a form for it to submit when deleting it. */ ?>
<?php /* If this entry has a binary attribute,we need to provide a form for it to submit when deleting it. */ ?>
<script language="javascript">
//<!--
function deleteAttribute( attrName )
function deleteAttribute(attrName)
{
if( confirm( "<?php echo $lang['really_delete_attribute']; ?> '" + attrName + "'?" ) ) {
if (confirm("<?php echo _('Really delete attribute'); ?> '" + attrName + "'?")) {
document.delete_attribute_form.attr.value = attrName;
document.delete_attribute_form.submit();
}