mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Added overlap-checking to PHP and REST-Return
This commit is contained in:
@@ -207,8 +207,13 @@ class Band extends CI_Controller {
|
||||
$frequencyto = $this->security->xss_clean($this->input->post('frequencyto', true));
|
||||
$mode = $this->security->xss_clean($this->input->post('mode', true));
|
||||
|
||||
$this->bands->saveBandEdge($id, $frequencyfrom, $frequencyto, $mode);
|
||||
echo json_encode(array('message' => 'OK'));
|
||||
$overlap=$this->bands->check4overlapEdges($id, $frequencyfrom, $frequencyto, $mode);
|
||||
if (!($overlap)) {
|
||||
$this->bands->saveBandEdge($id, $frequencyfrom, $frequencyto, $mode);
|
||||
echo json_encode(array('message' => 'OK'));
|
||||
} else {
|
||||
echo json_encode(array('message' => 'Overlapping'));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user