From 29a31c6b9cb4d9dfb19ec9f44b5073eddbe4137d Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 17 Apr 2025 08:49:53 +0200 Subject: [PATCH] Lang: Use GLOB_BRACE --- lang.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lang.php b/lang.php index 844d5abc..4654ff7b 100755 --- a/lang.php +++ b/lang.php @@ -12,15 +12,7 @@ if (isset($_SESSION["lang"])) { } $messages_all = array(); -foreach ( - array_merge( - glob(__DIR__ . "/adminer/*.php"), - glob(__DIR__ . "/adminer/include/*.php"), - glob(__DIR__ . "/adminer/drivers/*.php"), - glob(__DIR__ . "/editor/*.php"), - glob(__DIR__ . "/editor/include/*.php") - ) as $include -) { +foreach (glob(__DIR__ . "/{adminer,adminer/include,adminer/drivers,editor,editor/include}/*.php", GLOB_BRACE) as $include) { $file = file_get_contents($include); if (preg_match_all("~[^>]lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) { // lang() always uses apostrophes $messages_all += array_combine($matches[1], $matches[2]);