Miscellaneous minor updates
This commit is contained in:
parent
52fbd24b2c
commit
9cb27e3a70
@ -39,7 +39,7 @@
|
||||
/* Useful important configuration overrides */
|
||||
/*********************************************/
|
||||
|
||||
/* If you are asked to put pla in debug mode, this is how you do it: */
|
||||
/* If you are asked to put PLA in debug mode, this is how you do it: */
|
||||
# $config->custom->debug['level'] = 255;
|
||||
# $config->custom->debug['syslog'] = true;
|
||||
# $config->custom->debug['file'] = '/tmp/pla_debug.log';
|
||||
@ -258,6 +258,9 @@ $config->custom->appearance['friendly_attrs'] = array(
|
||||
/*********************************************/
|
||||
|
||||
$servers = new Datastore();
|
||||
|
||||
/* $servers->NewServer('ldap_pla') must be called before each new LDAP server
|
||||
declaration. */
|
||||
$servers->newServer('ldap_pla');
|
||||
|
||||
/* A convenient name that will appear in the tree viewer and throughout
|
||||
@ -297,12 +300,12 @@ $servers->setValue('server','name','My LDAP Server');
|
||||
/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
|
||||
'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
|
||||
you specify a login_attr in conjunction with a cookie or session auth_type,
|
||||
then you can also specify the bind_dn/bind_pass here for searching the
|
||||
then you can also specify the bind_id/bind_pass here for searching the
|
||||
directory for users (ie, if your LDAP server does not allow anonymous binds. */
|
||||
// $servers->setValue('login','bind_id','');
|
||||
# $servers->setValue('login','bind_id','cn=Manager,dc=example,dc=com');
|
||||
|
||||
/* Your LDAP password. If you specified an empty bind_dn above, this MUST also
|
||||
/* Your LDAP password. If you specified an empty bind_id above, this MUST also
|
||||
be blank. */
|
||||
// $servers->setValue('login','bind_pass','');
|
||||
# $servers->setValue('login','bind_pass','secret');
|
||||
@ -363,7 +366,7 @@ $servers->setValue('server','name','My LDAP Server');
|
||||
and log in as that user.
|
||||
Leave blank or specify 'dn' to use full DN for logging in. Note also that if
|
||||
your LDAP server requires you to login to perform searches, you can enter the
|
||||
DN to use when searching in 'bind_dn' and 'bind_pass' above.
|
||||
DN to use when searching in 'bind_id' and 'bind_pass' above.
|
||||
// $servers->setValue('login','attr','dn');
|
||||
|
||||
/* Base DNs to used for logins. If this value is not set, then the LDAP server
|
||||
|
@ -30,7 +30,7 @@ if (get_request('purge','REQUEST')) {
|
||||
$entry = $tree->getEntry($value);
|
||||
}
|
||||
|
||||
$tree->readChildren($value);
|
||||
$tree->readChildren($value,true);
|
||||
$entry->open();
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ if (count($request['template']->getLDAPmodify(true))) {
|
||||
$input_disabled = '';
|
||||
$input_onclick = '';
|
||||
|
||||
if ($attribute->isForceDelete() || in_array($attribute->getName(),$mustattrs))
|
||||
if ($attribute->isForceDelete() || (in_array($attribute->getName(),$mustattrs)) && $request['template']->getAttribute('objectclass')->justModified())
|
||||
$input_disabled = 'disabled="disabled"';
|
||||
|
||||
if ($attribute->getName() == 'objectclass') {
|
||||
|
@ -1113,7 +1113,7 @@ class Template extends xmlTemplate {
|
||||
$sattr = $this->getServer()->getSchemaAttribute($checkattr);
|
||||
|
||||
# If the attribute is the same as in the XML file, then dont need to do anything.
|
||||
if (! strcasecmp($sattr->getName(),$checkattr))
|
||||
if (! $sattr || ! strcasecmp($sattr->getName(),$checkattr))
|
||||
continue;
|
||||
|
||||
$formula = preg_replace("/$checkattr/",$sattr->getName(),$formula);
|
||||
|
@ -683,7 +683,7 @@ class Config {
|
||||
}
|
||||
|
||||
public function configDefinition($key,$index,$config) {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',3,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
|
||||
if (! is_array($config) || ! array_key_exists('desc',$config) || ! array_key_exists('default',$config))
|
||||
|
@ -427,7 +427,7 @@ abstract class DS {
|
||||
*/
|
||||
public function isSessionValid() {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs,true);
|
||||
debug_log('Entered (%%)',17,1,__FILE__,__LINE__,__METHOD__,$fargs,true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This abstract class provides the basic variables and methods for LDAP datastores:wq
|
||||
* This abstract class provides the basic variables and methods for LDAP datastores
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
* @subpackage DataStore
|
||||
@ -243,7 +243,6 @@ class ldap extends DS {
|
||||
* Login to the database with the application user/password
|
||||
*
|
||||
* @return boolean true|false for successful login.
|
||||
* @todo isLoginStringEnabled() based logins
|
||||
*/
|
||||
public function login($user=null,$pass=null,$method=null,$new=false) {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
|
@ -486,8 +486,8 @@ function debug_log($msg,$level,$indent) {
|
||||
static $debug_file;
|
||||
|
||||
# In case we are called before we are fully initialised or if debugging is not set.
|
||||
if (! isset($_SESSION[APPCONFIG]) ||
|
||||
! ($_SESSION[APPCONFIG]->getValue('debug','file') || $_SESSION[APPCONFIG]->getValue('debug','syslog')))
|
||||
if (! isset($_SESSION[APPCONFIG])
|
||||
|| ! ($_SESSION[APPCONFIG]->getValue('debug','file') || $_SESSION[APPCONFIG]->getValue('debug','syslog')))
|
||||
return;
|
||||
|
||||
$debug_level = $_SESSION[APPCONFIG]->getValue('debug','level');
|
||||
@ -2860,6 +2860,7 @@ function binSIDtoText($binsid) {
|
||||
* or true to have the returned array sorted by DN (uses ksort)
|
||||
* or an array of attribute names to sort by attribute values
|
||||
* @return array Array of values keyed by $key.
|
||||
* @todo sort is not being performed
|
||||
*/
|
||||
function return_ldap_hash($base,$filter,$key,$attrs,$sort=true) {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
|
@ -42,7 +42,7 @@ abstract class SchemaItem {
|
||||
|
||||
public function getOID() {
|
||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||
debug_log('Entered (%%)',9,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||
debug_log('Entered (%%)',9,1,__FILE__,__LINE__,__METHOD__,$fargs,$this->oid);
|
||||
|
||||
return $this->oid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user