Skip to content

Commit 6900847

Browse files
authored
Merge branch 'master' into weblate-translations
2 parents 37341cb + 8931187 commit 6900847

246 files changed

Lines changed: 5154 additions & 442 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
vendor
2+
openvk.yml
3+
chandler.yml
4+
update.pid
5+
update.pid.old
6+
Web/static/js/node_modules
7+
8+
tmp/*
9+
!tmp/api-storage/.gitkeep
10+
!tmp/themepack_artifacts/.gitkeep
11+
themepacks/*
12+
!themepacks/.gitkeep
13+
!themepacks/openvk_modern
14+
!themepacks/midnight
15+
storage/*
16+
!storage/.gitkeep
17+
18+
.idea
19+
.php-cs-fixer.cache
20+
21+
tests/
22+
.github/

.github/workflows/analyse.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
1818
steps:
1919
- name: Code Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v7
2121

2222
- name: Set up Docker Buildx
23-
uses: docker/setup-buildx-action@v3
23+
uses: docker/setup-buildx-action@v4
2424

2525
- name: Build and start Docker container
2626
working-directory: install/automated/docker

.github/workflows/build-base.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v7
1818
with:
1919
lfs: false
2020

2121
- name: Set up QEMU
22-
uses: docker/setup-qemu-action@v2
22+
uses: docker/setup-qemu-action@v4
2323

2424
- name: Set up Docker Buildx
2525
id: buildx
26-
uses: docker/setup-buildx-action@v2
26+
uses: docker/setup-buildx-action@v4
2727

2828
- name: Change repository string to lowercase
2929
id: repositorystring
30-
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
30+
uses: Entepotenz/change-string-case-action-min-dependencies@v1.2.0
3131
with:
3232
string: ${{ github.repository }}
3333

@@ -44,20 +44,20 @@ jobs:
4444
runs-on: ubuntu-latest
4545

4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v7
4848
with:
4949
lfs: false
5050

5151
- name: Set up QEMU
52-
uses: docker/setup-qemu-action@v2
52+
uses: docker/setup-qemu-action@v4
5353

5454
- name: Set up Docker Buildx
5555
id: buildx
56-
uses: docker/setup-buildx-action@v2
56+
uses: docker/setup-buildx-action@v4
5757

5858
- name: Change repository string to lowercase
5959
id: repositorystring
60-
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
60+
uses: Entepotenz/change-string-case-action-min-dependencies@v1.2.0
6161
with:
6262
string: ${{ github.repository }}
6363

.github/workflows/build.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ jobs:
2020
2121
steps:
2222
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v3
23+
uses: docker/setup-qemu-action@v4
2424

2525
- name: Set up Docker Buildx
2626
id: buildx
27-
uses: docker/setup-buildx-action@v3
27+
uses: docker/setup-buildx-action@v4
2828
with:
2929
platforms: linux/amd64,linux/arm64
3030

3131
- name: Change repository string to lowercase
3232
id: repositorystring
33-
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
33+
uses: Entepotenz/change-string-case-action-min-dependencies@v1.2.0
3434
with:
3535
string: ${{ github.repository }}
3636

3737
- name: Base image meta
3838
id: basemeta
39-
uses: docker/metadata-action@v5
39+
uses: docker/metadata-action@v6
4040
with:
4141
images: |
4242
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}
@@ -54,7 +54,7 @@ jobs:
5454
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
5555

5656
- name: Build base image
57-
uses: docker/build-push-action@v6
57+
uses: docker/build-push-action@v7
5858
with:
5959
platforms: linux/amd64,linux/arm64
6060
file: install/automated/docker/openvk.Dockerfile

.github/workflows/codeberg-mirror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
if: github.repository_owner == 'OpenVK'
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v7
1111
with:
1212
fetch-depth: 0
1313
- uses: pixta-dev/repository-mirroring-action@v1

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
contents: read
1919
steps:
2020
- name: Code Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v7
2222

2323
- name: Setup PHP
2424
uses: shivammathur/setup-php@v2
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Screenshot Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
12+
if: >
13+
github.event_name == 'push'
14+
|| (github.event_name == 'pull_request'
15+
&& github.event.pull_request.head.repo.full_name != github.repository)
16+
17+
steps:
18+
- uses: actions/checkout@v7
19+
20+
- name: Build test images
21+
run: docker compose -f tests/docker-compose.test.yml build
22+
23+
- name: Run full test stack
24+
run: >
25+
docker compose -f tests/docker-compose.test.yml up
26+
--abort-on-container-exit
27+
--exit-code-from playwright
28+
--no-build
29+
30+
- name: Upload test results on failure
31+
if: failure()
32+
uses: actions/upload-artifact@v7
33+
with:
34+
name: playwright-results
35+
path: tests/e2e/test-results/
36+
retention-days: 30

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ update.pid.old
66
Web/static/js/node_modules
77

88
tmp/*
9-
!tmp/api-storage
9+
!tmp/api-storage/.gitkeep
1010
!tmp/themepack_artifacts/.gitkeep
1111
themepacks/*
1212
!themepacks/.gitkeep
@@ -15,5 +15,7 @@ themepacks/*
1515
storage/*
1616
!storage/.gitkeep
1717

18+
data/knowledgebase/*
19+
1820
.idea
1921
.php-cs-fixer.cache

VKAPI/Handlers/Audio.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -896,19 +896,8 @@ public function getPlaylistById(int $owner_id = 0, int $playlist_id = 0): object
896896
return (object) [
897897
"id" => $playlist->getId(),
898898
"owner_id" => $playlist->getOwnerId(),
899-
"raw_id" => $playlist->getPrettyId(),
900899
"title" => $playlist->getName(),
901900
"cover_url" => $playlist->getCoverURL(),
902-
"last_updated" => $playlist->getEditTime()?->timestamp(),
903-
"explicit" => 0,
904-
"followed" => 0,
905-
"official" => 0,
906-
"listens" => 0,
907-
"size" => $playlist->size(),
908-
"covers" => [],
909-
"description" => $playlist->getDescription(),
910-
"raw_description" => $playlist->getDescription(),
911-
"list" => [],
912901
];
913902
}
914903
}

VKAPI/Handlers/Docs.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,13 @@ public function get(int $count = 30, int $offset = 0, int $type = -1, int $owner
112112
}
113113

114114
$documents = (new Documents())->getDocumentsByOwner($owner_id, $order, $type);
115-
$res = (object) [
116-
"count" => $documents->size(),
117-
"items" => [],
118-
];
115+
$items = [];
119116

120117
foreach ($documents->offsetLimit($offset, $count) as $doc) {
121-
$res->items[] = $doc->toVkApiStruct($this->getUser(), $return_tags == 1);
118+
$items[] = $doc->toVkApiStruct($this->getUser(), $return_tags == 1);
122119
}
123120

124-
return $res;
121+
return $this->generateItems($documents->size(), $items);
125122
}
126123

127124
public function getById(string $docs, int $return_tags = 0): array

0 commit comments

Comments
 (0)