2011-09-25 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: added api call "set_validate_event". * include/api.php: fixed the login process for do more Pandora standar. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4997 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0e25e30995
commit
8de3c37f5c
|
@ -1,3 +1,9 @@
|
|||
2011-09-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: added api call "set_validate_event".
|
||||
|
||||
* include/api.php: fixed the login process for do more Pandora standar.
|
||||
|
||||
2011-09-23 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: added the code for the return the more
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
|
||||
require_once ("config.php");
|
||||
require_once("functions_api.php");
|
||||
|
||||
global $config;
|
||||
|
||||
enterprise_include_once ('include/functions_enterprise_api.php');
|
||||
|
||||
$ipOrigin = $_SERVER['REMOTE_ADDR'];
|
||||
|
@ -43,6 +46,7 @@ if (!empty($apiPassword)) {
|
|||
else {
|
||||
$user_in_db = process_user_login($user, $password);
|
||||
if ($user_in_db !== false) {
|
||||
$config['id_user'] = $user_in_db;
|
||||
$correctLogin = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1512,6 +1512,23 @@ function set_event_validate_filter($trash1, $trash2, $other, $trash3) {
|
|||
}
|
||||
}
|
||||
|
||||
function set_validate_events($id_event, $trash1, $other, $return_type, $user_in_db) {
|
||||
$text = $other['data'];
|
||||
|
||||
// Set off the standby mode when close an event
|
||||
$event = events_get_event ($id_event);
|
||||
alerts_agent_module_standby ($event['id_alert_am'], 0);
|
||||
|
||||
$result = events_validate_event ($id_event, false, $text);
|
||||
|
||||
if ($result) {
|
||||
returnData('string', array('type' => 'string', 'data' => 'Correct validation'));
|
||||
}
|
||||
else {
|
||||
returnError('error_validate_event', 'Error in validation operation.');
|
||||
}
|
||||
}
|
||||
|
||||
function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_db) {
|
||||
global $config;
|
||||
|
||||
|
|
Loading…
Reference in New Issue