From 4f6189511037ef04bc0ee862132aeab421f78d96 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 4 Oct 2016 14:06:15 -0400 Subject: [PATCH] Always filled in http on livecam submission, even when empty --- classes/data/dataMemberInfo.php | 6 ++++-- index.php | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/classes/data/dataMemberInfo.php b/classes/data/dataMemberInfo.php index 36254a1e..523a6954 100644 --- a/classes/data/dataMemberInfo.php +++ b/classes/data/dataMemberInfo.php @@ -510,8 +510,10 @@ class GlmDataMemberInfo extends GlmDataAbstract * This will add a protocol prefix to the live cam url */ $liveCamUrl = $r['live_cam_url']; - if (!preg_match("~^(?:f|ht)tps?://~i", $liveCamUrl)) { - $r['live_cam_url'] = "http://" . $liveCamUrl; + if ($liveCamUrl != "") { + if (!preg_match("~^(?:f|ht)tps?://~i", $liveCamUrl)) { + $r['live_cam_url'] = "http://" . $liveCamUrl; + } } $formattedStr = trim(preg_replace('/\s\s+/', ' ', $r['short_descr'])); diff --git a/index.php b/index.php index 1c14df00..5f50b185 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 2.6.5 + * Version: 2.6.6 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmMembersDatabase * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 2.6.5 + * @version 2.6.6 */ /* @@ -38,7 +38,7 @@ * */ -define('GLM_MEMBERS_PLUGIN_VERSION', '2.6.5'); +define('GLM_MEMBERS_PLUGIN_VERSION', '2.6.6'); define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.19'); // Check if plugin version is not current in WordPress option and if needed updated it -- 2.17.1