From 466dba4b3834b52ab240c98fff74ac15d5c81599 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 7 Oct 2019 15:34:54 -0400 Subject: [PATCH] Reset name slug if doing bulk updates. For old events added in front end form that have no name_slug set. --- index.php | 6 +++--- models/admin/events/index.php | 2 ++ readme.txt | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index b8e3da0..878927e 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Associate - Events Add-On * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 1.8.2 + * Version: 1.8.3 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmMembersDatabaseEventsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.8.2 + * @version 1.8.3 */ // Check that we're being called by WordPress. @@ -43,7 +43,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.8.2'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.8.3'); /** * Plugin DB Version */ diff --git a/models/admin/events/index.php b/models/admin/events/index.php index b2705f7..a4bbe56 100644 --- a/models/admin/events/index.php +++ b/models/admin/events/index.php @@ -108,6 +108,8 @@ class GlmMembersAdmin_events_index extends GlmDataEvents $bulkEdit = filter_var( $_REQUEST['bulkEdit'], FILTER_VALIDATE_INT, [ 'flags' => FILTER_FORCE_ARRAY ] ); foreach ( $bulkEdit as $eventId ) { $event = $this->editEntry( $eventId ); + // Update name slug for event + $this->updateSlug( $event['fieldData']['id'] ); $member_id = $event['fieldData']['ref_dest_id']; switch ( $bulkAction ) { case 'Approve': diff --git a/readme.txt b/readme.txt index 5820331..66e9581 100755 --- a/readme.txt +++ b/readme.txt @@ -25,6 +25,9 @@ e.g. 1. Activate the plugin through the 'Plugins' menu in WordPress == Changelog == += 1.8.3 = +* Update bulk methods to reset the name slug. + = 1.8.2 = * Bugfix for new events from front end. -- 2.17.1