projects
/
WP-Plugins
/
glm-member-db-events.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d3e669
)
Clear the event categories first.
author
Steve Sutton
<steve@gaslightmedia.com>
Mon, 24 Apr 2017 19:07:17 +0000
(15:07 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Mon, 24 Apr 2017 19:07:17 +0000
(15:07 -0400)
before adding more of the same category to an event.
models/front/events/icalFeedImport.php
patch
|
blob
|
history
diff --git
a/models/front/events/icalFeedImport.php
b/models/front/events/icalFeedImport.php
index
f386bc6
..
eaa1390
100644
(file)
--- a/
models/front/events/icalFeedImport.php
+++ b/
models/front/events/icalFeedImport.php
@@
-261,6
+261,12
@@
class GlmMembersFront_events_icalFeedImport
$event_abstract = new GlmDataEvents( $this->wpdb, $this->config );
$event_abstract->updateSlug( $event_id );
+ // Remove any old category data for this event_id.
+ $this->wpdb->delete(
+ GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'event_categories',
+ array( 'event' => $event_id ),
+ '%d'
+ );
// Categories
if ( isset( $event['CATEGORIES'] ) ) {
$category_data = explode( ',', $event['CATEGORIES'] );