Skip to content

Commit 04bba17

Browse files
Updates version.xml
Issue: documentacao-e-tarefas/scielo#907 Signed-off-by: Jhon <jhon@lepidus.com.br>
1 parent a2b5e99 commit 04bba17

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

dataverseAPI/search/DataverseSearchBuilder.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,9 @@ private function escapeColon(string $value): string
5252

5353
public function getSearchUrls(): array
5454
{
55-
if (empty($this->queries)) {
56-
$this->addQuery('*');
57-
}
58-
5955
$baseUrl = $this->getDataverseSearchEndpoint() . '?';
60-
$baseUrl .= 'q=' . implode('+', $this->queries);
56+
$queries = empty($this->queries) ? ['*'] : $this->queries;
57+
$baseUrl .= 'q=' . implode('+', $queries);
6158

6259
if (!empty($this->types)) {
6360
$baseUrl .= '&type=' . implode('&type=', $this->types);
@@ -74,10 +71,11 @@ public function getSearchUrls(): array
7471
}, $this->filterQueries);
7572

7673
$urls = [];
77-
for ($i = 0; $i < count($filterParts); $i = $j) {
74+
$filterPartsCount = count($filterParts);
75+
for ($i = 0; $i < $filterPartsCount; $i = $j) {
7876
$currentUrl = $baseUrl . '&fq=' . $filterParts[$i];
7977

80-
for ($j = $i + 1; $j < count($filterParts); $j++) {
78+
for ($j = $i + 1; $j < $filterPartsCount; $j++) {
8179
$nextFilterPart = '+' . $filterParts[$j];
8280
if ((strlen($currentUrl) + strlen($nextFilterPart)) > self::URL_MAX_LENGTH) {
8381
break;

upgrade.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE install SYSTEM "../../../lib/pkp/dtd/install.dtd">
33

4-
<install version="3.4.2.0">
4+
<install version="3.4.2.1">
55
<migration class="APP\plugins\generic\dataverse\classes\migrations\APITokenEncryptionMigration" />
66
</install>

version.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<version>
1414
<application>dataverse</application>
1515
<type>plugins.generic</type>
16-
<release>3.4.2.0</release>
17-
<date>2026-05-08</date>
16+
<release>3.4.2.1</release>
17+
<date>2026-05-12</date>
1818
<lazy-load>1</lazy-load>
1919
<class>DataversePlugin</class>
2020
</version>

0 commit comments

Comments
 (0)