return false;
}
- /* Do the search. Use improved ldap_search() if PHP version is
- * 4.0.2 or newer. */
- if(sqCheckPHPVersion(4, 0, 2)) {
- $sret = @ldap_search($this->linkid, $this->basedn, $expression,
- array('dn', 'o', 'ou', 'sn', 'givenname',
- 'cn', 'mail', 'telephonenumber'),
- 0, $this->maxrows, $this->timeout);
- } else {
- $sret = @ldap_search($this->linkid, $this->basedn, $expression,
- array('dn', 'o', 'ou', 'sn', 'givenname',
- 'cn', 'mail', 'telephonenumber'));
- }
+ $sret = @ldap_search($this->linkid, $this->basedn, $expression,
+ array('dn', 'o', 'ou', 'sn', 'givenname',
+ 'cn', 'mail', 'telephonenumber'),
+ 0, $this->maxrows, $this->timeout);
/* Should get error from server using the ldap_error() function,
* but it only exist in the PHP LDAP documentation. */
*
* Careful with this -- it could get quite large for big sites. */
}
-?>
\ No newline at end of file
+?>
$rg = ini_get('register_globals');
+/* if php version >= 4.1 OR (4.0 AND $rg = off) */
if ( !sqsession_is_registered('prefs_are_cached') ||
!isset( $prefs_cache) ||
!is_array( $prefs_cache) ||
- substr( phpversion(), 0, 3 ) == '4.1' ||
- substr( phpversion(), 0, 3 ) == '4.2' ||
- (substr( phpversion(), 0, 3 ) == '4.0' && empty($rg))) {
+ check_php_version(4,1) ||
+ empty($rg)
+ ) {
$prefs_are_cached = false;
$prefs_cache = array();
}