[turba] ldap driver patch...
Amith Varghese
amith at xalan.com
Tue Feb 25 21:03:05 PST 2003
This is a patch against CVS HEAD to fix the _buildObjectclass method (was added
in the last commit). In the beginning of the method
$filter = '';
if (!empty($filter)) {
.....
}
This will always evaluate to false and the code in the if block never gets executed.
Please let me know if there are any problems.
Amith
-------------- next part --------------
Index: ldap.php
===================================================================
RCS file: /repository/turba/lib/Driver/ldap.php,v
retrieving revision 1.30
diff -u -r1.30 ldap.php
--- ldap.php 25 Feb 2003 22:24:35 -0000 1.30
+++ ldap.php 26 Feb 2003 01:54:41 -0000
@@ -434,17 +434,14 @@
*/
function _buildObjectclassFilter()
{
- $filter = '';
- if (!empty($filter)) {
- if (!is_array($this->params['objectclass'])) {
- $filter = '(objectclass=' . $this->params['objectclass'] . ')';
- } else {
- $filter = '(|';
- foreach ($this->params['objectclass'] as $objectclass) {
- $filter .= '(objectclass=' . $objectclass . ')';
- }
- $filter .= ')';
+ if (!is_array($this->params['objectclass'])) {
+ $filter = '(objectclass=' . $this->params['objectclass'] . ')';
+ } else {
+ $filter = '(|';
+ foreach ($this->params['objectclass'] as $objectclass) {
+ $filter .= '(objectclass=' . $objectclass . ')';
}
+ $filter .= ')';
}
return $filter;
}
More information about the turba
mailing list