Plugin Directory

Changeset 3033073


Ignore:
Timestamp:
02/08/2024 09:57:25 AM (2 years ago)
Author:
eventilla
Message:

Fixed count events issue in update check.

Location:
eventilla-events/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • eventilla-events/trunk/README.txt

    r3023496 r3033073  
    33Donate link: https://www.eventilla.com
    44Tags: events, event
    5 Requires at least: 5.8
    6 Tested up to: 6.4.2
     5Requires at least: 6.0
     6Tested up to: 6.4.3
    77Requires PHP: 7.4
    8 Stable tag: 1.7.6
     8Stable tag: 1.7.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4646
    4747== Changelog ==
     48= 1.7.7 =
     49Fixed count events issue in update check.
    4850= 1.7.6 =
    49 Fixed event fetching process getting stuck if Eventilla API connection was not available
     51Fixed event fetching process getting stuck if Eventilla API connection was not available.
    5052= 1.7.5 =
    5153Added short description parameter to API filtering options.
  • eventilla-events/trunk/eventilla-wp.php

    r3023496 r3033073  
    1616 * Plugin URI:        https://www.eventilla.com/
    1717 * Description:       Eventilla Events brings your event information from eventilla.com to WordPress as custom posts.
    18  * Version:           1.7.6
     18 * Version:           1.7.7
    1919 * Author:            Eventilla
    2020 * Author URI:        http://www.eventilla.com
  • eventilla-events/trunk/includes/class-eventilla-wp-api-request-v2.php

    r3023496 r3033073  
    858858        $full_event_json = $this->get( 'events', $event_id );
    859859        if (!$full_event_json) {
    860         throw new RuntimeException("Event loading error");
    861     }
    862 
    863     $full_event              = json_decode( $full_event_json );
     860            throw new RuntimeException("Event loading error");
     861        }
     862
     863        $full_event              = json_decode( $full_event_json );
    864864        if ( ! empty( $full_event->event ) ) {
    865865            $full_event = $full_event->event;
     
    16861686            //var_dump($eventilla_json_ob);
    16871687            //die();
    1688             update_option('eventilla_opt_queue', count($eventilla_json_ob), false);
    1689             update_option('eventilla_opt_eventsdata', (array) $eventilla_json_ob, false);
    1690             echo count($eventilla_json_ob) . " events added to process queue.\n";
    1691             $this->process_event_batch();
     1688            $count_of_events = is_countable($eventilla_json_ob) ? count($eventilla_json_ob) : 0;
     1689
     1690            if ($count_of_events) {
     1691                update_option('eventilla_opt_queue',  $count_of_events, false);
     1692                update_option('eventilla_opt_eventsdata', (array) $eventilla_json_ob, false);
     1693                echo $count_of_events . " events added to process queue.\n";
     1694                $this->process_event_batch();
     1695            } else {
     1696                echo "There is nothing to process.\n";
     1697            }
     1698
    16921699            update_option('eventilla_opt_last_request_time', $time_of_batch_start);
    16931700        } else {
     
    17721779                    error_log('Caught Runtime Exception: ' . $e->getMessage());
    17731780                    break;
    1774           } catch (Exception $e) {
     1781                  } catch (Exception $e) {
    17751782                    // code to handle any other exception
    17761783                    $message = $e->getMessage();
Note: See TracChangeset for help on using the changeset viewer.