mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 06:48:41 +00:00
fix uri building bug and conditional loading bug
This commit is contained in:
parent
01a2e984ad
commit
1d5b727465
|
|
@ -3132,6 +3132,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
foreach (self::$conditionals as $condKey => $condValue) {
|
foreach (self::$conditionals as $condKey => $condValue) {
|
||||||
if (($column = $value['mapper']::getColumnByMember($condKey)) === null
|
if (($column = $value['mapper']::getColumnByMember($condKey)) === null
|
||||||
|| ($condValue['models'] !== null && !\in_array($modelName, $condValue['models']))
|
|| ($condValue['models'] !== null && !\in_array($modelName, $condValue['models']))
|
||||||
|
|| ($value['conditional'] ?? false) === false
|
||||||
) {
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ final class UriFactory
|
||||||
self::setQuery('/port', (string) $uri->getPort());
|
self::setQuery('/port', (string) $uri->getPort());
|
||||||
self::setQuery('/base', \rtrim($uri->getBase(), '/'));
|
self::setQuery('/base', \rtrim($uri->getBase(), '/'));
|
||||||
self::setQuery('/rootPath', $uri->getRootPath());
|
self::setQuery('/rootPath', $uri->getRootPath());
|
||||||
self::setQuery('?', $uri->getQuery());
|
self::setQuery('?', '?' . $uri->getQuery());
|
||||||
self::setQuery('%', $uri->__toString());
|
self::setQuery('%', $uri->__toString());
|
||||||
self::setQuery('#', $uri->getFragment());
|
self::setQuery('#', $uri->getFragment());
|
||||||
self::setQuery('/', $uri->getPath());
|
self::setQuery('/', $uri->getPath());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user