mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
PHP/Core
* enforced v7.1 compliance, preparations for v7.2 * removed deprecated usage of each() * prefer array deconstruction via [] instead of calling list() * try to catch failed session_start() * prefer ... - Token instead of calling func_get_args() func_num_args() * enforce return types in AjaxHandler * revision push
This commit is contained in:
@@ -6,15 +6,15 @@ if (!defined('AOWOW_REVISION'))
|
||||
class AjaxContactus extends AjaxHandler
|
||||
{
|
||||
protected $_post = array(
|
||||
'mode' => [FILTER_SANITIZE_NUMBER_INT, null],
|
||||
'reason' => [FILTER_SANITIZE_NUMBER_INT, null],
|
||||
'mode' => [FILTER_SANITIZE_NUMBER_INT, null ],
|
||||
'reason' => [FILTER_SANITIZE_NUMBER_INT, null ],
|
||||
'ua' => [FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW],
|
||||
'appname' => [FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW],
|
||||
'page' => [FILTER_SANITIZE_URL, null],
|
||||
'page' => [FILTER_SANITIZE_URL, null ],
|
||||
'desc' => [FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW],
|
||||
'id' => [FILTER_SANITIZE_NUMBER_INT, null],
|
||||
'relatedurl' => [FILTER_SANITIZE_URL, null],
|
||||
'email' => [FILTER_SANITIZE_EMAIL, null]
|
||||
'id' => [FILTER_SANITIZE_NUMBER_INT, null ],
|
||||
'relatedurl' => [FILTER_SANITIZE_URL, null ],
|
||||
'email' => [FILTER_SANITIZE_EMAIL, null ]
|
||||
);
|
||||
|
||||
public function __construct(array $params)
|
||||
@@ -33,7 +33,7 @@ class AjaxContactus extends AjaxHandler
|
||||
7: already reported
|
||||
$: prints response
|
||||
*/
|
||||
protected function handleContactUs()
|
||||
protected function handleContactUs() : string
|
||||
{
|
||||
$mode = $this->_post['mode'];
|
||||
$rsn = $this->_post['reason'];
|
||||
@@ -89,3 +89,5 @@ class AjaxContactus extends AjaxHandler
|
||||
return Lang::main('intError');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user