mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
minor change
This commit is contained in:
parent
ab9557c681
commit
5539ca51c5
@ -107,11 +107,40 @@ switch ($tab) {
|
|||||||
|
|
||||||
case 'online':
|
case 'online':
|
||||||
default:
|
default:
|
||||||
if ($config['node_metaconsole'] === 0) {
|
if (is_metaconsole() === false && has_metaconsole() === true) {
|
||||||
$mode = \UpdateManager\UI\Manager::MODE_ONLINE;
|
$meta_puid = null;
|
||||||
include $config['homedir'].'/godmode/um_client/index.php';
|
|
||||||
} else {
|
$server_id = $config['metaconsole_node_id'];
|
||||||
ui_print_warning_message(__('Please register on metaconsole.'));
|
$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;
|
||||||
|
include $config['homedir'].'/godmode/um_client/index.php';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user