mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch 'ent-10093-Activar-modo-mantenimiento-en-politicas-cuando-se-ejecuta-el-pandora-db' into 'develop'
policy maintenance mode See merge request artica/pandorafms!5506
This commit is contained in:
commit
006b35679d
@ -6399,11 +6399,34 @@ function getBearerToken()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether an instance of pandora_db is running.
|
||||||
|
*
|
||||||
|
* @return boolean Result.
|
||||||
|
*/
|
||||||
|
function is_pandora_db_running()
|
||||||
|
{
|
||||||
|
// Get current DB name: useful for metaconsole connection to node.
|
||||||
|
$db_name = db_get_sql('SELECT DATABASE()');
|
||||||
|
|
||||||
|
$is_free_lock = mysql_db_process_sql(
|
||||||
|
'SELECT IS_FREE_LOCK("'.$db_name.'_pandora_db") AS "value"',
|
||||||
|
'affected_rows',
|
||||||
|
'',
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
$is_free_lock = (bool) $is_free_lock[0]['value'];
|
||||||
|
|
||||||
|
return !$is_free_lock;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check nms license on api.
|
* Check nms license on api.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean.
|
||||||
*/
|
* */
|
||||||
function nms_check_api()
|
function nms_check_api()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user