From ef06e98693822facdb649d2ee10f8eb10eac6b03 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Fri, 4 Sep 2015 11:35:47 +0200 Subject: [PATCH] Fixed problems with querys when db engine is Oracle --- pandora_console/extensions/system_info.php | 14 +++++------ pandora_console/extras/pandora_diag.php | 28 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/pandora_console/extensions/system_info.php b/pandora_console/extensions/system_info.php index fd9a233371..406f773f38 100644 --- a/pandora_console/extensions/system_info.php +++ b/pandora_console/extensions/system_info.php @@ -86,13 +86,13 @@ function getPandoraDiagnostic(&$systemInfo) { $systemInfo['current_update'] = db_get_sql("SELECT value FROM tupdate_settings WHERE \"key\" = 'current_update'"); break; case "oracle": - $systemInfo['db_scheme_version'] = db_get_sql("SELECT \"value\" FROM tconfig WHERE \"token\" = 'db_scheme_version'"); - $systemInfo['db_scheme_build'] = db_get_sql("SELECT \"value\" FROM tconfig WHERE \"token\" = 'db_scheme_build'"); - $systemInfo['enterprise_installed'] = db_get_sql("SELECT \"value\" FROM tconfig WHERE \"token\" = 'enterprise_installed'"); - $systemInfo['db_maintance'] = db_get_sql ("SELECT \"value\" FROM tconfig WHERE \"token\" = 'db_maintance'"); - $systemInfo['customer_key'] = db_get_sql("SELECT \"value\" FROM tupdate_settings WHERE \"key =\" 'customer_key';"); - $systemInfo['updating_code_path'] = db_get_sql("SELECT \"value\" FROM tupdate_settings WHERE \"key =\" 'updating_code_path'"); - $systemInfo['current_update'] = db_get_sql("SELECT \"value\" FROM tupdate_settings WHERE \"key =\" 'current_update'"); + $systemInfo['db_scheme_version'] = db_get_sql("SELECT " . db_escape_key_identifier('value') . " FROM tconfig WHERE \"token\" = 'db_scheme_version'"); + $systemInfo['db_scheme_build'] = db_get_sql("SELECT " . db_escape_key_identifier('value') . " FROM tconfig WHERE \"token\" = 'db_scheme_build'"); + $systemInfo['enterprise_installed'] = db_get_sql("SELECT " . db_escape_key_identifier('value') . " FROM tconfig WHERE \"token\" = 'enterprise_installed'"); + $systemInfo['db_maintance'] = db_get_sql ("SELECT " . db_escape_key_identifier('value') . " FROM tconfig WHERE \"token\" = 'db_maintance'"); + $systemInfo['customer_key'] = db_get_sql("SELECT " . db_escape_key_identifier('value') . " FROM tupdate_settings WHERE \"key =\" 'customer_key';"); + $systemInfo['updating_code_path'] = db_get_sql("SELECT " . db_escape_key_identifier('value') . " FROM tupdate_settings WHERE \"key =\" 'updating_code_path'"); + $systemInfo['current_update'] = db_get_sql("SELECT " . db_escape_key_identifier('value') . " FROM tupdate_settings WHERE \"key =\" 'current_update'"); break; } } diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php index 540cf27f0f..3ecb75a806 100644 --- a/pandora_console/extras/pandora_diag.php +++ b/pandora_console/extras/pandora_diag.php @@ -173,27 +173,27 @@ switch ($config["dbtype"]) { WHERE \"key\" = 'current_update'", "Current Update #"); break; case "oracle": - render_info_data ("SELECT value - FROM tconfig + render_info_data ("SELECT " . db_escape_key_identifier('value') . + " FROM tconfig WHERE token = 'db_scheme_version'", "DB Schema Version"); - render_info_data ("SELECT value - FROM tconfig + render_info_data ("SELECT " . db_escape_key_identifier('value') . + " FROM tconfig WHERE token = 'db_scheme_build'", "DB Schema Build"); - render_info_data ("SELECT value - FROM tconfig + render_info_data ("SELECT " . db_escape_key_identifier('value') . + " FROM tconfig WHERE token = 'enterprise_installed'", "Enterprise installed"); - render_row (db_get_sql ("SELECT value - FROM tconfig + render_row (db_get_sql ("SELECT " . db_escape_key_identifier('value') . + " FROM tconfig WHERE token = 'db_maintance'"), "PandoraDB Last run"); - render_info_data ("SELECT value - FROM tupdate_settings + render_info_data ("SELECT " . db_escape_key_identifier('value') . + " FROM tupdate_settings WHERE \"key\" = 'customer_key'", "Update Key"); - render_info_data ("SELECT value - FROM tupdate_settings + render_info_data ("SELECT " . db_escape_key_identifier('value') . + " FROM tupdate_settings WHERE \"key\" = 'updating_code_path'", "Updating code path"); - render_info_data ("SELECT value - FROM tupdate_settings + render_info_data ("SELECT " . db_escape_key_identifier('value') . + " FROM tupdate_settings WHERE \"key\" = 'current_update'", "Current Update #"); break; }