Fixes to improve the compatibility with oracle

This commit is contained in:
Alejandro Gallardo Escobar 2015-08-31 17:51:59 +02:00
parent 2364359181
commit 1dc46f6d67
4 changed files with 12 additions and 12 deletions

View File

@ -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 \"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'");
break;
}
}

View File

@ -30,7 +30,7 @@ if ($update_settings) {
foreach ($_POST['keys'] as $key => $value) {
db_process_sql_update(
'tupdate_settings',
array('value' => $value),
array(db_escape_key_identifier('value') => $value),
array(db_escape_key_identifier('key') => $key));
}

View File

@ -178,7 +178,7 @@ function config_update_config () {
if ($update_manager_installed == 1) {
$license_info_key = get_parameter('license_info_key', '');
if (!empty($license_info_key)) {
$values = array("value" => $license_info_key);
$values = array(db_escape_key_identifier('value') => $license_info_key);
$where = array(db_escape_key_identifier('key') => 'customer_key');
$update_manage_settings_result = db_process_sql_update('tupdate_settings', $values, $where);
if ($update_manage_settings_result === false)

View File

@ -25,7 +25,7 @@ function update_manager_get_config_values() {
global $pandora_version;
$license = db_get_value(
'value',
db_escape_key_identifier('value'),
'tupdate_settings',
db_escape_key_identifier('key'),
'customer_key');
@ -480,7 +480,7 @@ function update_manager_set_current_package($current_package) {
$token = 'current_package';
}
$col_value = 'value';
$col_value = db_escape_key_identifier('value');
$col_key = db_escape_key_identifier('key');
$value = db_get_value($col_value,
@ -507,7 +507,7 @@ function update_manager_get_current_package() {
$token = 'current_package';
}
$current_update = db_get_value(
'value',
db_escape_key_identifier('value'),
'tupdate_settings',
db_escape_key_identifier('key'),
$token);