mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-8630-Mensaje-de-erroneo-al-registrar-nodo-enlazado-a-una-meta' into 'develop'
prevent registration dialog from showing up in update manager of metaconsole nodes See merge request artica/pandorafms!4832
This commit is contained in:
commit
a8c649c18a
@ -107,6 +107,39 @@ switch ($tab) {
|
|||||||
|
|
||||||
case 'online':
|
case 'online':
|
||||||
default:
|
default:
|
||||||
|
if (is_metaconsole() === false && has_metaconsole() === true) {
|
||||||
|
$meta_puid = null;
|
||||||
|
|
||||||
|
$server_id = $config['metaconsole_node_id'];
|
||||||
|
$dbh = (object) $config['dbconnection'];
|
||||||
|
|
||||||
|
// Connect to metaconsole.
|
||||||
|
$result_code = metaconsole_load_external_db(
|
||||||
|
[
|
||||||
|
'dbhost' => $config['replication_dbhost'],
|
||||||
|
'dbuser' => $config['replication_dbuser'],
|
||||||
|
'dbpass' => io_output_password($config['replication_dbpass']),
|
||||||
|
'dbname' => $config['replication_dbname'],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($result_code < 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = db_get_value('value', 'tconfig', 'token', 'pandora_uid');
|
||||||
|
|
||||||
|
$meta_puid = $value;
|
||||||
|
|
||||||
|
// Return connection to node.
|
||||||
|
metaconsole_restore_db();
|
||||||
|
|
||||||
|
if ($meta_puid === false || $meta_puid === null) {
|
||||||
|
ui_print_warning_message(__('Please register on metaconsole first.'));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
|
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
|
||||||
include $config['homedir'].'/godmode/um_client/index.php';
|
include $config['homedir'].'/godmode/um_client/index.php';
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user