mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Move php version check from ...\Ldap\Query to ...\Ldap\Connection
refs #8261 refs #6176
This commit is contained in:
parent
2a115e71d4
commit
97cc37b99c
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user