Skip to content

Commit

Permalink
release 2.4.34
Browse files Browse the repository at this point in the history
  • Loading branch information
Franky Van Liedekerke committed Mar 10, 2024
1 parent 9d7c275 commit 16328c1
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 5,748 deletions.
6 changes: 6 additions & 0 deletions class-expressivedate.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ public function minusDays( $amount ): ExpressiveDate {
* @return ExpressiveDate
*/
public function modifyDays( $amount, $invert = false ) {
$amount = floatval($amount);
if ( $amount < 0 ) {
$amount = abs( $amount );
$invert = true;
Expand Down Expand Up @@ -392,6 +393,7 @@ public function minusMonths( $amount ) {
* @return ExpressiveDate
*/
public function modifyMonths( $amount, $invert = false ) {
$amount = floatval($amount);
if ( $amount < 0 ) {
$amount = abs( $amount );
$invert = true;
Expand Down Expand Up @@ -460,6 +462,7 @@ public function minusYears( $amount ) {
* @return ExpressiveDate
*/
public function modifyYears( $amount, $invert = false ) {
$amount = floatval($amount);
if ( $amount < 0 ) {
$amount = abs( $amount );
$invert = true;
Expand Down Expand Up @@ -528,6 +531,7 @@ public function minusHours( $amount ) {
* @return ExpressiveDate
*/
public function modifyHours( $amount, $invert = false ) {
$amount = floatval($amount);
if ( $amount < 0 ) {
$amount = abs( $amount );
$invert = true;
Expand Down Expand Up @@ -596,6 +600,7 @@ public function minusMinutes( $amount ) {
* @return ExpressiveDate
*/
public function modifyMinutes( $amount, $invert = false ) {
$amount = floatval($amount);
if ( $amount < 0 ) {
$amount = abs( $amount );
$invert = true;
Expand Down Expand Up @@ -728,6 +733,7 @@ public function minusWeeks( $amount ) {
* @return ExpressiveDate
*/
public function modifyWeeks( $amount, $invert = false ) {
$amount = floatval($amount);
if ( $amount < 0 ) {
$amount = abs( $amount );
$invert = true;
Expand Down
19 changes: 8 additions & 11 deletions eme-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3852,17 +3852,14 @@ function eme_migrate_event_rsvpstartend_options() {
global $wpdb;
$table_name = EME_DB_PREFIX . EME_EVENTS_TBNAME;

$rsvp_options = [ 'rsvp_number_days', 'rsvp_number_hours' ];
foreach ( $rsvp_options as $rsvp_option ) {
$sql = "SELECT event_id, rsvp_number_days, rsvp_number_hours from $table_name WHERE rsvp_number_days>0 OR rsvp_number_hours>0";
$res = $wpdb->get_results( $sql, ARRAY_A );
if ( ! empty( $res ) ) {
foreach ( $res as $row ) {
$event = eme_get_event( $row['event_id'] );
$event['event_properties'][ 'rsvp_number_days' ] = $row['rsvp_number_days'];
$event['event_properties'][ 'rsvp_number_hours' ] = $row['rsvp_number_hours'];
eme_db_update_event( $event, $row['event_id'] );
}
$sql = "SELECT event_id, rsvp_number_days, rsvp_number_hours from $table_name WHERE rsvp_number_days>0 OR rsvp_number_hours>0";
$res = $wpdb->get_results( $sql, ARRAY_A );
if ( ! empty( $res ) ) {
foreach ( $res as $row ) {
$event = eme_get_event( $row['event_id'] );
$event['event_properties'][ 'rsvp_start_number_days' ] = $row['rsvp_number_days'];
$event['event_properties'][ 'rsvp_start_number_hours' ] = $row['rsvp_number_hours'];
eme_db_update_event( $event, $row['event_id'] );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions events-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/*
Plugin Name: Events Made Easy
Version: 2.4.33
Version: 2.4.34
Plugin URI: https://www.e-dynamics.be/wordpress
Update URI: https://github.com/liedekef/events-made-easy/
Description: Manage and display events and memberships. Also includes recurring events; locations; widgets; maps; RSVP; ICAL and RSS feeds; Paypal, 2Checkout and others.
Expand Down Expand Up @@ -69,7 +69,7 @@
require_once 'class-expressivedate.php';

// Setting constants
define( 'EME_VERSION', '2.4.33' );
define( 'EME_VERSION', '2.4.34' );
define( 'DEFAULT_CAP_ADD_EVENT', 'edit_posts' );
define( 'DEFAULT_CAP_AUTHOR_EVENT', 'publish_posts' );
define( 'DEFAULT_CAP_PUBLISH_EVENT', 'publish_posts' );
Expand Down

0 comments on commit 16328c1

Please sign in to comment.