From: Michael Date: Sat, 16 May 2020 09:01:54 +0000 (+0000) Subject: Improved structure X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4faef126ff99a7a514834758723734393abb6d93;p=friendica.git Improved structure --- diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 9f225cbb93..352e8b0f87 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -1074,21 +1074,18 @@ class DBStructure */ private static function isUpdating() { - $processes = DBA::select(['information_schema' => 'processlist'], - ['command', 'info'], ['db' => DBA::databaseName()]); - $isUpdate = false; + $processes = DBA::select(['information_schema' => 'processlist'], ['info'], + ['db' => DBA::databaseName(), 'command' => ['Query', 'Execute']]); + while ($process = DBA::fetch($processes)) { - if (empty($process['info'])) { - continue; - } $parts = explode(' ', $process['info']); - $command = strtolower(array_shift($parts)); - if ($command == 'alter') { + if (strtolower(array_shift($parts)) == 'alter') { $isUpdate = true; } } + DBA::close($processes); return $isUpdate;