RELEASE 0.9.8.2

This commit is contained in:
Deon George 2009-06-30 20:27:11 +10:00
parent abc62c7fdc
commit 7741110caf
6 changed files with 46 additions and 29 deletions

View File

@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/index.php,v 1.42.2.9 2006/01/26 12:01:02 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/index.php,v 1.42.2.10 2006/03/08 22:49:27 wurley Exp $
/**
* @package phpLDAPadmin
@ -33,10 +33,15 @@ if (! is_readable(LIBDIR.'functions.php')) {
ob_end_clean();
die("Cannot read the file 'functions.php' its permissions are too strict.");
}
require LIBDIR.'functions.php';
$config_file = CONFDIR.'config.php';
ob_end_clean();
# Make sure this PHP install has gettext, we use it for language translation
if (! extension_loaded('gettext'))
die('Your install of PHP appears to be missing GETTEXT support. GETTEXT is used for language translation. Please install GETTEXT support before using phpLDAPadmin. (Dont forget to restart your web server afterwards)');
/* Helper functions.
* Our required helper functions are defined in functions.php
*/
@ -180,12 +185,6 @@ function check_config() {
REQUIRED_PHP_VERSION,phpversion()));
}
# Make sure this PHP install has gettext, we use it for language translation
if (! extension_loaded('gettext')) {
pla_error('Your install of PHP appears to be missing GETTEXT support. GETTEXT is used for language translation. Please install GETTEXT support before using phpLDAPadmin. (Dont forget to restart your web server afterwards)');
return false;
}
# Make sure this PHP install has all our required extensions
if (! extension_loaded('ldap')) {
pla_error('Your install of PHP appears to be missing LDAP support. Please install LDAP support before using phpLDAPadmin. (Dont forget to restart your web server afterwards)');

View File

@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/server_info.php,v 1.22.2.3 2005/12/08 11:55:57 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/server_info.php,v 1.22.2.4 2006/03/08 23:00:18 wurley Exp $
/**
* Fetches and displays all information that it can from the specified server
@ -58,9 +58,10 @@ $attrs = array_pop($ldapserver->search(null,'','objectClass=*',array('+','*'),'b
on RHEL 3. */
$attrs2 = array_pop($ldapserver->search(null,'','objectClass=*',$root_dse_attributes,'base'));
foreach ($attrs2 as $attr => $values)
if (! isset($attrs[$attr]))
$attrs[$attr] = $attrs2[$attr];
if (is_array($attrs2))
foreach ($attrs2 as $attr => $values)
if (! isset($attrs[$attr]))
$attrs[$attr] = $attrs2[$attr];
include './header.php';

View File

@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/template_engine.php,v 1.26.2.28 2006/02/19 04:15:03 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/template_engine.php,v 1.26.2.34 2006/03/13 23:13:43 wurley Exp $
/**
* Template render engine.
@ -256,7 +256,7 @@ if (isset($template['empty_attrs'])) {
# Some conditional checking.
# $detail['must'] & $detail['disable'] cannot be set at the same time.
if (isset($detail['must']) && $detail['must'] && isset($detail['disable']) && $detail['disable'])
pla_error(printf(_('Attribute [%s] is a MUST attribute, so it cannot be disabled.'),$attr));
pla_error(sprintf(_('Attribute [%s] is a MUST attribute, so it cannot be disabled.'),$attr));
# If this attribute is disabled, go to the next one.
if (isset($detail['disable']) && $detail['disable'])
@ -294,13 +294,17 @@ if (isset($template['empty_attrs'])) {
$type = 'select';
}
# @todo: $detail['must'] && $detail['hidden'] must have $detail['value'] (with a value).
# @todo: if value is a select list, then it cannot be hidden.
# If this is a hidden attribute, then set its value.
if (isset($detail['hidden']) && $detail['hidden']) {
printf('<input type="%s" name="form[%s]" id="%s" value="%s"/>','hidden',$attr,$attr,$detail['value']);
continue;
if (isset($detail['value'])) {
printf('<input type="%s" name="form[%s]" id="%s" value="%s"/>','hidden',$attr,$attr,$detail['value']);
continue;
} else {
pla_error(sprintf(_('Attribute [%s] is a HIDDEN attribute, however, it is missing a VALUE in your template.'),$attr));
}
}
# This is a displayed attribute.
@ -324,9 +328,13 @@ if (isset($template['empty_attrs'])) {
# Display the label.
if (isset($detail['description']) && (trim($detail['description'])))
printf('<acronym title="%s">%s</acronym>:',$detail['description'],$detail['display']);
else
elseif (isset($detail['display']))
printf('%s:',$detail['display']);
else
printf('%s:',_('No DISPLAY/DESCRIPTION attribute in template file'));
echo '</td>';
# Calculate the events.
@ -490,7 +498,7 @@ if (isset($template['empty_attrs'])) {
foreach ($_REQUEST['form'] as $attr => $value) {
# Remove blank attributes.
if (! $_REQUEST['form'][$attr]) {
if (! is_array($_REQUEST['form'][$attr]) && trim($_REQUEST['form'][$attr]) == '') {
unset($_REQUEST['form'][$attr]);
continue;
}
@ -521,12 +529,14 @@ if (isset($template['empty_attrs'])) {
}
echo '<tr class="spacer"><td colspan="3"></td></tr>';
foreach (array_keys($_SESSION['submitform']) as $attr) {
if (isset($_SESSION['submitform'])) {
echo '<tr class="spacer"><td colspan="3"></td></tr>';
foreach (array_keys($_SESSION['submitform']) as $attr) {
printf('<tr class="%s"><td colspan=2>%s</td><td><b>%s</b>',
($counter++%2==0?'even':'odd'),$attr,_('Binary value not displayed'));
printf('<input type="hidden" name="attrs[]" value="%s" /></td></tr>',$attr);
printf('<tr class="%s"><td colspan=2>%s</td><td><b>%s</b>',
($counter++%2==0?'even':'odd'),$attr,_('Binary value not displayed'));
printf('<input type="hidden" name="attrs[]" value="%s" /></td></tr>',$attr);
}
}
}
@ -1007,7 +1017,8 @@ foreach ($template['attrs'] as $attr => $vals) {
$schema_object = $ldapserver->getSchemaObjectClass($val);
if ($schema_object->getType() == 'structural') {
# This should be an object, but we'll test it anyway
if (is_object($schema_object) && $schema_object->getType() == 'structural') {
printf(' %s <small>(<acronym title="%s">%s</acronym>)</small><br />',
$val,_('This is a structural ObjectClass and cannot be removed.'),_('structural'));
printf('<input type="hidden" name="%s" id="%s" value="%s" />',$input_name,$input_id,htmlspecialchars($val));

View File

@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/functions.php,v 1.283.2.32 2006/02/19 03:00:40 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/functions.php,v 1.283.2.33 2006/03/13 23:13:43 wurley Exp $
/**
* A collection of functions used throughout phpLDAPadmin.
@ -85,6 +85,9 @@ function pretty_print_dn( $dn ) {
if (DEBUG_ENABLED)
debug_log('pretty_print_dn(): Entered with (%s)',1,$dn);
if (! is_dn_string($dn))
pla_error(sprintf(_('DN %s is not an LDAP distinguished name.'),$dn));
$dn = pla_explode_dn( $dn );
foreach( $dn as $i => $element ) {
$element = htmlspecialchars($element);

View File

@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/schema_functions.php,v 1.88.2.5 2006/01/02 08:35:39 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/schema_functions.php,v 1.88.2.6 2006/03/08 08:22:56 wurley Exp $
/**
* Classes and functions for fetching and parsing schema from an LDAP server.
@ -145,6 +145,7 @@ class ObjectClass extends SchemaItem {
/**
* Creates a new ObjectClass object given a raw LDAP objectClass string.
* @todo: Unfortunately, some schemas are not well defined - eg: dNSDomain. Where the schema definition is not case consistent with the attribute definitions. This causes us some problems, which we need to resolve.
*/
function ObjectClass($raw_ldap_schema_string,$ldapserver) {
if (DEBUG_ENABLED)

View File

@ -1,5 +1,5 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/custom.php,v 1.43.2.5 2005/12/11 08:21:03 wurley Exp $
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/custom.php,v 1.43.2.6 2006/03/01 01:04:05 wurley Exp $
$rdn = isset($_POST['rdn']) ? $_POST['rdn'] : null;
$container = $_POST['container'];
@ -146,8 +146,10 @@ if ($step == 1) {
# is there a user-friendly translation available for this attribute?
if (isset($friendly_attrs[strtolower($attr)]))
$attr_display = sprintf('<acronym title='._('Note: \'%s\' is an alias for \'%s\'').'">%s</acronym>"',
htmlspecialchars($attr),htmlspecialchars($friendly_attrs[strtolower($attr)]));
$attr_display = sprintf('<acronym title="%s: \'%s\' %s \'%s\'">%s</acronym>',
_('Note'),htmlspecialchars($attr),_('is an alias for'),
htmlspecialchars($friendly_attrs[strtolower($attr)]),
htmlspecialchars($friendly_attrs[strtolower($attr)]));
else
$attr_display = htmlspecialchars($attr);