Skip to content

Commit 997931c

Browse files
committed
Merge branch 'development' into release
2 parents 268e353 + 0ec0913 commit 997931c

Some content is hidden

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

48 files changed

+676
-677
lines changed

.env.example.complete

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ APP_PROXIES=null
5656

5757
# Database details
5858
# Host can contain a port (localhost:3306) or a separate DB_PORT option can be used.
59+
# An ipv6 address can be used via the square bracket format ([::1]).
5960
DB_HOST=localhost
6061
DB_PORT=3306
6162
DB_DATABASE=database_database

.github/translators.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,12 @@ Raphael Moreno (RaphaelMoreno) :: Portuguese, Brazilian
469469
yn (user99) :: Arabic
470470
Pavel Zlatarov (pzlatarov) :: Bulgarian
471471
ingelres :: French
472+
mabdullah :: Arabic
473+
Skrabák Csaba (kekcsi) :: Hungarian
474+
Evert Meulie (Evert) :: Norwegian Bokmal
475+
Jasper Backer (jasperb) :: Dutch
476+
Alexandar Cavdarovski (ace.200112) :: Swedish
477+
구닥다리TV (yjj8353) :: Korean
478+
Onur Oskay (o.oskay) :: Turkish
479+
Sébastien Merveille (SebastienMerv) :: French
480+
Maxim Kouznetsov (masya.work) :: Hebrew

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ webpack-stats.json
3232
phpstan.neon
3333
esbuild-meta.json
3434
.phpactor.json
35+
/*.zip

app/Config/database.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@
4040

4141
// MYSQL
4242
// Split out port from host if set
43-
$mysql_host = env('DB_HOST', 'localhost');
44-
$mysql_host_exploded = explode(':', $mysql_host);
45-
$mysql_port = env('DB_PORT', 3306);
46-
if (count($mysql_host_exploded) > 1) {
47-
$mysql_host = $mysql_host_exploded[0];
48-
$mysql_port = intval($mysql_host_exploded[1]);
43+
$mysqlHost = env('DB_HOST', 'localhost');
44+
$mysqlHostExploded = explode(':', $mysqlHost);
45+
$mysqlPort = env('DB_PORT', 3306);
46+
$mysqlHostIpv6 = str_starts_with($mysqlHost, '[');
47+
if ($mysqlHostIpv6 && str_contains($mysqlHost, ']:')) {
48+
$mysqlHost = implode(':', array_slice($mysqlHostExploded, 0, -1));
49+
$mysqlPort = intval(end($mysqlHostExploded));
50+
} else if (!$mysqlHostIpv6 && count($mysqlHostExploded) > 1) {
51+
$mysqlHost = $mysqlHostExploded[0];
52+
$mysqlPort = intval($mysqlHostExploded[1]);
4953
}
5054

5155
return [
@@ -61,12 +65,12 @@
6165
'mysql' => [
6266
'driver' => 'mysql',
6367
'url' => env('DATABASE_URL'),
64-
'host' => $mysql_host,
68+
'host' => $mysqlHost,
6569
'database' => env('DB_DATABASE', 'forge'),
6670
'username' => env('DB_USERNAME', 'forge'),
6771
'password' => env('DB_PASSWORD', ''),
6872
'unix_socket' => env('DB_SOCKET', ''),
69-
'port' => $mysql_port,
73+
'port' => $mysqlPort,
7074
'charset' => 'utf8mb4',
7175
'collation' => 'utf8mb4_unicode_ci',
7276
// Prefixes are only semi-supported and may be unstable
@@ -88,7 +92,7 @@
8892
'database' => 'bookstack-test',
8993
'username' => env('MYSQL_USER', 'bookstack-test'),
9094
'password' => env('MYSQL_PASSWORD', 'bookstack-test'),
91-
'port' => $mysql_port,
95+
'port' => $mysqlPort,
9296
'charset' => 'utf8mb4',
9397
'collation' => 'utf8mb4_unicode_ci',
9498
'prefix' => '',

app/Entities/Controllers/PageRevisionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public function index(Request $request, string $bookSlug, string $pageSlug)
4343
->selectRaw("IF(markdown = '', false, true) as is_markdown")
4444
->with(['page.book', 'createdBy'])
4545
->reorder('id', $listOptions->getOrder())
46-
->reorder('created_at', $listOptions->getOrder())
4746
->paginate(50);
4847

4948
$this->setPageTitle(trans('entities.pages_revisions_named', ['pageName' => $page->getShortName()]));
@@ -52,6 +51,7 @@ public function index(Request $request, string $bookSlug, string $pageSlug)
5251
'revisions' => $revisions,
5352
'page' => $page,
5453
'listOptions' => $listOptions,
54+
'oldestRevisionId' => $page->revisions()->min('id'),
5555
]);
5656
}
5757

bookstack-system-cli

2.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)