Move php version check from ...\Ldap\Query to ...\Ldap\Connection

refs #8261
refs #6176
This commit is contained in:
Johannes Meyer 2015-01-29 15:59:03 +01:00
parent 2a115e71d4
commit 97cc37b99c
2 changed files with 3 additions and 4 deletions

View File

@ -320,7 +320,7 @@ class Connection
protected function runQuery(Query $query, $fields = array())
{
if ($query->getUsePagedResults()) {
if ($query->getUsePagedResults() && version_compare(PHP_VERSION, '5.4.0') >= 0) {
if ($this->pageCookie === null) {
$this->pageCookie = '';
} else {

View File

@ -33,7 +33,7 @@ class Query
protected $sort_columns = array();
protected $count;
protected $base;
protected $usePagedResults;
protected $usePagedResults = true;
/**
* Constructor
@ -44,7 +44,6 @@ class Query
public function __construct(Connection $connection)
{
$this->connection = $connection;
$this->usePagedResults = version_compare(PHP_VERSION, '5.4.0') >= 0;
}
public function setBase($base)
@ -65,7 +64,7 @@ class Query
public function setUsePagedResults($state = true)
{
$this->usePagedResults = (bool) $state && version_compare(PHP_VERSION, '5.4.0') >= 0;
$this->usePagedResults = (bool) $state;
return $this;
}