Compare commits

...

3 Commits
9.3.1 ... fix

Author SHA1 Message Date
Yurii
a8398965b8 fix loging data not available on logout 2026-02-25 12:56:40 +02:00
Yurii
db504a3ee7 test 2026-02-23 17:14:16 +02:00
Yurii
5e2155d7e2 fix email subject truncate 2026-02-23 15:23:43 +02:00
4 changed files with 33 additions and 10 deletions

View File

@@ -70,13 +70,6 @@ class Settings
private function getConfigData(): stdClass
{
$data = $this->service->getConfigData();
$metadataData = $this->service->getMetadataConfigData();
foreach (get_object_vars($metadataData) as $key => $value) {
$data->$key = $value;
}
return $data;
return $this->service->getConfigData();
}
}

View File

@@ -420,8 +420,8 @@ class DefaultImporter implements Importer
$subject = '(No Subject)';
}
if (strlen($subject) > self::SUBJECT_MAX_LENGTH) {
$subject = substr($subject, 0, self::SUBJECT_MAX_LENGTH);
if (mb_strlen($subject) > self::SUBJECT_MAX_LENGTH) {
$subject = mb_substr($subject, 0, self::SUBJECT_MAX_LENGTH);
}
return $subject;

View File

@@ -56,6 +56,15 @@ use stdClass;
class SettingsService
{
/**
* @var string[]
* @todo Do not use when these parameters moved away from the settings.
*/
private array $ignoreUpdateParamList = [
'loginView',
'loginData',
];
public function __construct(
private ApplicationState $applicationState,
private Config $config,
@@ -87,11 +96,22 @@ class SettingsService
$this->filterData($data);
$this->loadAdditionalParams($data);
/** @noinspection PhpDeprecationInspection */
$metadataData = $this->getMetadataConfigData();
foreach (get_object_vars($metadataData) as $key => $value) {
$data->$key = $value;
}
return $data;
}
/**
* Get metadata to be used in config.
*
* @todo Make private in v9.4.0.
* @todo Move away from settings. Use some different approach.
* @deprecated Since v9.3.2.
*/
public function getMetadataConfigData(): stdClass
{
@@ -208,6 +228,7 @@ class SettingsService
}
$ignoreItemList = array_merge(
$this->ignoreUpdateParamList,
$this->access->getSystemParamList(),
$this->access->getReadOnlyParamList(),
$this->isRestrictedMode() && !$user->isSuperAdmin() ?

View File

@@ -2414,6 +2414,15 @@ class MysqlQueryComposerTest extends TestCase
$this->assertEquals(['test'], $list);
}
public function testGetAllAttributesFromComplexExpression4()
{
$expression = "SUM:('тестван', test1, 'тест', test2, link.test3)";
$list = Util::getAllAttributesFromComplexExpression($expression);
$this->assertEquals(['test1', 'test2', 'link.test3'], $list);
}
public function testComplexExpressionString1(): void
{
$queryBuilder = new QueryBuilder();