Plugin Directory

Changeset 3310519


Ignore:
Timestamp:
06/12/2025 12:42:05 PM (7 months ago)
Author:
capuderg
Message:

Sugar Calendar Lite v3.7.3

Location:
sugar-calendar-lite
Files:
1291 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • sugar-calendar-lite/trunk/assets/languages/sugar-calendar-lite.pot

    r3307166 r3310519  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Sugar Calendar (Lite) 3.7.2\n"
     3"Project-Id-Version: Sugar Calendar (Lite) 3.7.3\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sugar-calendar-lite\n"
    55"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    88"Content-Type: text/plain; charset=UTF-8\n"
    99"Content-Transfer-Encoding: 8bit\n"
    10 "POT-Creation-Date: 2025-06-05T15:02:56+00:00\n"
     10"POT-Creation-Date: 2025-06-12T11:58:52+00:00\n"
    1111"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    12 "X-Generator: WP-CLI 2.8.1\n"
     12"X-Generator: WP-CLI 2.7.1\n"
    1313"X-Domain: sugar-calendar-lite\n"
    1414
     
    22742274
    22752275#: includes/common/time-zones.php:207
    2276 #: includes/common/time.php:198
    2277 #: includes/common/time.php:232
     2276#: includes/common/time.php:218
     2277#: includes/common/time.php:252
    22782278msgid "%s hour"
    22792279msgid_plural "%s hours"
     
    22942294msgstr ""
    22952295
    2296 #: includes/common/time.php:186
     2296#: includes/common/time.php:206
    22972297msgid "%s year"
    22982298msgid_plural "%s years"
     
    23002300msgstr[1] ""
    23012301
    2302 #: includes/common/time.php:189
    2303 #: includes/common/time.php:223
     2302#: includes/common/time.php:209
     2303#: includes/common/time.php:243
    23042304msgid "%s month"
    23052305msgid_plural "%s months"
     
    23072307msgstr[1] ""
    23082308
    2309 #: includes/common/time.php:192
    2310 #: includes/common/time.php:226
     2309#: includes/common/time.php:212
     2310#: includes/common/time.php:246
    23112311msgid "%s week"
    23122312msgid_plural "%s weeks"
     
    23142314msgstr[1] ""
    23152315
    2316 #: includes/common/time.php:195
    2317 #: includes/common/time.php:229
     2316#: includes/common/time.php:215
     2317#: includes/common/time.php:249
    23182318msgid "%s day"
    23192319msgid_plural "%s days"
     
    23212321msgstr[1] ""
    23222322
    2323 #: includes/common/time.php:201
    2324 #: includes/common/time.php:235
     2323#: includes/common/time.php:221
     2324#: includes/common/time.php:255
    23252325msgid "%s minute"
    23262326msgid_plural "%s minutes"
     
    23282328msgstr[1] ""
    23292329
    2330 #: includes/common/time.php:204
    2331 #: includes/common/time.php:238
     2330#: includes/common/time.php:224
     2331#: includes/common/time.php:258
    23322332msgid "%s second"
    23332333msgid_plural "%s seconds"
     
    23352335msgstr[1] ""
    23362336
    2337 #: includes/common/time.php:219
     2337#: includes/common/time.php:239
    23382338msgctxt "Separator in time since"
    23392339msgid ","
    23402340msgstr ""
    23412341
    2342 #: includes/common/time.php:274
     2342#: includes/common/time.php:294
    23432343msgid "Daily"
    23442344msgstr ""
    23452345
    2346 #: includes/common/time.php:275
     2346#: includes/common/time.php:295
    23472347msgid "Weekly"
    23482348msgstr ""
    23492349
    2350 #: includes/common/time.php:276
     2350#: includes/common/time.php:296
    23512351msgid "Monthly"
    23522352msgstr ""
    23532353
    2354 #: includes/common/time.php:277
     2354#: includes/common/time.php:297
    23552355msgid "Yearly"
    23562356msgstr ""
    23572357
    2358 #: includes/common/time.php:552
     2358#: includes/common/time.php:572
    23592359msgid "g:i a"
    23602360msgstr ""
     
    49474947msgstr ""
    49484948
    4949 #: src/Helpers.php:1118
     4949#: src/Helpers.php:1120
    49504950msgid "There are no events to display."
    49514951msgstr ""
    49524952
    4953 #: src/Helpers.php:1122
     4953#: src/Helpers.php:1124
    49544954msgid "There are no upcoming events to display."
    49554955msgstr ""
    49564956
    4957 #: src/Helpers.php:1126
     4957#: src/Helpers.php:1128
    49584958msgid "There are no past events to display."
    49594959msgstr ""
  • sugar-calendar-lite/trunk/includes/classes/database/events/TableEvents.php

    r3307166 r3310519  
    8484            KEY `object` (object_id,object_type,object_subtype),
    8585            KEY `event_status` (status),
    86             KEY `event_times` (start,end,start_tz,end_tz),
     86            KEY `event_times` (start,end,start_tz(50),end_tz(50)),
    8787            KEY `event_recur` (recurrence),
    8888            KEY `event_recur_times` (recurrence_end,recurrence_end_tz),
  • sugar-calendar-lite/trunk/includes/common/time.php

    r3305766 r3310519  
    2929 *
    3030 * @since 2.0.3
     31 * @since 3.7.3 Set offset to int.
    3132 *
    3233 * @param string $type     Type of time to retrieve. Accepts 'mysql',
     
    4041    global $timestart;
    4142
    42     // Should never be empty, but just in case...
    43     if ( empty( $timestart ) ) {
    44         $timestart = microtime( true );
    45     }
    46 
    47     // Get the offset if not UTC
    48     if ( 'UTC' !== $timezone ) {
    49         $offset = sugar_calendar_get_timezone_offset( [
    50             'time'     => (int) $timestart,
    51             'timezone' => $timezone,
    52             'format'   => 'seconds',
    53         ] );
    54     }
    55 
    56     // What type of
     43    // Get timestart, avoid overriding the global.
     44    $current_timestart = (int) ( empty( $timestart ) ? microtime( true ) : $timestart );
     45
     46    // Safeguard for 32-bit systems.
     47    $current_timestart = $current_timestart > PHP_INT_MAX
     48        ? PHP_INT_MAX
     49        : $current_timestart;
     50
     51    // Ensure that timezone is set.
     52    $timezone = empty( $timezone ) ? 'UTC' : $timezone;
     53
     54    // Get the offset if not UTC.
     55    $is_utc = $timezone === 'UTC';
     56    $offset = 0;
     57
     58    if (
     59        ! $is_utc
     60        &&
     61        $current_timestart !== PHP_INT_MAX
     62    ) {
     63
     64        $offset = (int) sugar_calendar_get_timezone_offset(
     65            [
     66                'time'     => $current_timestart,
     67                'timezone' => $timezone,
     68                'format'   => 'seconds',
     69            ]
     70        );
     71    }
     72
     73    // What type of.
    5774    switch ( $type ) {
    58 
    59         // 'Y-m-d H:i:s'
    60         case 'mysql' :
    61         case 'Y-m-d H:i:s' :
    62             $retval = ( 'UTC' === $timezone )
     75        // 'Y-m-d H:i:s'.
     76        case 'mysql':
     77        case 'Y-m-d H:i:s':
     78            $retval = $is_utc
    6379                ? gmdate( 'Y-m-d H:i:s' )
    64                 : gmdate( 'Y-m-d H:i:s', ( $timestart + $offset ) );
    65             break;
    66 
    67         // Unix timestamp
    68         case 'timestamp' :
    69         case '' :
    70             $retval = ( 'UTC' === $timezone )
    71                 ? $timestart
    72                 : $timestart + $offset;
    73             break;
    74 
    75         // Mixed string
    76         default :
    77             $retval = ( 'UTC' === $timezone )
     80                : gmdate( 'Y-m-d H:i:s', ( $current_timestart + $offset ) );
     81            break;
     82
     83        // Unix timestamp.
     84        case 'timestamp':
     85        case '':
     86            $retval = $is_utc
     87                ? $current_timestart
     88                : $current_timestart + $offset;
     89            break;
     90
     91        // Mixed string.
     92        default:
     93            $retval = $is_utc
    7894                ? gmdate( $type )
    79                 : gmdate( $type, ( $timestart + $offset ) );
     95                : gmdate( $type, ( $current_timestart + $offset ) );
    8096            break;
    8197    }
     
    8399    if ( is_numeric( $retval ) ) {
    84100        $retval = intval( $retval );
    85     }
    86 
    87     // Return
     101
     102        // Safeguard for 32-bit systems.
     103        if ( $retval > PHP_INT_MAX ) {
     104            $retval = PHP_INT_MAX;
     105        }
     106    }
     107
    88108    return $retval;
    89109}
  • sugar-calendar-lite/trunk/readme.txt

    r3308536 r3310519  
    1010Requires at least: 5.9
    1111Tested up to:      6.8
    12 Stable tag:        3.7.2
     12Stable tag:        3.7.3
    1313
    1414Easily manage events and sell tickets on your WordPress site. Sugar Calendar is easy-to-use, reliable, and exceptionally powerful. See for yourself.
     
    257257
    258258== Changelog ==
     259= 3.7.3 - 2025-06-12 =
     260- Fixed: Fatal error on TEC Tags migration
     261- Fixed: Upcoming events timezone issue
     262
    259263= 3.7.2 - 2025-06-05 =
    260264- Fixed: Legacy event list shortcode not showing events.
  • sugar-calendar-lite/trunk/src/Admin/Tools/Importers/TheEventCalendar.php

    r3305766 r3310519  
    31623162        $successful_migrations = 0;
    31633163
    3164         /**
    3165          * Debugging with Ray.
    3166          *
    3167          * @TODO: Remove before commit.
    3168          */
    3169         ray(
    3170             [
    3171                 'name' => __FUNCTION__,
    3172                 'tec_tags' => $tec_tags,
    3173             ]
    3174         );
    3175 
    31763164        foreach ( $tec_tags as $tec_tag ) {
    31773165            if ( $this->migrate_tag( $tec_tag ) ) {
  • sugar-calendar-lite/trunk/src/Helpers.php

    r3307166 r3310519  
    766766        }
    767767
    768         $now   = sugar_calendar_get_request_time( 'mysql' );
     768        $tz  = sugar_calendar_get_timezone_type() === 'off' ? 'UTC' : sugar_calendar_get_timezone();
     769        $now = sugar_calendar_get_request_time( 'mysql', $tz );
     770
    769771        $today = gmdate( 'Y-m-d 00:00:00', strtotime( $now ) );
    770772
  • sugar-calendar-lite/trunk/sugar-calendar-lite.php

    r3307166 r3310519  
    1212 * Requires PHP:      7.4
    1313 * Requires at least: 5.9
    14  * Version:           3.7.2
     14 * Version:           3.7.3
    1515 */
    1616
     
    2626     * @since 3.0.0
    2727     */
    28     define( 'SC_PLUGIN_VERSION', '3.7.2' );
     28    define( 'SC_PLUGIN_VERSION', '3.7.3' );
    2929}
    3030
  • sugar-calendar-lite/trunk/vendor/autoload.php

    r3305766 r3310519  
    1515        }
    1616    }
    17     throw new RuntimeException($err);
     17    trigger_error(
     18        $err,
     19        E_USER_ERROR
     20    );
    1821}
    1922
    2023require_once __DIR__ . '/composer/autoload_real.php';
    2124
    22 return ComposerAutoloaderInitc1aba8a910da7e63abaf80dd69b0acb9::getLoader();
     25return ComposerAutoloaderInit00ff784d6deedff01c2e4a9fd4cb825e::getLoader();
  • sugar-calendar-lite/trunk/vendor/composer/InstalledVersions.php

    r3305766 r3310519  
    2828{
    2929    /**
    30      * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
    31      * @internal
    32      */
    33     private static $selfDir = null;
    34 
    35     /**
    3630     * @var mixed[]|null
    3731     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3832     */
    3933    private static $installed;
    40 
    41     /**
    42      * @var bool
    43      */
    44     private static $installedIsLocalDir;
    4534
    4635    /**
     
    321310        self::$installed = $data;
    322311        self::$installedByVendor = array();
    323 
    324         // when using reload, we disable the duplicate protection to ensure that self::$installed data is
    325         // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
    326         // so we have to assume it does not, and that may result in duplicate data being returned when listing
    327         // all installed packages for example
    328         self::$installedIsLocalDir = false;
    329     }
    330 
    331     /**
    332      * @return string
    333      */
    334     private static function getSelfDir()
    335     {
    336         if (self::$selfDir === null) {
    337             self::$selfDir = strtr(__DIR__, '\\', '/');
    338         }
    339 
    340         return self::$selfDir;
    341312    }
    342313
     
    352323
    353324        $installed = array();
    354         $copiedLocalDir = false;
    355325
    356326        if (self::$canGetVendors) {
    357             $selfDir = self::getSelfDir();
    358327            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
    359                 $vendorDir = strtr($vendorDir, '\\', '/');
    360328                if (isset(self::$installedByVendor[$vendorDir])) {
    361329                    $installed[] = self::$installedByVendor[$vendorDir];
     
    363331                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    364332                    $required = require $vendorDir.'/composer/installed.php';
    365                     self::$installedByVendor[$vendorDir] = $required;
    366                     $installed[] = $required;
    367                     if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
    368                         self::$installed = $required;
    369                         self::$installedIsLocalDir = true;
     333                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
     334                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
     335                        self::$installed = $installed[count($installed) - 1];
    370336                    }
    371                 }
    372                 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
    373                     $copiedLocalDir = true;
    374337                }
    375338            }
     
    388351        }
    389352
    390         if (self::$installed !== array() && !$copiedLocalDir) {
     353        if (self::$installed !== array()) {
    391354            $installed[] = self::$installed;
    392355        }
  • sugar-calendar-lite/trunk/vendor/composer/autoload_real.php

    r3255409 r3310519  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitc1aba8a910da7e63abaf80dd69b0acb9
     5class ComposerAutoloaderInit00ff784d6deedff01c2e4a9fd4cb825e
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitc1aba8a910da7e63abaf80dd69b0acb9', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit00ff784d6deedff01c2e4a9fd4cb825e', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitc1aba8a910da7e63abaf80dd69b0acb9', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit00ff784d6deedff01c2e4a9fd4cb825e', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInitc1aba8a910da7e63abaf80dd69b0acb9::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit00ff784d6deedff01c2e4a9fd4cb825e::getInitializer($loader));
    3333
    3434        $loader->setClassMapAuthoritative(true);
  • sugar-calendar-lite/trunk/vendor/composer/autoload_static.php

    r3306586 r3310519  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitc1aba8a910da7e63abaf80dd69b0acb9
     7class ComposerStaticInit00ff784d6deedff01c2e4a9fd4cb825e
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    603603    {
    604604        return \Closure::bind(function () use ($loader) {
    605             $loader->prefixLengthsPsr4 = ComposerStaticInitc1aba8a910da7e63abaf80dd69b0acb9::$prefixLengthsPsr4;
    606             $loader->prefixDirsPsr4 = ComposerStaticInitc1aba8a910da7e63abaf80dd69b0acb9::$prefixDirsPsr4;
    607             $loader->prefixesPsr0 = ComposerStaticInitc1aba8a910da7e63abaf80dd69b0acb9::$prefixesPsr0;
    608             $loader->classMap = ComposerStaticInitc1aba8a910da7e63abaf80dd69b0acb9::$classMap;
     605            $loader->prefixLengthsPsr4 = ComposerStaticInit00ff784d6deedff01c2e4a9fd4cb825e::$prefixLengthsPsr4;
     606            $loader->prefixDirsPsr4 = ComposerStaticInit00ff784d6deedff01c2e4a9fd4cb825e::$prefixDirsPsr4;
     607            $loader->prefixesPsr0 = ComposerStaticInit00ff784d6deedff01c2e4a9fd4cb825e::$prefixesPsr0;
     608            $loader->classMap = ComposerStaticInit00ff784d6deedff01c2e4a9fd4cb825e::$classMap;
    609609
    610610        }, null, ClassLoader::class);
  • sugar-calendar-lite/trunk/vendor/composer/installed.php

    r3307166 r3310519  
    44        'pretty_version' => 'dev-develop',
    55        'version' => 'dev-develop',
    6         'reference' => 'c98d21f6450eecf0e28d7f5f5d967ae7e81312e0',
     6        'reference' => 'ce680586eb813a3952b02b90a8b0ef3ca886b944',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-develop',
    1515            'version' => 'dev-develop',
    16             'reference' => 'c98d21f6450eecf0e28d7f5f5d967ae7e81312e0',
     16            'reference' => 'ce680586eb813a3952b02b90a8b0ef3ca886b944',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.