/** * Checks todo export form data * * @author Atul Atri * @return bool "true" on Success, "false" otherwise */ private function CheckTodoExportForm() { $_SWIFT = SWIFT::GetInstance(); if (!SWIFT_Session::CheckCSRFHash($_POST['csrfhash'])) { SWIFT::Error($_SWIFT->Language->Get('titlecsrfhash'), $_SWIFT->Language->Get('msgcsrfhash')); return false; } $_pId = $_POST['todoproject']; $_todolistId = $_POST['todolist']; $_todo = trim($_POST['todoitem']); $_date = trim($_POST['duedate']); if (empty($_pId)) { $this->UserInterface->CheckFields('todoproject'); $this->UserInterface->Error($this->Language->Get('basecamp_error_title'), $this->Language->Get('basecamp_empty_todoproject')); return false; } if (empty($_todolistId)) { $this->UserInterface->CheckFields('todlist'); $this->UserInterface->Error($this->Language->Get('basecamp_error_title'), $this->Language->Get('basecamp_empty_todolist')); return false; } if (empty($_todo)) { $this->UserInterface->CheckFields('todoitem'); $this->UserInterface->Error($this->Language->Get('basecamp_error_title'), $this->Language->Get('basecamp_empty_todo')); return false; } if (!empty($_date) && date('m/d/Y', strtotime($_date)) != $_date) { $this->UserInterface->CheckFields('duedate'); $this->UserInterface->Error($this->Language->Get('basecamp_error_title'), $this->Language->Get('basecamp_empty_duedate')); return false; } return true; }
/** * Checks todo export form data * * @author Atul Atri * @return bool "true" on Success, "false" otherwise */ private function CheckCodeSubmit() { $_SWIFT = SWIFT::GetInstance(); if (!SWIFT_Session::CheckCSRFHash($_POST['csrfhash'])) { SWIFT::Error($_SWIFT->Language->Get('titlecsrfhash'), $_SWIFT->Language->Get('msgcsrfhash')); return false; } if (empty($_POST['basecampcode'])) { return false; } return true; }