RELEASE 1.1.0.6

This commit is contained in:
Deon George
2009-06-30 21:52:55 +10:00
parent d5f4f91f1b
commit 647f86562f
118 changed files with 32686 additions and 19807 deletions

View File

@@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/download_binary_attr.php,v 1.15.2.1 2007/12/26 09:26:32 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/download_binary_attr.php,v 1.15.2.4 2008/12/12 12:20:22 wurley Exp $
/**
* @package phpLDAPadmin
@@ -12,27 +12,32 @@
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.'));
error(_('You cannot perform updates while server is in read-only mode'),'error','index.php');
$dn = rawurldecode($_GET['dn']);
$attr = $_GET['attr'];
if (! $ldapserver->haveAuthInfo())
error(_('Not enough information to login to server. Please check your configuration.'),'error','index.php');
$dn = rawurldecode(get_request('dn','GET'));
$attr = get_request('attr','GET');
# if there are multiple values in this attribute, which one do you want to see?
$value_num = isset($_GET['value_num']) ? $_GET['value_num'] : null;
$value_num = get_request('value_num','GET');
if (! $ldapserver->dnExists($dn))
pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn)));
error(sprintf('%s (%s)',_('No such entry.'),pretty_print_dn($dn)),'error','index.php');
$search = $ldapserver->search(null,$dn,'(objectClass=*)',array($attr),'base',false,$_SESSION[APPCONFIG]->GetValue('deref','view'));
# Dump the binary data to the browser
if (ob_get_level()) ob_end_clean();
$obStatus = ob_get_status();
if (isset($obStatus['type']) && $obStatus['type'] && $obStatus['status'])
ob_end_clean();
header('Content-type: octet-stream');
header("Content-disposition: attachment; filename=$attr");
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
if ($value_num && is_array($search[$attr][$dn]))
echo $search[$dn][$attr][$value_num];
else