uprava API metody update aby bolo mozne aktualizovat len to co je potrebne,
pridany page pre Report, zobrazenie info o reporte s dynamickou editaciou nadpisu a popisu
This commit is contained in:
@ -151,15 +151,9 @@ function reportAdd($title, $description, $status = 0, $group = null, $priority =
|
||||
return $db->id();
|
||||
}
|
||||
|
||||
function reportUpdate($report_id, $title, $description, $status = 0, $group = null, $priority = 0) {
|
||||
function reportUpdate($report_id, $report_data) {
|
||||
global $db;
|
||||
$stm = $db->update('reports', [
|
||||
'report_title' => $title,
|
||||
'report_description' => $description,
|
||||
'report_status' => $status,
|
||||
'report_group' => $group,
|
||||
'report_priority' => $priority,
|
||||
], [
|
||||
$stm = $db->update('reports', $report_data, [
|
||||
'report_id' => $report_id
|
||||
]);
|
||||
return ($stm->rowCount() > 0);
|
||||
|
||||
Reference in New Issue
Block a user