Version Description
- Fixed permission issue
- Fixed category not saving
- Fixed location saving issue
Download this release
Release Info
Developer | netweblogic |
Plugin | Events Manager |
Version | 3.0.92 |
Comparing to | |
See all releases |
Code changes from version 3.0.91 to 3.0.92
- admin/em-categories.php +7 -5
- admin/em-events.php +3 -1
- admin/em-locations-search.php +1 -1
- admin/em-options.php +1 -1
- classes/em-calendar.php +3 -0
- classes/em-categories.php +1 -0
- classes/em-events.php +2 -1
- classes/em-location.php +1 -1
- classes/em-locations.php +18 -0
- events-manager.php +1 -1
- readme.txt +10 -2
admin/em-categories.php
CHANGED
@@ -14,7 +14,7 @@ function em_admin_categories_page() {
|
|
14 |
$EM_Category->get_post();
|
15 |
if ( $EM_Category->validate() ) {
|
16 |
$EM_Category->save(); //FIXME better handling of db write fails when saving category
|
17 |
-
$
|
18 |
} else {
|
19 |
?>
|
20 |
<div id='message' class='error '>
|
@@ -23,16 +23,18 @@ function em_admin_categories_page() {
|
|
23 |
</p>
|
24 |
</div>
|
25 |
<?php
|
26 |
-
|
27 |
}
|
|
|
|
|
28 |
} elseif( $_REQUEST['action'] == "delete" ){
|
29 |
//delelte category
|
30 |
EM_Categories::delete($_REQUEST['categories']);
|
31 |
//FIXME no result verification when deleting various categories
|
32 |
$message = __('Categories Deleted', "dbem" );
|
|
|
33 |
}
|
34 |
}
|
35 |
-
em_categories_table_layout($message);
|
36 |
}
|
37 |
|
38 |
function em_categories_table_layout($message = "") {
|
@@ -136,7 +138,7 @@ function em_categories_edit_layout($message = "") {
|
|
136 |
?>
|
137 |
<div class="wrap"><h2><?php _e('Unauthorized Access','dbem'); ?></h2><p><?php _e('You do not have the rights to manage this event.','dbem'); ?></p></div>
|
138 |
<?php
|
139 |
-
return
|
140 |
}
|
141 |
?>
|
142 |
<div class='wrap'>
|
@@ -156,7 +158,7 @@ function em_categories_edit_layout($message = "") {
|
|
156 |
|
157 |
<form name='editcat' id='editcat' method='post' action='admin.php?page=events-manager-categories' class='validate'>
|
158 |
<input type='hidden' name='action' value='save' />
|
159 |
-
<input type='hidden' name='
|
160 |
|
161 |
<table class='form-table'>
|
162 |
<tr class='form-field form-required'>
|
14 |
$EM_Category->get_post();
|
15 |
if ( $EM_Category->validate() ) {
|
16 |
$EM_Category->save(); //FIXME better handling of db write fails when saving category
|
17 |
+
em_categories_table_layout($success_message);
|
18 |
} else {
|
19 |
?>
|
20 |
<div id='message' class='error '>
|
23 |
</p>
|
24 |
</div>
|
25 |
<?php
|
26 |
+
em_categories_edit_layout();
|
27 |
}
|
28 |
+
} elseif( $_REQUEST['action'] == "edit" ){
|
29 |
+
em_categories_edit_layout();
|
30 |
} elseif( $_REQUEST['action'] == "delete" ){
|
31 |
//delelte category
|
32 |
EM_Categories::delete($_REQUEST['categories']);
|
33 |
//FIXME no result verification when deleting various categories
|
34 |
$message = __('Categories Deleted', "dbem" );
|
35 |
+
em_categories_table_layout($message);
|
36 |
}
|
37 |
}
|
|
|
38 |
}
|
39 |
|
40 |
function em_categories_table_layout($message = "") {
|
138 |
?>
|
139 |
<div class="wrap"><h2><?php _e('Unauthorized Access','dbem'); ?></h2><p><?php _e('You do not have the rights to manage this event.','dbem'); ?></p></div>
|
140 |
<?php
|
141 |
+
return;
|
142 |
}
|
143 |
?>
|
144 |
<div class='wrap'>
|
158 |
|
159 |
<form name='editcat' id='editcat' method='post' action='admin.php?page=events-manager-categories' class='validate'>
|
160 |
<input type='hidden' name='action' value='save' />
|
161 |
+
<input type='hidden' name='category_id' value='<?php echo $EM_Category->id ?>'/>
|
162 |
|
163 |
<table class='form-table'>
|
164 |
<tr class='form-field form-required'>
|
admin/em-events.php
CHANGED
@@ -39,9 +39,11 @@ function em_admin_events_page() {
|
|
39 |
$scope = "future";
|
40 |
}
|
41 |
$args = array('scope'=>$scope, 'limit'=>0, 'order'=>$order );
|
|
|
42 |
if( !get_option('dbem_permissions_events') && !em_verify_admin() ){
|
43 |
$args['owner'] = get_current_user_id();
|
44 |
-
}
|
|
|
45 |
$events = EM_Events::get( $args );
|
46 |
$events_count = count ( $events );
|
47 |
|
39 |
$scope = "future";
|
40 |
}
|
41 |
$args = array('scope'=>$scope, 'limit'=>0, 'order'=>$order );
|
42 |
+
|
43 |
if( !get_option('dbem_permissions_events') && !em_verify_admin() ){
|
44 |
$args['owner'] = get_current_user_id();
|
45 |
+
}
|
46 |
+
|
47 |
$events = EM_Events::get( $args );
|
48 |
$events_count = count ( $events );
|
49 |
|
admin/em-locations-search.php
CHANGED
@@ -7,7 +7,7 @@ require_once('../../../../wp-load.php');
|
|
7 |
global $wpdb;
|
8 |
|
9 |
$locations_table = $wpdb->prefix . EM_LOCATIONS_TABLE;
|
10 |
-
$location_cond = ( get_option('
|
11 |
|
12 |
$term = (isset($_GET['term'])) ? '%'.$_GET['term'].'%' : '%'.$_GET['q'].'%';
|
13 |
$sql = $wpdb->prepare("
|
7 |
global $wpdb;
|
8 |
|
9 |
$locations_table = $wpdb->prefix . EM_LOCATIONS_TABLE;
|
10 |
+
$location_cond = ( get_option('dbem_permissions_locations') < 1 && !em_verify_admin() ) ? "AND location_owner=".get_current_user_id() : '';
|
11 |
|
12 |
$term = (isset($_GET['term'])) ? '%'.$_GET['term'].'%' : '%'.$_GET['q'].'%';
|
13 |
$sql = $wpdb->prepare("
|
admin/em-options.php
CHANGED
@@ -390,7 +390,7 @@ function em_admin_options_page() {
|
|
390 |
</div> <!-- .postbox -->
|
391 |
|
392 |
<div class="postbox " >
|
393 |
-
<div class="handlediv" title="<?php __('Click to toggle'); ?>"><br /></div><h3 class='hndle'><span><?php _e ( 'Management Permission Options', 'dbem' ); ?> </span></h3>
|
394 |
<div class="inside">
|
395 |
<table class="form-table">
|
396 |
<tr><td colspan="2">
|
390 |
</div> <!-- .postbox -->
|
391 |
|
392 |
<div class="postbox " >
|
393 |
+
<div class="handlediv" title="<?php __('Click to toggle'); ?>"><br /></div><h3 class='hndle'><span><?php _e ( 'Management Permission Options', 'dbem' ); ?> (Beta)</span></h3>
|
394 |
<div class="inside">
|
395 |
<table class="form-table">
|
396 |
<tr><td colspan="2">
|
classes/em-calendar.php
CHANGED
@@ -341,6 +341,9 @@ class EM_Calendar extends EM_Object {
|
|
341 |
}
|
342 |
$qs_array = array();
|
343 |
foreach($args as $key => $value){
|
|
|
|
|
|
|
344 |
$qs_array[] = "$key=".urlencode($value);
|
345 |
}
|
346 |
return ($html_entities) ? implode('&', $qs_array) : implode('&', $qs_array);
|
341 |
}
|
342 |
$qs_array = array();
|
343 |
foreach($args as $key => $value){
|
344 |
+
if(is_array($value)){
|
345 |
+
$value = implode(',',$value);
|
346 |
+
}
|
347 |
$qs_array[] = "$key=".urlencode($value);
|
348 |
}
|
349 |
return ($html_entities) ? implode('&', $qs_array) : implode('&', $qs_array);
|
classes/em-categories.php
CHANGED
@@ -148,6 +148,7 @@ class EM_Categories extends EM_Object {
|
|
148 |
$defaults['owner'] = false;
|
149 |
break;
|
150 |
}
|
|
|
151 |
return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
152 |
}
|
153 |
|
148 |
$defaults['owner'] = false;
|
149 |
break;
|
150 |
}
|
151 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
152 |
return apply_filters('em_categories_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
153 |
}
|
154 |
|
classes/em-events.php
CHANGED
@@ -237,7 +237,7 @@ class EM_Events extends EM_Object {
|
|
237 |
'rsvp' => false //if set to true, only events with bookings enabled are returned
|
238 |
);
|
239 |
//figure out default owning permissions
|
240 |
-
switch( get_option('
|
241 |
case 0:
|
242 |
$defaults['owner'] = get_current_user_id();
|
243 |
break;
|
@@ -245,6 +245,7 @@ class EM_Events extends EM_Object {
|
|
245 |
$defaults['owner'] = false;
|
246 |
break;
|
247 |
}
|
|
|
248 |
return apply_filters('em_events_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
249 |
}
|
250 |
}
|
237 |
'rsvp' => false //if set to true, only events with bookings enabled are returned
|
238 |
);
|
239 |
//figure out default owning permissions
|
240 |
+
switch( get_option('dbem_permissions_events') ){
|
241 |
case 0:
|
242 |
$defaults['owner'] = get_current_user_id();
|
243 |
break;
|
245 |
$defaults['owner'] = false;
|
246 |
break;
|
247 |
}
|
248 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
249 |
return apply_filters('em_events_get_default_search', parent::get_default_search($defaults,$array), $array, $defaults);
|
250 |
}
|
251 |
}
|
classes/em-location.php
CHANGED
@@ -83,11 +83,11 @@ class EM_Location extends EM_Object {
|
|
83 |
unset($data['location_id']);
|
84 |
unset($data['location_image_url']);
|
85 |
if($this->id != ''){
|
|
|
86 |
$wpdb->update($table, $data, $where, $this->get_types($data));
|
87 |
}else{
|
88 |
$this->owner = $current_user->ID; //Record creator of event
|
89 |
$data['location_owner'] = $this->owner;
|
90 |
-
$where = array( 'location_id' => $this->id );
|
91 |
$wpdb->insert($table, $data, $this->get_types($data));
|
92 |
$this->id = $wpdb->insert_id;
|
93 |
}
|
83 |
unset($data['location_id']);
|
84 |
unset($data['location_image_url']);
|
85 |
if($this->id != ''){
|
86 |
+
$where = array( 'location_id' => $this->id );
|
87 |
$wpdb->update($table, $data, $where, $this->get_types($data));
|
88 |
}else{
|
89 |
$this->owner = $current_user->ID; //Record creator of event
|
90 |
$data['location_owner'] = $this->owner;
|
|
|
91 |
$wpdb->insert($table, $data, $this->get_types($data));
|
92 |
$this->id = $wpdb->insert_id;
|
93 |
}
|
classes/em-locations.php
CHANGED
@@ -187,6 +187,24 @@ class EM_Locations extends EM_Object {
|
|
187 |
);
|
188 |
$array['eventful'] = ( !empty($array['eventful']) && $array['eventful'] == true );
|
189 |
$array['eventless'] = ( !empty($array['eventless']) && $array['eventless'] == true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
return apply_filters('em_locations_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
|
191 |
}
|
192 |
//TODO for all the static plural classes like this one, we might benefit from bulk actions like delete/add/save etc.... just a random thought.
|
187 |
);
|
188 |
$array['eventful'] = ( !empty($array['eventful']) && $array['eventful'] == true );
|
189 |
$array['eventless'] = ( !empty($array['eventless']) && $array['eventless'] == true );
|
190 |
+
|
191 |
+
//by default, we only get categories the owner can manage
|
192 |
+
switch( get_option('dbem_permissions_locations') ){
|
193 |
+
case 0:
|
194 |
+
$defaults['owner'] = get_current_user_id();
|
195 |
+
break;
|
196 |
+
case 1:
|
197 |
+
$wp_user_search = new WP_User_Search(null, null, 'administrator');
|
198 |
+
$users = $wp_user_search->get_results();
|
199 |
+
$users[] = get_current_user_id();
|
200 |
+
$users[] = 0;
|
201 |
+
$defaults['owner'] = implode(',', $users);
|
202 |
+
break;
|
203 |
+
case 2:
|
204 |
+
$defaults['owner'] = false;
|
205 |
+
break;
|
206 |
+
}
|
207 |
+
$defaults['owner'] = ( em_verify_admin() ) ? false:$defaults['owner'];
|
208 |
return apply_filters('em_locations_get_default_search', parent::get_default_search($defaults, $array), $array, $defaults);
|
209 |
}
|
210 |
//TODO for all the static plural classes like this one, we might benefit from bulk actions like delete/add/save etc.... just a random thought.
|
events-manager.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Events Manager
|
4 |
-
Version: 3.0.
|
5 |
Plugin URI: http://wp-events-plugin.com
|
6 |
Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
|
7 |
Author: Davide Benini, Marcus Sykes
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Events Manager
|
4 |
+
Version: 3.0.92
|
5 |
Plugin URI: http://wp-events-plugin.com
|
6 |
Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
|
7 |
Author: Davide Benini, Marcus Sykes
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wp-events-plugin.com
|
|
4 |
Tags: events, manager, calendar, gigs, concert, maps, geotagging, rsvp
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 3.0.4
|
7 |
-
Stable tag: 3.0.
|
8 |
|
9 |
Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
|
10 |
|
@@ -28,7 +28,7 @@ Install Events Manager directly from your wordpress site.
|
|
28 |
1. Go to Plugins > Add New in the admin area, and search for events manager
|
29 |
2. Click install
|
30 |
3. Activate it
|
31 |
-
4. Done! You can start adding events straight away, although you may want to visit the [Documentation Pages](http://wp-events-plugin.com/documentation/).
|
32 |
|
33 |
|
34 |
= Installing or Upgrading from 2.x =
|
@@ -106,6 +106,13 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
106 |
3. The Events Manager Options page.
|
107 |
|
108 |
== Change Log ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
= 3.0.91 =
|
110 |
* Documentation finally up to date now!
|
111 |
* widget bug fixed
|
@@ -122,6 +129,7 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
|
|
122 |
* added extra validation so event start date/times can't be after end date/time
|
123 |
* calendar navigation will pass on all arguments for following month (e.g. category, etc)
|
124 |
* small map balloon fix for some rare js conflicts
|
|
|
125 |
|
126 |
= 3.0.9 =
|
127 |
* Fixed small calendar discrepencies
|
4 |
Tags: events, manager, calendar, gigs, concert, maps, geotagging, rsvp
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 3.0.4
|
7 |
+
Stable tag: 3.0.92
|
8 |
|
9 |
Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
|
10 |
|
28 |
1. Go to Plugins > Add New in the admin area, and search for events manager
|
29 |
2. Click install
|
30 |
3. Activate it
|
31 |
+
4. Done! You can start adding events straight away, although you may want to visit the [Documentation Pages](http://wp-events-plugin.com/documentation/) and unleash the full power of Events Manager.
|
32 |
|
33 |
|
34 |
= Installing or Upgrading from 2.x =
|
106 |
3. The Events Manager Options page.
|
107 |
|
108 |
== Change Log ==
|
109 |
+
|
110 |
+
= 3.0.92 =
|
111 |
+
* Fixed permission issue
|
112 |
+
* Fixed category not saving
|
113 |
+
* Fixed location saving issue
|
114 |
+
|
115 |
+
|
116 |
= 3.0.91 =
|
117 |
* Documentation finally up to date now!
|
118 |
* widget bug fixed
|
129 |
* added extra validation so event start date/times can't be after end date/time
|
130 |
* calendar navigation will pass on all arguments for following month (e.g. category, etc)
|
131 |
* small map balloon fix for some rare js conflicts
|
132 |
+
* fixed location gui editor
|
133 |
|
134 |
= 3.0.9 =
|
135 |
* Fixed small calendar discrepencies
|