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