mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-26 03:09:10 +02:00
Fix violations of coding guidelines
This commit is contained in:
parent
84899e3e56
commit
212111511a
@ -313,7 +313,6 @@ class LdapCapabilities
|
|||||||
array_flip($fields)
|
array_flip($fields)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $cap;
|
return $cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,6 +333,5 @@ class LdapCapabilities
|
|||||||
return 'Windows Server 2008 (or newer)';
|
return 'Windows Server 2008 (or newer)';
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,8 +397,7 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
{
|
{
|
||||||
$this->bind();
|
$this->bind();
|
||||||
|
|
||||||
if (
|
if ($query->getUsePagedResults()
|
||||||
$query->getUsePagedResults()
|
|
||||||
&& version_compare(PHP_VERSION, '5.4.0') >= 0
|
&& version_compare(PHP_VERSION, '5.4.0') >= 0
|
||||||
&& $this->getCapabilities()->hasPagedResult()
|
&& $this->getCapabilities()->hasPagedResult()
|
||||||
) {
|
) {
|
||||||
@ -714,7 +713,8 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
$count += 1;
|
$count += 1;
|
||||||
if (! $serverSorting || $offset === 0 || $offset < $count) {
|
if (! $serverSorting || $offset === 0 || $offset < $count) {
|
||||||
$entries[ldap_get_dn($ds, $entry)] = $this->cleanupAttributes(
|
$entries[ldap_get_dn($ds, $entry)] = $this->cleanupAttributes(
|
||||||
ldap_get_attributes($ds, $entry), array_flip($fields)
|
ldap_get_attributes($ds, $entry),
|
||||||
|
array_flip($fields)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} while (
|
} while (
|
||||||
@ -826,7 +826,8 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
$count += 1;
|
$count += 1;
|
||||||
if (! $serverSorting || $offset === 0 || $offset < $count) {
|
if (! $serverSorting || $offset === 0 || $offset < $count) {
|
||||||
$entries[ldap_get_dn($ds, $entry)] = $this->cleanupAttributes(
|
$entries[ldap_get_dn($ds, $entry)] = $this->cleanupAttributes(
|
||||||
ldap_get_attributes($ds, $entry), array_flip($fields)
|
ldap_get_attributes($ds, $entry),
|
||||||
|
array_flip($fields)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} while (
|
} while (
|
||||||
@ -932,6 +933,7 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
* @param array $sortRules
|
* @param array $sortRules
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws ProgrammingError
|
||||||
*
|
*
|
||||||
* @todo Produces an invalid stream, obviously
|
* @todo Produces an invalid stream, obviously
|
||||||
*/
|
*/
|
||||||
@ -1025,7 +1027,13 @@ class LdapConnection implements Selectable, Inspectable
|
|||||||
|
|
||||||
// Try a bind-command with the given user credentials, this must not fail
|
// Try a bind-command with the given user credentials, this must not fail
|
||||||
$success = @ldap_bind($ds, $this->bindDn, $this->bindPw);
|
$success = @ldap_bind($ds, $this->bindDn, $this->bindPw);
|
||||||
$msg = sprintf('LDAP bind to %s:%s (%s / %s)', $this->hostname, $this->port, $this->bindDn, '***' /* $this->bindPw */);
|
$msg = sprintf(
|
||||||
|
'LDAP bind to %s:%s (%s / %s)',
|
||||||
|
$this->hostname,
|
||||||
|
$this->port,
|
||||||
|
$this->bindDn,
|
||||||
|
'***' /* $this->bindPw */
|
||||||
|
);
|
||||||
if (! $success) {
|
if (! $success) {
|
||||||
throw new LdapException('%s failed: %s', $msg, ldap_error($ds));
|
throw new LdapException('%s failed: %s', $msg, ldap_error($ds));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user