mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +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())
|
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) {
|
if ($this->pageCookie === null) {
|
||||||
$this->pageCookie = '';
|
$this->pageCookie = '';
|
||||||
} else {
|
} else {
|
||||||
|
@ -33,7 +33,7 @@ class Query
|
|||||||
protected $sort_columns = array();
|
protected $sort_columns = array();
|
||||||
protected $count;
|
protected $count;
|
||||||
protected $base;
|
protected $base;
|
||||||
protected $usePagedResults;
|
protected $usePagedResults = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -44,7 +44,6 @@ class Query
|
|||||||
public function __construct(Connection $connection)
|
public function __construct(Connection $connection)
|
||||||
{
|
{
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
$this->usePagedResults = version_compare(PHP_VERSION, '5.4.0') >= 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setBase($base)
|
public function setBase($base)
|
||||||
@ -65,7 +64,7 @@ class Query
|
|||||||
|
|
||||||
public function setUsePagedResults($state = true)
|
public function setUsePagedResults($state = true)
|
||||||
{
|
{
|
||||||
$this->usePagedResults = (bool) $state && version_compare(PHP_VERSION, '5.4.0') >= 0;
|
$this->usePagedResults = (bool) $state;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user