Version Description
- 2016-01-13 - High priority =
- Bug fix: When activating WP Live Chat Support, a table is created with a shared MySQL column name which caused issues on some servers. The column name has been changed
- WP Live Chat Support Pro users need to update to the latest version when using this version (there is a notice for this in the live chat dashboard)
Download this release
Release Info
Developer | WP-LiveChat |
Plugin | WP Live Chat Support |
Version | 5.0.14 |
Comparing to | |
See all releases |
Code changes from version 5.0.13 to 5.0.14
- functions.php +13 -4
- readme.txt +6 -2
- wp-live-chat-support.php +34 -25
functions.php
CHANGED
@@ -171,7 +171,7 @@ function wplc_record_chat_msg($from,$cid,$msg) {
|
|
171 |
array(
|
172 |
'chat_sess_id' => $cid,
|
173 |
'timestamp' => current_time('mysql'),
|
174 |
-
'
|
175 |
'msg' => $msg,
|
176 |
'status' => 0,
|
177 |
'originates' => $orig
|
@@ -532,7 +532,11 @@ function wplc_return_user_chat_messages($cid) {
|
|
532 |
$msg_hist = "";
|
533 |
foreach ($results as $result) {
|
534 |
$id = $result->id;
|
535 |
-
|
|
|
|
|
|
|
|
|
536 |
|
537 |
$msg = $result->msg;
|
538 |
//$timestamp = strtotime($result->timestamp);
|
@@ -629,7 +633,10 @@ function wplc_return_chat_messages($cid,$transcript = false,$html = true) {
|
|
629 |
$previous_time = "";
|
630 |
$previous_timestamp = 0;
|
631 |
foreach ($results as $result) {
|
632 |
-
|
|
|
|
|
|
|
633 |
$msg = stripslashes($result->msg);
|
634 |
$timestamp = strtotime($result->timestamp);
|
635 |
|
@@ -758,7 +765,9 @@ function wplc_return_admin_chat_messages($cid) {
|
|
758 |
foreach ($results as $result) {
|
759 |
|
760 |
$id = $result->id;
|
761 |
-
|
|
|
|
|
762 |
wplc_mark_as_read_admin_chat_messages($id);
|
763 |
$msg = $result->msg;
|
764 |
//$timestamp = strtotime($result->timestamp);
|
171 |
array(
|
172 |
'chat_sess_id' => $cid,
|
173 |
'timestamp' => current_time('mysql'),
|
174 |
+
'msgfrom' => $fromname,
|
175 |
'msg' => $msg,
|
176 |
'status' => 0,
|
177 |
'originates' => $orig
|
532 |
$msg_hist = "";
|
533 |
foreach ($results as $result) {
|
534 |
$id = $result->id;
|
535 |
+
|
536 |
+
global $wplc_version;
|
537 |
+
$v_check = str_replace(".","",$wplc_version);
|
538 |
+
if (intval($v_check) < 5014) { $from = $result->from; } else { $from = $result->msgfrom; }
|
539 |
+
|
540 |
|
541 |
$msg = $result->msg;
|
542 |
//$timestamp = strtotime($result->timestamp);
|
633 |
$previous_time = "";
|
634 |
$previous_timestamp = 0;
|
635 |
foreach ($results as $result) {
|
636 |
+
global $wplc_version;
|
637 |
+
$v_check = str_replace(".","",$wplc_version);
|
638 |
+
if (intval($v_check) < 5014) { $from = $result->from; } else { $from = $result->msgfrom; }
|
639 |
+
|
640 |
$msg = stripslashes($result->msg);
|
641 |
$timestamp = strtotime($result->timestamp);
|
642 |
|
765 |
foreach ($results as $result) {
|
766 |
|
767 |
$id = $result->id;
|
768 |
+
global $wplc_version;
|
769 |
+
$v_check = str_replace(".","",$wplc_version);
|
770 |
+
if (intval($v_check) < 5014) { $from = $result->from; } else { $from = $result->msgfrom; }
|
771 |
wplc_mark_as_read_admin_chat_messages($id);
|
772 |
$msg = $result->msg;
|
773 |
//$timestamp = strtotime($result->timestamp);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: WP-LiveChat, NickDuncan, CodeCabin_, Jarryd Long
|
|
3 |
Donate link: http://www.wp-livechat.com
|
4 |
Tags: live chat, live support, chat plugin, live help, wordpress chat, customer support, chat, chat services, live chat plugin, live support plugin, live chat support plugin, wordpress live chat, wordpress live chat plugin, live chat software, live chat services, chat plugin, support plugin, support, chat software, chat online, visitor chat, chat, free chat, free live chat, customer support, online support, live help, live chat help, chat widget, live chat widget
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.4
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2
|
9 |
|
@@ -199,7 +199,11 @@ It is highly recommended that you upgrade to WP Live Chat Support version 4.1.4
|
|
199 |
|
200 |
== Changelog ==
|
201 |
|
202 |
-
= 5.0.
|
|
|
|
|
|
|
|
|
203 |
* UTF8 encoding bug fixed
|
204 |
|
205 |
= 5.0.12 - 2016-01-04 - Low priority =
|
3 |
Donate link: http://www.wp-livechat.com
|
4 |
Tags: live chat, live support, chat plugin, live help, wordpress chat, customer support, chat, chat services, live chat plugin, live support plugin, live chat support plugin, wordpress live chat, wordpress live chat plugin, live chat software, live chat services, chat plugin, support plugin, support, chat software, chat online, visitor chat, chat, free chat, free live chat, customer support, online support, live help, live chat help, chat widget, live chat widget
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.4.1
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2
|
9 |
|
199 |
|
200 |
== Changelog ==
|
201 |
|
202 |
+
= 5.0.14 - 2016-01-13 - High priority =
|
203 |
+
* Bug fix: When activating WP Live Chat Support, a table is created with a shared MySQL column name which caused issues on some servers. The column name has been changed
|
204 |
+
* WP Live Chat Support Pro users need to update to the latest version when using this version (there is a notice for this in the live chat dashboard)
|
205 |
+
|
206 |
+
= 5.0.13 - 2016-01-05 - High priority =
|
207 |
* UTF8 encoding bug fixed
|
208 |
|
209 |
= 5.0.12 - 2016-01-04 - Low priority =
|
wp-live-chat-support.php
CHANGED
@@ -3,17 +3,20 @@
|
|
3 |
Plugin Name: WP Live Chat Support
|
4 |
Plugin URI: http://www.wp-livechat.com
|
5 |
Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
|
6 |
-
Version: 5.0.
|
7 |
Author: WP-LiveChat
|
8 |
Author URI: http://www.wp-livechat.com
|
9 |
Text Domain: wplivechat
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
/*
|
13 |
-
* 5.0.
|
|
|
|
|
|
|
14 |
* UTF8 encoding bug fixed
|
15 |
*
|
16 |
-
* 5.0.12 -
|
17 |
* Tested with WP 4.4
|
18 |
*
|
19 |
* 5.0.11 - 2015-10-14 - Low priority
|
@@ -291,7 +294,7 @@ global $wplc_tblname_chats;
|
|
291 |
global $wplc_tblname_msgs;
|
292 |
$wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
|
293 |
$wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
|
294 |
-
$wplc_version = "5.0.
|
295 |
|
296 |
define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
|
297 |
define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
|
@@ -1179,7 +1182,10 @@ function wplc_admin_display_chat($cid) {
|
|
1179 |
"
|
1180 |
);
|
1181 |
foreach ($results as $result) {
|
1182 |
-
|
|
|
|
|
|
|
1183 |
$msg = stripslashes($result->msg);
|
1184 |
$msg_hist .= "$from: $msg<br />";
|
1185 |
}
|
@@ -1697,31 +1703,18 @@ function wplc_admin_menu_layout() {
|
|
1697 |
do_action("wplc_hook_admin_menu_layout");
|
1698 |
if (function_exists("wplc_register_pro_version")) {
|
1699 |
global $wplc_pro_version;
|
1700 |
-
|
1701 |
-
|
1702 |
-
<div class='error below-h1'>
|
1703 |
-
|
1704 |
-
<p><?php _e("Dear Pro User", "wplivechat") ?><br /></p>
|
1705 |
-
<p><?php _e("You are using an outdated version of <strong>WP Live Chat Support Pro</strong>. Please", "wplivechat") ?> <a href="http://wp-livechat.com/get-updated-version/" target=\"_BLANK\"><?php _e("update to at least version", "wplivechat") ?> 4.0</a> <?php _e("to ensure all functionality is in working order", "wplivechat") ?>.</p>
|
1706 |
-
<p><strong><?php _e("You're live chat box on your website has been temporarily disabled until the Pro plugin has been updated. This is to ensure a smooth and hassle-free user experience for both yourself and your visitors.", "wplivechat") ?></strong></p>
|
1707 |
-
<p><?php _e("You can update your plugin <a href='./update-core.php'>here</a>, <a href='./plugins.php'>here</a> or <a href='http://wp-livechat.com/get-updated-version/' target='_BLANK'>here</a>.", "wplivechat") ?></strong></p>
|
1708 |
-
<p><?php _e("If you are having difficulty updating the plugin, please contact", "wplivechat") ?> nick@wp-livechat.com</p>
|
1709 |
-
|
1710 |
-
</div>
|
1711 |
-
<?php
|
1712 |
-
}
|
1713 |
-
$wplc_ver = str_replace('.', '', $wplc_pro_version);
|
1714 |
-
$wplc_ver = intval($wplc_ver);
|
1715 |
-
if ($wplc_ver < 501) {
|
1716 |
?>
|
1717 |
<div class='error below-h1'>
|
1718 |
|
1719 |
-
<
|
1720 |
<p><?php _e("You are using an outdated version of <strong>WP Live Chat Support Pro</strong>.", "wplivechat") ?></p>
|
1721 |
<p>
|
1722 |
<strong><?php _e("Please update to the latest version of WP Live Chat Support Pro", 'wplivechat'); ?>
|
1723 |
-
<a href="http://wp-livechat.com/get-updated-version/" target=\"_BLANK\"> <?php _e("Version 5.
|
1724 |
<?php _e("to ensure everything is working correctly.", "wplivechat"); ?>
|
|
|
1725 |
</strong>
|
1726 |
</p>
|
1727 |
<p><?php _e("You can update your plugin <a href='./update-core.php'>here</a>, <a href='./plugins.php'>here</a> or <a href='http://wp-livechat.com/get-updated-version/' target='_BLANK'>here</a>.", "wplivechat") ?></strong></p>
|
@@ -1730,6 +1723,7 @@ function wplc_admin_menu_layout() {
|
|
1730 |
</div>
|
1731 |
<?php
|
1732 |
}
|
|
|
1733 |
}
|
1734 |
if (get_option("WPLC_FIRST_TIME") == true && !class_exists("APC_Object_Cache")) {
|
1735 |
update_option('WPLC_FIRST_TIME', false);
|
@@ -2280,11 +2274,26 @@ function wplc_handle_db() {
|
|
2280 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
2281 |
dbDelta($sql);
|
2282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2283 |
$sql = '
|
2284 |
CREATE TABLE ' . $wplc_tblname_msgs . ' (
|
2285 |
id int(11) NOT NULL AUTO_INCREMENT,
|
2286 |
chat_sess_id int(11) NOT NULL,
|
2287 |
-
|
2288 |
msg varchar(700) CHARACTER SET utf8 NOT NULL,
|
2289 |
timestamp datetime NOT NULL,
|
2290 |
status INT(3) NOT NULL,
|
@@ -2294,7 +2303,7 @@ function wplc_handle_db() {
|
|
2294 |
';
|
2295 |
|
2296 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
2297 |
-
|
2298 |
|
2299 |
add_option("wplc_db_version", $wplc_version);
|
2300 |
update_option("wplc_db_version", $wplc_version);
|
3 |
Plugin Name: WP Live Chat Support
|
4 |
Plugin URI: http://www.wp-livechat.com
|
5 |
Description: The easiest to use website live chat plugin. Let your visitors chat with you and increase sales conversion rates with WP Live Chat Support. No third party connection required!
|
6 |
+
Version: 5.0.14
|
7 |
Author: WP-LiveChat
|
8 |
Author URI: http://www.wp-livechat.com
|
9 |
Text Domain: wplivechat
|
10 |
Domain Path: /languages
|
11 |
*/
|
12 |
/*
|
13 |
+
* 5.0.14 - 2016-01-13 - High priority
|
14 |
+
* Bug fix: When activating WP Live Chat Support, a table is created with a shared MySQL column name which caused issues on some servers. The column name has been changed
|
15 |
+
*
|
16 |
+
* 5.0.13 - 2016-01-05 - High priority
|
17 |
* UTF8 encoding bug fixed
|
18 |
*
|
19 |
+
* 5.0.12 - 2016-01-04 - Low priority
|
20 |
* Tested with WP 4.4
|
21 |
*
|
22 |
* 5.0.11 - 2015-10-14 - Low priority
|
294 |
global $wplc_tblname_msgs;
|
295 |
$wplc_tblname_chats = $wpdb->prefix . "wplc_chat_sessions";
|
296 |
$wplc_tblname_msgs = $wpdb->prefix . "wplc_chat_msgs";
|
297 |
+
$wplc_version = "5.0.14";
|
298 |
|
299 |
define('WPLC_BASIC_PLUGIN_DIR', dirname(__FILE__));
|
300 |
define('WPLC_BASIC_PLUGIN_URL', plugins_url() . "/wp-live-chat-support/");
|
1182 |
"
|
1183 |
);
|
1184 |
foreach ($results as $result) {
|
1185 |
+
global $wplc_version;
|
1186 |
+
$v_check = str_replace(".","",$wplc_version);
|
1187 |
+
if (intval($v_check) < 5014) { $from = $result->msgfrom; } else { $from = $result->from; }
|
1188 |
+
|
1189 |
$msg = stripslashes($result->msg);
|
1190 |
$msg_hist .= "$from: $msg<br />";
|
1191 |
}
|
1703 |
do_action("wplc_hook_admin_menu_layout");
|
1704 |
if (function_exists("wplc_register_pro_version")) {
|
1705 |
global $wplc_pro_version;
|
1706 |
+
$v_check = str_replace(".","",$wplc_pro_version);
|
1707 |
+
if (intval($v_check) < 5100) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1708 |
?>
|
1709 |
<div class='error below-h1'>
|
1710 |
|
1711 |
+
<h1><?php _e("Important Notice", "wplivechat") ?><br /></h1>
|
1712 |
<p><?php _e("You are using an outdated version of <strong>WP Live Chat Support Pro</strong>.", "wplivechat") ?></p>
|
1713 |
<p>
|
1714 |
<strong><?php _e("Please update to the latest version of WP Live Chat Support Pro", 'wplivechat'); ?>
|
1715 |
+
<a href="http://wp-livechat.com/get-updated-version/" target=\"_BLANK\"> <?php _e("Version 5.1.00", "wplivechat"); ?></a>
|
1716 |
<?php _e("to ensure everything is working correctly.", "wplivechat"); ?>
|
1717 |
+
<?php _e("We have addressed a critical bug in the latest basic version which requires the pro version to be updated.", "wplivechat"); ?>
|
1718 |
</strong>
|
1719 |
</p>
|
1720 |
<p><?php _e("You can update your plugin <a href='./update-core.php'>here</a>, <a href='./plugins.php'>here</a> or <a href='http://wp-livechat.com/get-updated-version/' target='_BLANK'>here</a>.", "wplivechat") ?></strong></p>
|
1723 |
</div>
|
1724 |
<?php
|
1725 |
}
|
1726 |
+
|
1727 |
}
|
1728 |
if (get_option("WPLC_FIRST_TIME") == true && !class_exists("APC_Object_Cache")) {
|
1729 |
update_option('WPLC_FIRST_TIME', false);
|
2274 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
2275 |
dbDelta($sql);
|
2276 |
|
2277 |
+
|
2278 |
+
|
2279 |
+
|
2280 |
+
|
2281 |
+
/* check for previous versions containing 'from' instead of 'msgfrom' */
|
2282 |
+
$results = $wpdb->get_results("DESC $wplc_tblname_msgs");
|
2283 |
+
$founded = 0;
|
2284 |
+
foreach ($results as $row ) {
|
2285 |
+
if ($row->Field == "from") {
|
2286 |
+
$founded++;
|
2287 |
+
}
|
2288 |
+
}
|
2289 |
+
|
2290 |
+
if ($founded>0) { $wpdb->query("ALTER TABLE ".$wplc_tblname_msgs." CHANGE `from` `msgfrom` varchar(150)"); }
|
2291 |
+
|
2292 |
$sql = '
|
2293 |
CREATE TABLE ' . $wplc_tblname_msgs . ' (
|
2294 |
id int(11) NOT NULL AUTO_INCREMENT,
|
2295 |
chat_sess_id int(11) NOT NULL,
|
2296 |
+
msgfrom varchar(150) CHARACTER SET utf8 NOT NULL,
|
2297 |
msg varchar(700) CHARACTER SET utf8 NOT NULL,
|
2298 |
timestamp datetime NOT NULL,
|
2299 |
status INT(3) NOT NULL,
|
2303 |
';
|
2304 |
|
2305 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
2306 |
+
dbDelta($sql);
|
2307 |
|
2308 |
add_option("wplc_db_version", $wplc_version);
|
2309 |
update_option("wplc_db_version", $wplc_version);
|