From: Steve Sutton Date: Fri, 9 Sep 2016 14:36:11 +0000 (-0400) Subject: If no end date on front end event form set to start date. X-Git-Tag: v1.3.6^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=410c1c61c285f4f141d8d6446cbc72b0f6f45496;p=WP-Plugins%2Fglm-member-db-events.git If no end date on front end event form set to start date. Getting issue where the event submitted by the front end form with no end dates getting set to 1969 date. --- diff --git a/index.php b/index.php index 9fbecbe..48eb46d 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database Events * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 1.3.5 + * Version: 1.3.6 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -20,7 +20,7 @@ * @package glmMembersDatabaseEventsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.3.5 + * @version 1.3.6 */ /* @@ -38,7 +38,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.3.5'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.3.6'); define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.22'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/events/frontAdd.php b/models/front/events/frontAdd.php index 6ac49e1..bb6241e 100644 --- a/models/front/events/frontAdd.php +++ b/models/front/events/frontAdd.php @@ -146,6 +146,9 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents $date = date('y/m/d H:i:s a', time()); $starting = trim(filter_var($_REQUEST['starting'], FILTER_SANITIZE_STRING)); $ending = trim(filter_var($_REQUEST['ending'], FILTER_SANITIZE_STRING)); + if ( !$ending ) { + $ending = $starting; + }