RELEASE 0.9.8.2
This commit is contained in:
@@ -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)');
|
||||
|
@@ -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';
|
||||
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user