Version 0.1.9
This commit is contained in:
@@ -542,7 +542,7 @@ class render_helper
|
|||||||
if (!$this->config['mchat_enable'] || !$mchat_add_mess || !check_form_key('mchat_posting', -1))
|
if (!$this->config['mchat_enable'] || !$mchat_add_mess || !check_form_key('mchat_posting', -1))
|
||||||
{
|
{
|
||||||
// Forbidden (for jQ AJAX request)
|
// Forbidden (for jQ AJAX request)
|
||||||
if ($this->request->is_ajax()) // FOR DEBUG
|
if ($this->request->is_ajax())
|
||||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_ERROR_FORBIDDEN');
|
throw new \phpbb\exception\http_exception(403, 'MCHAT_ERROR_FORBIDDEN');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -814,14 +814,6 @@ class render_helper
|
|||||||
// If read mode request set true
|
// If read mode request set true
|
||||||
$mchat_read_mode = true;
|
$mchat_read_mode = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* Event render_helper_edit
|
|
||||||
*
|
|
||||||
* @event dmzx.mchat.core.render_helper_edit
|
|
||||||
* @since 0.1.4
|
|
||||||
*/
|
|
||||||
$this->dispatcher->trigger_event('dmzx.mchat.core.render_helper_edit');
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Delete function...
|
// Delete function...
|
||||||
@@ -853,14 +845,6 @@ class render_helper
|
|||||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_ERROR_FORBIDDEN');
|
throw new \phpbb\exception\http_exception(403, 'MCHAT_ERROR_FORBIDDEN');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Event render_helper_delete
|
|
||||||
*
|
|
||||||
* @event dmzx.mchat.core.render_helper_delete
|
|
||||||
* @since 0.1.4
|
|
||||||
*/
|
|
||||||
$this->dispatcher->trigger_event('dmzx.mchat.core.render_helper_delete');
|
|
||||||
|
|
||||||
// Run delete!
|
// Run delete!
|
||||||
$sql = 'DELETE FROM ' . $this->mchat_table . '
|
$sql = 'DELETE FROM ' . $this->mchat_table . '
|
||||||
WHERE message_id = ' . (int) $message_id;
|
WHERE message_id = ' . (int) $message_id;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class listener implements EventSubscriberInterface
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function __construct(\dmzx\mchat\core\render_helper $render_helper, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\db\driver\driver_interface $db, $phpbb_container, $phpEx, $table_prefix,$mchat_table)
|
public function __construct(\dmzx\mchat\core\render_helper $render_helper, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\db\driver\driver_interface $db, $phpbb_container, $phpEx, $table_prefix, $mchat_table)
|
||||||
{
|
{
|
||||||
$this->render_helper = $render_helper;
|
$this->render_helper = $render_helper;
|
||||||
$this->auth = $auth;
|
$this->auth = $auth;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class mchat_schema extends \phpbb\db\migration\migration
|
|||||||
|
|
||||||
$this->table_prefix . 'mchat' => array(
|
$this->table_prefix . 'mchat' => array(
|
||||||
'COLUMNS' => array(
|
'COLUMNS' => array(
|
||||||
'message_id' => array('UINT', NULL, 'auto_increment'),
|
'message_id' => array('UINT', null, 'auto_increment'),
|
||||||
'user_id' => array('UINT', 0),
|
'user_id' => array('UINT', 0),
|
||||||
'user_ip' => array('VCHAR:40', ''),
|
'user_ip' => array('VCHAR:40', ''),
|
||||||
'message' => array('MTEXT_UNI', ''),
|
'message' => array('MTEXT_UNI', ''),
|
||||||
|
|||||||
Reference in New Issue
Block a user