mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
fix stupid asignments
This commit is contained in:
parent
87d07b3574
commit
84fb308b3a
|
|
@ -598,11 +598,12 @@ class DataMapperFactory
|
||||||
$secondaryId
|
$secondaryId
|
||||||
);
|
);
|
||||||
|
|
||||||
$cloned->where('', $where)
|
$cloned
|
||||||
|
->where('', $where)
|
||||||
->sort($primarySortField, OrderType::DESC);
|
->sort($primarySortField, OrderType::DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $mapper->execute();
|
$data = $cloned->execute();
|
||||||
|
|
||||||
$hasNext = $count > $pageLimit;
|
$hasNext = $count > $pageLimit;
|
||||||
if ($hasNext) {
|
if ($hasNext) {
|
||||||
|
|
@ -632,7 +633,7 @@ class DataMapperFactory
|
||||||
$data = \array_reverse($data);
|
$data = \array_reverse($data);
|
||||||
}
|
}
|
||||||
} elseif ($type === 'n') {
|
} elseif ($type === 'n') {
|
||||||
$mapper->sort($sortBy, $sortOrder)
|
$mapper = $mapper->sort($sortBy, $sortOrder)
|
||||||
->where($sortBy, $secondaryId, $sortOrder === OrderType::DESC ? '<=' : '>=')
|
->where($sortBy, $secondaryId, $sortOrder === OrderType::DESC ? '<=' : '>=')
|
||||||
->limit($pageLimit + 2);
|
->limit($pageLimit + 2);
|
||||||
|
|
||||||
|
|
@ -645,7 +646,8 @@ class DataMapperFactory
|
||||||
$secondaryId
|
$secondaryId
|
||||||
);
|
);
|
||||||
|
|
||||||
$mapper->where('', $where)
|
$mapper = $mapper
|
||||||
|
->where('', $where)
|
||||||
->sort($primarySortField, OrderType::DESC);
|
->sort($primarySortField, OrderType::DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -677,11 +679,11 @@ class DataMapperFactory
|
||||||
--$count;
|
--$count;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$mapper = $mapper->sort($sortBy, $sortOrder)
|
$mapper->sort($sortBy, $sortOrder)
|
||||||
->limit($pageLimit + 1);
|
->limit($pageLimit + 1);
|
||||||
|
|
||||||
if (!$sortById) {
|
if (!$sortById) {
|
||||||
$mapper = $mapper->sort($primarySortField, OrderType::DESC);
|
$mapper->sort($primarySortField, OrderType::DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $mapper->execute();
|
$data = $mapper->execute();
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ final class FileLogger implements LoggerInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(string $lpath, bool $verbose = false)
|
public function __construct(string $lpath = '', bool $verbose = false)
|
||||||
{
|
{
|
||||||
$path = \realpath(empty($lpath) ? __DIR__ . '/../../' : $lpath);
|
$path = \realpath(empty($lpath) ? __DIR__ . '/../../' : $lpath);
|
||||||
$this->verbose = $verbose;
|
$this->verbose = $verbose;
|
||||||
|
|
@ -126,17 +126,17 @@ final class FileLogger implements LoggerInterface
|
||||||
/**
|
/**
|
||||||
* Returns instance.
|
* Returns instance.
|
||||||
*
|
*
|
||||||
* @param string $path Logging path
|
* @param string $lpath Logging path
|
||||||
* @param bool $verbose Verbose logging
|
* @param bool $verbose Verbose logging
|
||||||
*
|
*
|
||||||
* @return FileLogger
|
* @return FileLogger
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function getInstance(string $path = '', bool $verbose = false) : self
|
public static function getInstance(string $lpath = '', bool $verbose = false) : self
|
||||||
{
|
{
|
||||||
if (!isset(self::$instance)) {
|
if (!isset(self::$instance)) {
|
||||||
self::$instance = new self($path, $verbose);
|
self::$instance = new self($lpath, $verbose);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,6 @@ final class HttpRequest extends RequestAbstract
|
||||||
public function initRequest() : void
|
public function initRequest() : void
|
||||||
{
|
{
|
||||||
$this->initCurrentRequest();
|
$this->initCurrentRequest();
|
||||||
$this->lock();
|
|
||||||
self::cleanupGlobals();
|
self::cleanupGlobals();
|
||||||
|
|
||||||
$this->data = \array_change_key_case($this->data, \CASE_LOWER);
|
$this->data = \array_change_key_case($this->data, \CASE_LOWER);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user