mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 06:07:57 +02:00
Lang: Use GLOB_BRACE
This commit is contained in:
10
lang.php
10
lang.php
@@ -12,15 +12,7 @@ if (isset($_SESSION["lang"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$messages_all = array();
|
$messages_all = array();
|
||||||
foreach (
|
foreach (glob(__DIR__ . "/{adminer,adminer/include,adminer/drivers,editor,editor/include}/*.php", GLOB_BRACE) as $include) {
|
||||||
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
|
|
||||||
) {
|
|
||||||
$file = file_get_contents($include);
|
$file = file_get_contents($include);
|
||||||
if (preg_match_all("~[^>]lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) { // lang() always uses apostrophes
|
if (preg_match_all("~[^>]lang\\(('(?:[^\\\\']+|\\\\.)*')([),])~", $file, $matches)) { // lang() always uses apostrophes
|
||||||
$messages_all += array_combine($matches[1], $matches[2]);
|
$messages_all += array_combine($matches[1], $matches[2]);
|
||||||
|
Reference in New Issue
Block a user