]> git.joonet.de Git - adminer.git/commitdiff
Lang: Use GLOB_BRACE
authorJakub Vrana <jakub@vrana.cz>
Thu, 17 Apr 2025 06:49:53 +0000 (08:49 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 17 Apr 2025 06:49:53 +0000 (08:49 +0200)
lang.php

index 844d5abcab6149231063509ecdf38ae2c56ddd2e..4654ff7b47d157fbe35f1f94a2ba8c4243c352c7 100755 (executable)
--- 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]);