Event List - Version 0.7.12

Version Description

(2017-10-09) = * fixed some mature issues with older wordpress versions * fixed event import for php version < 5.4 * fixed usage of html tags in event time, location and details * fixed link to events in event-list widget

Download this release

Release Info

Developer mibuthu
Plugin Icon 128x128 Event List
Version 0.7.12
Comparing to
See all releases

Code changes from version 0.7.11 to 0.7.12

admin/includes/admin-import.php CHANGED
@@ -309,9 +309,11 @@ class EL_Admin_Import {
309
  // Category handling
310
  foreach($reviewed_events as &$event) {
311
  // Remove not available categories of import file
312
- $event['categories'] = array_filter($event['categories'], function($e) {
313
- return $this->categories->is_set($e);
314
- });
 
 
315
  // Add the additionally specified categories to the event
316
  if(!empty($additional_cat_array)) {
317
  $event['categories'] = array_unique(array_merge($event['categories'], $additional_cat_array));
309
  // Category handling
310
  foreach($reviewed_events as &$event) {
311
  // Remove not available categories of import file
312
+ foreach($event['categories'] as $cat) {
313
+ if(!$this->categories->is_set($cat)) {
314
+ unset($event['categories'][$cat]);
315
+ }
316
+ }
317
  // Add the additionally specified categories to the event
318
  if(!empty($additional_cat_array)) {
319
  $event['categories'] = array_unique(array_merge($event['categories'], $additional_cat_array));
event-list.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Event List
4
  Plugin URI: http://wordpress.org/extend/plugins/event-list/
5
  Description: Manage your events and show them in a list view on your site.
6
- Version: 0.7.11
7
  Author: mibuthu
8
  Author URI: http://wordpress.org/extend/plugins/event-list/
9
  Text Domain: event-list
3
  Plugin Name: Event List
4
  Plugin URI: http://wordpress.org/extend/plugins/event-list/
5
  Description: Manage your events and show them in a list view on your site.
6
+ Version: 0.7.12
7
  Author: mibuthu
8
  Author URI: http://wordpress.org/extend/plugins/event-list/
9
  Text Domain: event-list
includes/db.php CHANGED
@@ -100,14 +100,14 @@ class EL_Db {
100
  global $wpdb;
101
  // Sanitize event data (event data will be provided without sanitation of user input)
102
  $event_data['id'] = empty($event_data['id']) ? 0 : intval($event_data['id']);
 
103
  $event_data['pub_user'] = empty($event_data['pub_user']) ? '' : sanitize_user($event_data['pub_user']);
104
  $event_data['pub_date'] = empty($event_data['pub_date']) ? '' : preg_replace('/[^0-9\-: ]/', '', $event_data['pub_date']);
105
  $event_data['start_date'] = empty($event_data['start_date']) ? '' : preg_replace('/[^0-9\-]/', '', $event_data['start_date']);
106
  $event_data['end_date'] = empty($event_data['end_date']) ? '' : preg_replace('/[^0-9\-]/', '', $event_data['end_date']);
107
- $event_data['time'] = empty($event_data['time']) ? '' : sanitize_text_field($event_data['time']);
108
- $event_data['title'] = empty($event_data['title']) ? '' : sanitize_text_field($event_data['title']);
109
- $event_data['location'] = empty($event_data['location']) ? '' : sanitize_text_field($event_data['location']);
110
- $event_data['details'] = empty($event_data['details']) ? '' : sanitize_textarea_field($event_data['details']);
111
  $event_data['categories'] = empty($event_data['categories']) ? array() : array_map('sanitize_key', $event_data['categories']);
112
 
113
  // prepare and validate sqldata
@@ -153,7 +153,7 @@ class EL_Db {
153
  }
154
  else {
155
  // update existing event
156
- return !empty($wpdb->update($this->table, $sqldata, array('id' => $event_data['id']), $sqltypes));
157
  }
158
  }
159
 
100
  global $wpdb;
101
  // Sanitize event data (event data will be provided without sanitation of user input)
102
  $event_data['id'] = empty($event_data['id']) ? 0 : intval($event_data['id']);
103
+ $event_data['title'] = empty($event_data['title']) ? '' : sanitize_text_field($event_data['title']);
104
  $event_data['pub_user'] = empty($event_data['pub_user']) ? '' : sanitize_user($event_data['pub_user']);
105
  $event_data['pub_date'] = empty($event_data['pub_date']) ? '' : preg_replace('/[^0-9\-: ]/', '', $event_data['pub_date']);
106
  $event_data['start_date'] = empty($event_data['start_date']) ? '' : preg_replace('/[^0-9\-]/', '', $event_data['start_date']);
107
  $event_data['end_date'] = empty($event_data['end_date']) ? '' : preg_replace('/[^0-9\-]/', '', $event_data['end_date']);
108
+ $event_data['time'] = empty($event_data['time']) ? '' : wp_kses_post($event_data['time']);
109
+ $event_data['location'] = empty($event_data['location']) ? '' : wp_kses_post($event_data['location']);
110
+ $event_data['details'] = empty($event_data['details']) ? '' : wp_kses_post($event_data['details']);
 
111
  $event_data['categories'] = empty($event_data['categories']) ? array() : array_map('sanitize_key', $event_data['categories']);
112
 
113
  // prepare and validate sqldata
153
  }
154
  else {
155
  // update existing event
156
+ return (bool)$wpdb->update($this->table, $sqldata, array('id' => $event_data['id']), $sqltypes);
157
  }
158
  }
159
 
includes/sc_event-list.php CHANGED
@@ -105,7 +105,7 @@ class SC_Event_List {
105
  $a['event_id'] = $this->get_event_id($a);
106
 
107
  // set sc_id_for_url if empty
108
- if(empty(intval($a['sc_id_for_url']))) {
109
  $a['sc_id_for_url'] = $a['sc_id'];
110
  }
111
 
105
  $a['event_id'] = $this->get_event_id($a);
106
 
107
  // set sc_id_for_url if empty
108
+ if(0 === intval($a['sc_id_for_url'])) {
109
  $a['sc_id_for_url'] = $a['sc_id'];
110
  }
111
 
includes/widget.php CHANGED
@@ -67,7 +67,7 @@ class EL_Widget extends WP_Widget {
67
  echo $args['before_title'].$title.$args['after_title'];
68
  }
69
  $this->upgrade_widget($instance, true);
70
- $linked_page_is_set = empty($instance['url_to_page']);
71
  $linked_page_id_is_set = 0 < intval($instance['sc_id_for_url']);
72
  $shortcode = '[event-list show_filterbar=false';
73
  $shortcode .= ' cat_filter='.$instance['cat_filter'];
67
  echo $args['before_title'].$title.$args['after_title'];
68
  }
69
  $this->upgrade_widget($instance, true);
70
+ $linked_page_is_set = !empty($instance['url_to_page']);
71
  $linked_page_id_is_set = 0 < intval($instance['sc_id_for_url']);
72
  $shortcode = '[event-list show_filterbar=false';
73
  $shortcode .= ' cat_filter='.$instance['cat_filter'];
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: event, events, list, listview, calendar, schedule, shortcode, page, category, categories, filter, admin, attribute, widget, sidebar, feed, rss
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
- Stable tag: 0.7.11
8
  Plugin URI: http://wordpress.org/extend/plugins/event-list
9
  Licence: GPLv2
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -82,6 +82,12 @@ Another possibility would be to call the wordpress function "do_shortcode()".
82
 
83
  == Changelog ==
84
 
 
 
 
 
 
 
85
  = 0.7.11 (2017-10-08) =
86
  * more security improvments due to better sanitation of user inputs
87
  * prepare additional strings for translations
4
  Tags: event, events, list, listview, calendar, schedule, shortcode, page, category, categories, filter, admin, attribute, widget, sidebar, feed, rss
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 0.7.12
8
  Plugin URI: http://wordpress.org/extend/plugins/event-list
9
  Licence: GPLv2
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
82
 
83
  == Changelog ==
84
 
85
+ = 0.7.12 (2017-10-09) =
86
+ * fixed some mature issues with older wordpress versions
87
+ * fixed event import for php version < 5.4
88
+ * fixed usage of html tags in event time, location and details
89
+ * fixed link to events in event-list widget
90
+
91
  = 0.7.11 (2017-10-08) =
92
  * more security improvments due to better sanitation of user inputs
93
  * prepare additional strings for translations