File tree Expand file tree Collapse file tree 4 files changed +28
-16
lines changed
Expand file tree Collapse file tree 4 files changed +28
-16
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ RUN set -x \
4040
4141COPY *.php /var/www/html/
4242
43- ENV ADMINER_VERSION=5.4.1
44- ENV ADMINER_DOWNLOAD_SHA256=3f65364b4cc96b5e4cae1b3e448b7b6fa42b0da1eeba78bed9b3774ade830fce
45- ENV ADMINER_SRC_DOWNLOAD_SHA256=fd96585b1f8728b729551c5a7de3371724c1ccd701afde4c75fd6b990d935a63
43+ ENV ADMINER_VERSION=5.4.2
44+ ENV ADMINER_DOWNLOAD_SHA256=5b761efe7049bf586119256324fd417b49e5bb9243b40d9734fe86655e4402fd
45+ ENV ADMINER_SRC_DOWNLOAD_SHA256=a4106d61bc81575d0b45c762105eead064384643418cad197a3257677625bd10
4646
4747RUN set -x \
4848&& curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ RUN set -x \
3636
3737COPY *.php /var/www/html/
3838
39- ENV ADMINER_VERSION=5.4.1
40- ENV ADMINER_DOWNLOAD_SHA256=3f65364b4cc96b5e4cae1b3e448b7b6fa42b0da1eeba78bed9b3774ade830fce
41- ENV ADMINER_SRC_DOWNLOAD_SHA256=fd96585b1f8728b729551c5a7de3371724c1ccd701afde4c75fd6b990d935a63
39+ ENV ADMINER_VERSION=5.4.2
40+ ENV ADMINER_DOWNLOAD_SHA256=5b761efe7049bf586119256324fd417b49e5bb9243b40d9734fe86655e4402fd
41+ ENV ADMINER_SRC_DOWNLOAD_SHA256=a4106d61bc81575d0b45c762105eead064384643418cad197a3257677625bd10
4242
4343RUN set -x \
4444&& curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \
Original file line number Diff line number Diff line change @@ -9,13 +9,19 @@ public function __construct(
99 private \Adminer \Adminer $ adminer
1010 ) { }
1111
12- public function loginFormField (...$ args ) {
13- return (function (...$ args ) {
12+ public function loginFormField (...$ args ): string {
13+ return (function (...$ args ): string {
1414 $ field = $ this ->loginFormField (...$ args );
1515
16- return \str_replace (
17- 'name="auth[server]" value="" title="hostname[:port]" ' ,
18- \sprintf ('name="auth[server]" value="%s" title="hostname[:port]" ' , ($ _ENV ['ADMINER_DEFAULT_SERVER ' ] ?: 'db ' )),
16+ return \preg_replace_callback (
17+ '/name="auth\[server\]" value="" title="(?:[^"]+)"/ ' ,
18+ static function (array $ matches ): string {
19+ return \str_replace (
20+ 'value="" ' ,
21+ \sprintf ('value="%s" ' , ($ _ENV ['ADMINER_DEFAULT_SERVER ' ] ?: 'db ' )),
22+ $ matches [0 ],
23+ );
24+ },
1925 $ field ,
2026 );
2127 })->call ($ this ->adminer , ...$ args );
Original file line number Diff line number Diff line change @@ -9,13 +9,19 @@ public function __construct(
99 private \Adminer \Adminer $ adminer
1010 ) { }
1111
12- public function loginFormField (...$ args ) {
13- return (function (...$ args ) {
12+ public function loginFormField (...$ args ): string {
13+ return (function (...$ args ): string {
1414 $ field = $ this ->loginFormField (...$ args );
1515
16- return \str_replace (
17- 'name="auth[server]" value="" title="hostname[:port]" ' ,
18- \sprintf ('name="auth[server]" value="%s" title="hostname[:port]" ' , ($ _ENV ['ADMINER_DEFAULT_SERVER ' ] ?: 'db ' )),
16+ return \preg_replace_callback (
17+ '/name="auth\[server\]" value="" title="(?:[^"]+)"/ ' ,
18+ static function (array $ matches ): string {
19+ return \str_replace (
20+ 'value="" ' ,
21+ \sprintf ('value="%s" ' , ($ _ENV ['ADMINER_DEFAULT_SERVER ' ] ?: 'db ' )),
22+ $ matches [0 ],
23+ );
24+ },
1925 $ field ,
2026 );
2127 })->call ($ this ->adminer , ...$ args );
You can’t perform that action at this time.
0 commit comments