Version 0.3.4
This commit is contained in:
@@ -93,7 +93,6 @@ class admin_controller
|
||||
'mchat_message_limit' => array('default' => 10, 'validation' => array('num', false, 10, 30)),
|
||||
'mchat_message_num' => array('default' => 10, 'validation' => array('num', false, 10, 50)),
|
||||
'mchat_message_top' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_new_posts' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_new_posts_edit' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_new_posts_quote' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_new_posts_reply' => array('default' => 0, 'validation' => array()),
|
||||
@@ -139,7 +138,16 @@ class admin_controller
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$this->user->lang('\\1'))) ? \$this->user->lang('\\1') : '\\1'", $error);
|
||||
// The /e modifier is deprecated since PHP 5.5.0
|
||||
//$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$this->user->lang('\\1'))) ? \$this->user->lang('\\1') : '\\1'", $error);
|
||||
foreach ($error as $i => $err)
|
||||
{
|
||||
$lang = $this->user->lang($err);
|
||||
if (!empty($lang))
|
||||
{
|
||||
$error[$i] = $lang;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error))
|
||||
{
|
||||
|
||||
@@ -46,6 +46,7 @@ class main_controller
|
||||
* Controller for mChat actions called with Ajax requests
|
||||
*
|
||||
* @param $action The action to perform, one of add|edit|del|clean|refresh|whois
|
||||
* @return \Symfony\Component\HttpFoundation\JsonResponse A Symfony JsonResponse object
|
||||
*/
|
||||
public function action($action)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user