* 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:
Sarjuuk
2018-11-27 00:43:32 +01:00
parent f8a34aa98e
commit d9cd24026c
46 changed files with 299 additions and 342 deletions

View File

@@ -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');
}
}
?>