Update config.php
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ function getConfigFromDB($key, $default = null) {
|
|||||||
$tableExists = $pdo->query("SHOW TABLES LIKE 'system_config'")->rowCount() > 0;
|
$tableExists = $pdo->query("SHOW TABLES LIKE 'system_config'")->rowCount() > 0;
|
||||||
|
|
||||||
if ($tableExists) {
|
if ($tableExists) {
|
||||||
$stmt = $pdo->query("SELECT config_key, config_value FROM system_config");
|
$stmt = $pdo->query("SELECT config_key, config_value FROM system_config WHERE config_key = " . $pdo->quote($key));
|
||||||
$configs = [];
|
$configs = [];
|
||||||
while ($row = $stmt->fetch()) {
|
while ($row = $stmt->fetch()) {
|
||||||
$configs[$row['config_key']] = $row['config_value'];
|
$configs[$row['config_key']] = $row['config_value'];
|
||||||
|
|||||||
Reference in New Issue
Block a user