From 2f3bbeef53f6c18934d703aa50ecc81920e00c67 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 8 May 2015 10:52:09 -0700 Subject: [PATCH] Fixes #972 - chatbox count. (resave preferences to correct). Should also correct any moderation issues. --- e107_plugins/chatbox_menu/admin_chatbox.php | 6 +++--- e107_plugins/chatbox_menu/chat.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e107_plugins/chatbox_menu/admin_chatbox.php b/e107_plugins/chatbox_menu/admin_chatbox.php index 92d2d71ea..7fc587fae 100644 --- a/e107_plugins/chatbox_menu/admin_chatbox.php +++ b/e107_plugins/chatbox_menu/admin_chatbox.php @@ -31,7 +31,7 @@ $frm = e107::getForm(); if (isset($_POST['updatesettings'])) { $temp = array(); - $temp['chatbox_posts'] = min(intval($_POST['chatbox_posts']), 5); + $temp['chatbox_posts'] = vartrue($_POST['chatbox_posts'], 5); $temp['cb_layer'] = intval($_POST['cb_layer']); $temp['cb_layer_height'] = max(varset($_POST['cb_layer_height'], 200), 150); $temp['cb_emote'] = intval($_POST['cb_emote']); @@ -97,7 +97,7 @@ $text = " ".CHBLAN_11.": - ".$frm->select('chatbox_posts', array(5, 10, 15, 20, 25), $pref['chatbox_posts'])."".CHBLAN_12." + ".$frm->select('chatbox_posts', array(5, 10, 15, 20, 25), $pref['chatbox_posts'],'useValues=1')."".CHBLAN_12." ".CHBLAN_32.": @@ -124,7 +124,7 @@ $text .= " ".LAN_PRUNE.": - ".CHBLAN_23.$frm->select('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true).$frm->admin_button('prune', LAN_PRUNE, 'other')."".CHBLAN_22." + ".CHBLAN_23.$frm->select('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true).$frm->admin_button('prune', LAN_PRUNE, 'other')."".CHBLAN_22." ".CHBLAN_34.": diff --git a/e107_plugins/chatbox_menu/chat.php b/e107_plugins/chatbox_menu/chat.php index 75ef5d4b3..19bdf3da1 100644 --- a/e107_plugins/chatbox_menu/chat.php +++ b/e107_plugins/chatbox_menu/chat.php @@ -22,7 +22,7 @@ $mes = e107::getMessage(); $sql->select("menus", "*", "menu_name='chatbox_menu'"); $row = $sql->fetch(); -if (!check_class($row['menu_class'])) +if (!check_class(intval($row['menu_class']))) { $mes->addError(CHATBOX_L24); $ns->tablerender(LAN_ERROR, $mes->render()); @@ -175,4 +175,4 @@ $ns->tablerender(CHATBOX_L20, $mes->render().$text); require_once(FOOTERF); -?> +?> \ No newline at end of file