function Edit() { // Check the token if (!Kit::CheckToken()) { trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); } $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $resolutionID = Kit::GetParam('resolutionid', _POST, _INT); $resolution = Kit::GetParam('resolution', _POST, _STRING); $width = Kit::GetParam('width', _POST, _INT); $height = Kit::GetParam('height', _POST, _INT); $enabled = Kit::GetParam('enabled', _POST, _CHECKBOX); // Edit the resolution $resObject = new Resolution($db); if (!$resObject->Edit($resolutionID, $resolution, $width, $height, $enabled)) { trigger_error($resObject->GetErrorMessage(), E_USER_ERROR); } $response->SetFormSubmitResponse('Resolution edited'); $response->Respond(); }
function Edit() { // Check the token if (!Kit::CheckToken()) { trigger_error('Token does not match', E_USER_ERROR); } $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $resolutionID = Kit::GetParam('resolutionid', _POST, _INT); $resolution = Kit::GetParam('resolution', _POST, _STRING); $width = Kit::GetParam('width', _POST, _INT); $height = Kit::GetParam('height', _POST, _INT); // Edit the resolution $resObject = new Resolution($db); if (!$resObject->Edit($resolutionID, $resolution, $width, $height)) { trigger_error($resObject->GetErrorMessage(), E_USER_ERROR); } $response->SetFormSubmitResponse('Resolution edited'); $response->Respond(); }