Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/AphrontRequest.php
| Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | public function isFormPost() { | ||||
| if (!$post) { | if (!$post) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| return $this->validateCSRF(); | return $this->validateCSRF(); | ||||
| } | } | ||||
| public function hasCSRF() { | |||||
| try { | |||||
| $this->validateCSRF(); | |||||
| return true; | |||||
| } catch (AphrontMalformedRequestException $ex) { | |||||
| return false; | |||||
| } | |||||
| } | |||||
| public function isFormOrHisecPost() { | public function isFormOrHisecPost() { | ||||
| $post = $this->getExists(self::TYPE_FORM) && | $post = $this->getExists(self::TYPE_FORM) && | ||||
| $this->isHTTPPost(); | $this->isHTTPPost(); | ||||
| if (!$post) { | if (!$post) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 516 Lines • Show Last 20 Lines | |||||