MQ up to down connections (MC => NODES)

This commit is contained in:
fbsanchez 2021-06-28 21:21:31 +02:00
parent 753bb7ff03
commit 4e1110a052
5 changed files with 12 additions and 11 deletions

View File

@ -83,7 +83,7 @@ if (is_management_allowed() === false) {
__( __(
'This node is configured with centralized mode. All module groups information is read only. Go to %s to manage it.', 'This node is configured with centralized mode. All module groups information is read only. Go to %s to manage it.',
'<a target="_blank" href="'.ui_get_meta_url( '<a target="_blank" href="'.ui_get_meta_url(
'index.php?sec=advanced&sec2=advanced/component_management' 'index.php?sec=advanced&sec2=advanced/component_management&tab=module_group'
).'">'.__('metaconsole').'</a>' ).'">'.__('metaconsole').'</a>'
) )
); );

View File

@ -846,10 +846,10 @@ function mysql_db_get_value_sql($sql, $dbconnection=false)
* *
* @return mixed The first row of the result or false * @return mixed The first row of the result or false
*/ */
function mysql_db_get_row_sql($sql, $search_history_db=false) function mysql_db_get_row_sql($sql, $search_history_db=false, $cache=true)
{ {
$sql .= ' LIMIT 1'; $sql .= ' LIMIT 1';
$result = db_get_all_rows_sql($sql, $search_history_db); $result = db_get_all_rows_sql($sql, $search_history_db, $cache);
if ($result === false) { if ($result === false) {
return false; return false;

View File

@ -1004,10 +1004,10 @@ function oracle_db_get_value_sql($sql, $dbconnection=false)
* *
* @return mixed The first row of the result or false * @return mixed The first row of the result or false
*/ */
function oracle_db_get_row_sql($sql, $search_history_db=false) function oracle_db_get_row_sql($sql, $search_history_db=false, $cache=true)
{ {
$sql = 'SELECT * FROM ('.$sql.') WHERE rownum < 2'; $sql = 'SELECT * FROM ('.$sql.') WHERE rownum < 2';
$result = oracle_db_get_all_rows_sql($sql, $search_history_db); $result = oracle_db_get_all_rows_sql($sql, $search_history_db, $cache);
if ($result === false) { if ($result === false) {
return false; return false;

View File

@ -713,10 +713,10 @@ function postgresql_db_get_value_sql($sql, $dbconnection=false)
* *
* @return mixed The first row of the result or false * @return mixed The first row of the result or false
*/ */
function postgresql_db_get_row_sql($sql, $search_history_db=false) function postgresql_db_get_row_sql($sql, $search_history_db=false, $cache=true)
{ {
$sql .= ' LIMIT 1'; $sql .= ' LIMIT 1';
$result = postgresql_db_get_all_rows_sql($sql, $search_history_db); $result = postgresql_db_get_all_rows_sql($sql, $search_history_db, $cache);
if ($result === false) { if ($result === false) {
return false; return false;

View File

@ -442,21 +442,21 @@ function db_get_value_sql($sql, $dbconnection=false)
* *
* @return mixed The first row of the result or false * @return mixed The first row of the result or false
*/ */
function db_get_row_sql($sql, $search_history_db=false) function db_get_row_sql($sql, $search_history_db=false, $cache=true)
{ {
global $config; global $config;
switch ($config['dbtype']) { switch ($config['dbtype']) {
case 'mysql': case 'mysql':
return mysql_db_get_row_sql($sql, $search_history_db); return mysql_db_get_row_sql($sql, $search_history_db, $cache);
break; break;
case 'postgresql': case 'postgresql':
return postgresql_db_get_row_sql($sql, $search_history_db); return postgresql_db_get_row_sql($sql, $search_history_db, $cache);
break; break;
case 'oracle': case 'oracle':
return oracle_db_get_row_sql($sql, $search_history_db); return oracle_db_get_row_sql($sql, $search_history_db, $cache);
break; break;
} }
@ -1378,6 +1378,7 @@ function db_process_sql($sql, $rettype='affected_rows', $dbconnection='', $cache
if ($rc !== false) { if ($rc !== false) {
if (enterprise_hook('is_metaconsole') === true if (enterprise_hook('is_metaconsole') === true
&& isset($config['centralized_management']) === true
&& (bool) $config['centralized_management'] === true && (bool) $config['centralized_management'] === true
&& $dbconnection === '' && $dbconnection === ''
) { ) {