Files
aowow/includes/ajaxHandler/locale.class.php
Sarjuuk da59440106 Fixup
* access class property in screenshot/comment-admin by function. Aowow is compatible with PHP 5.5 again
 * changed line-endings across the board from \r\n to \n
2017-02-24 18:45:36 +01:00

34 lines
677 B
PHP

<?php
if (!defined('AOWOW_REVISION'))
die('invalid access');
class AjaxLocale extends AjaxHandler
{
protected $_get = array(
'locale' => [FILTER_CALLBACK, ['options' => 'AjaxHandler::checkLocale']]
);
public function __construct(array $params)
{
parent::__construct($params);
// always this one
$this->handler = 'handleLocale';
$this->doRedirect = true;
}
/* responses
header()
*/
protected function handleLocale()
{
User::setLocale($this->_get['locale']);
User::save();
return isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.';
}
}
?>