Update add event form to chop intro field if too long.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 17 Jan 2018 20:02:13 +0000 (15:02 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 17 Jan 2018 20:02:13 +0000 (15:02 -0500)
Causing issues with the db insert. if longer than 255 it just won't
insert the record.

index.php
models/front/events/frontAdd.php

index 22f3799..84b19ef 100644 (file)
--- a/index.php
+++ b/index.php
@@ -47,7 +47,7 @@ if (!defined('ABSPATH')) {
  *  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.6.72');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.73');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.4');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index fd06b9d..a71d939 100644 (file)
@@ -444,6 +444,8 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
                     }
                 }
                 // mySql transactions
+                // Need to limit intro field to no more than 165
+                $intro = substr( $intro, 0, 165 );
                 $eventData = array(
                     'status'        => '20',
                     'created'       => $date,