Skip to content

Commit 71fac7e

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2 parents b868955 + e2ff85b commit 71fac7e

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/Controllers/Table/Structure/SaveController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ private function adjustColumnPrivileges(UserPrivileges $userPrivileges, array $a
391391

392392
if ($changed) {
393393
// Finally FLUSH the new privileges
394-
$this->dbi->query('FLUSH PRIVILEGES;');
394+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
395395
}
396396
}
397397

src/Database/Routines.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ public function flushPrivileges(bool $flushPrivileges): Message
262262
{
263263
if ($flushPrivileges) {
264264
// Flush the Privileges
265-
$flushPrivQuery = 'FLUSH PRIVILEGES;';
266-
$this->dbi->query($flushPrivQuery);
265+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
267266

268267
$message = Message::success(
269268
__(

src/Operations.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ public function adjustPrivilegesMoveDb(
333333
. ' where Db = ' . $this->dbi->quoteString($oldDb) . ';');
334334

335335
// Finally FLUSH the new privileges
336-
$this->dbi->query('FLUSH PRIVILEGES;');
336+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
337337
}
338338

339339
/**
@@ -431,7 +431,7 @@ public function adjustPrivilegesCopyDb(
431431
}
432432

433433
// Finally FLUSH the new privileges
434-
$this->dbi->query('FLUSH PRIVILEGES;');
434+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
435435
}
436436

437437
/**
@@ -774,7 +774,7 @@ public function adjustPrivilegesRenameOrMoveTable(
774774
. ';');
775775

776776
// Finally FLUSH the new privileges
777-
$this->dbi->query('FLUSH PRIVILEGES;');
777+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
778778
}
779779

780780
/**
@@ -833,7 +833,7 @@ public function adjustPrivilegesCopyTable(
833833
}
834834

835835
// Finally FLUSH the new privileges
836-
$this->dbi->query('FLUSH PRIVILEGES;');
836+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
837837
}
838838

839839
/**

src/Server/Privileges.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,8 +2166,7 @@ public function updateMessageForReload(): Message|null
21662166
{
21672167
$message = null;
21682168
if (isset($_GET['flush_privileges'])) {
2169-
$sqlQuery = 'FLUSH PRIVILEGES;';
2170-
$this->dbi->query($sqlQuery);
2169+
$this->dbi->tryQuery('FLUSH PRIVILEGES;');
21712170
$message = Message::success(
21722171
__('The privileges were reloaded successfully.'),
21732172
);

0 commit comments

Comments
 (0)