diff --git a/th_chat/discuz_plugin_th_chat.xml b/th_chat/discuz_plugin_th_chat.xml index 666596e..1c0e39f 100644 --- a/th_chat/discuz_plugin_th_chat.xml +++ b/th_chat/discuz_plugin_th_chat.xml @@ -14,7 +14,7 @@ - + diff --git a/th_chat/hook.class.php b/th_chat/hook.class.php index f170d79..2e31ba0 100644 --- a/th_chat/hook.class.php +++ b/th_chat/hook.class.php @@ -42,7 +42,7 @@ function post_middle_message($args) if ($config['new_post'] > 0 && $args['param'][0] == 'post_newthread_succeed') { $forums = unserialize($config['category_post']); if (in_array($args['param'][2]['fid'], $forums)) { - if ($config['new_post'] == 2 || $_POST['th_chat_notify']) { + if ($config['new_post'] == 1 || $_POST['th_chat_notify']) { if ($post = DB::fetch_first("SELECT * FROM " . DB::table('forum_post') . " WHERE `fid` = " . $args['param'][2]['fid'] . " AND `tid` = " . $args['param'][2]['tid'] . " AND `pid` = " . $args['param'][2]['pid'])) { $msg = "โพสต์ " . addslashes($post['subject']) . ""; if ($config['show_category']) { @@ -56,7 +56,7 @@ function post_middle_message($args) } else if ($config['edit_post'] > 0 && $args['param'][0] == 'post_edit_succeed') { $forums = unserialize($config['category_post']); if (in_array($args['param'][2]['fid'], $forums)) { - if ($config['edit_post'] == 2 || $_POST['th_chat_notify']) { + if ($config['edit_post'] == 1 || $_POST['th_chat_notify']) { if ($post = DB::fetch_first("SELECT * FROM " . DB::table('forum_post') . " WHERE `fid` = " . $args['param'][2]['fid'] . " AND `tid` = " . $args['param'][2]['tid'] . " AND `pid` = " . $args['param'][2]['pid'])) { $msg = "อัปเดตโพสต์ " . addslashes($post['subject']) . ""; if ($config['show_category']) {