mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
changed event in progress method api refactored
This commit is contained in:
parent
9632b36551
commit
a6a97d264e
@ -16168,28 +16168,21 @@ function api_get_event_mcid($server_id, $console_event_id, $trash2, $returnType)
|
|||||||
function api_set_event_in_progress($event_id, $trash2, $returnType)
|
function api_set_event_in_progress($event_id, $trash2, $returnType)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole()) {
|
||||||
$event = db_process_sql_update(
|
$table = 'tmetaconsole_event';
|
||||||
'tmetaconsole_event',
|
|
||||||
['estado' => 2],
|
|
||||||
['id_evento' => $event_id]
|
|
||||||
);
|
|
||||||
if ($event !== false) {
|
|
||||||
returnData($returnType, ['type' => 'string', 'data' => $event]);
|
|
||||||
} else {
|
|
||||||
returnError('id_not_found', 'string');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$event = db_process_sql_update(
|
$table = 'tevento';
|
||||||
'tevento',
|
}
|
||||||
['estado' => 2],
|
|
||||||
['id_evento' => $event_id]
|
$event = db_process_sql_update(
|
||||||
);
|
$table,
|
||||||
if ($event !== false) {
|
['estado' => 2],
|
||||||
returnData($returnType, ['type' => 'string', 'data' => $event]);
|
['id_evento' => $event_id]
|
||||||
} else {
|
);
|
||||||
returnError('id_not_found', 'string');
|
|
||||||
}
|
if ($event !== false) {
|
||||||
|
returnData($returnType, ['type' => 'string', 'data' => $event]);
|
||||||
|
} else {
|
||||||
|
returnError('id_not_found', 'string');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user