Plugin Directory

Changeset 3435015


Ignore:
Timestamp:
01/08/2026 10:16:00 AM (6 weeks ago)
Author:
picocodes
Message:

Update to version 1.2.7 from GitHub

Location:
hizzle-downloads
Files:
2 added
8 deleted
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • hizzle-downloads/tags/1.2.7/hizzle-downloads.php

    r3424134 r3435015  
    44 * Plugin URI: https://hizzle.co/download-manager/
    55 * Description: A lightweight download manager plugin.
    6  * Version: 1.2.6
     6 * Version: 1.2.7
    77 * Author: Hizzle
    88 * Author URI: https://hizzle.co
     
    2222
    2323if ( ! defined( 'HIZZLE_DOWNLOADS_VERSION' ) ) {
    24     define( 'HIZZLE_DOWNLOADS_VERSION', '1.2.6' );
     24    define( 'HIZZLE_DOWNLOADS_VERSION', '1.2.7' );
    2525}
    2626
  • hizzle-downloads/tags/1.2.7/readme.txt

    r3424134 r3435015  
    55Tested up to: 6.9
    66Requires PHP: 5.6
    7 Version: 1.2.6
    8 Stable tag: 1.2.6
     7Version: 1.2.7
     8Stable tag: 1.2.7
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    132132== Changelog ==
    133133
     134= 1.2.7 =
     135- Update composer packages.
     136
    134137= 1.2.6 =
    135138- Perfomance improvements.
  • hizzle-downloads/tags/1.2.7/vendor/composer/installed.json

    r3420634 r3435015  
    5454        {
    5555            "name": "hizzle/store",
    56             "version": "0.2.15",
    57             "version_normalized": "0.2.15.0",
     56            "version": "0.2.17",
     57            "version_normalized": "0.2.17.0",
    5858            "source": {
    5959                "type": "git",
    6060                "url": "https://github.com/hizzle-co/datastore.git",
    61                 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631"
     61                "reference": "1b867f0c029c87431ccfb9c76821f868d1d63875"
    6262            },
    6363            "dist": {
    6464                "type": "zip",
    65                 "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/683cf2462478fc54939de9bdcb0e49e8d42ef631",
    66                 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631",
     65                "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/1b867f0c029c87431ccfb9c76821f868d1d63875",
     66                "reference": "1b867f0c029c87431ccfb9c76821f868d1d63875",
    6767                "shasum": ""
    6868            },
     
    7070                "php": ">=5.3.0"
    7171            },
    72             "time": "2025-11-06T07:39:20+00:00",
     72            "time": "2026-01-08T09:55:37+00:00",
    7373            "type": "library",
    7474            "installation-source": "dist",
     
    9999            "support": {
    100100                "issues": "https://github.com/hizzle-co/datastore/issues",
    101                 "source": "https://github.com/hizzle-co/datastore/tree/0.2.15"
     101                "source": "https://github.com/hizzle-co/datastore/tree/0.2.17"
    102102            },
    103103            "install-path": "../hizzle/store"
  • hizzle-downloads/tags/1.2.7/vendor/composer/installed.php

    r3424134 r3435015  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '0450caee14fe401d9beed36f42a0b086d7fd7140',
     6        'reference' => 'dfebdbe0fa191a0a76e5e45e018f0fd6f59ac1dd',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '0450caee14fe401d9beed36f42a0b086d7fd7140',
     16            'reference' => 'dfebdbe0fa191a0a76e5e45e018f0fd6f59ac1dd',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'hizzle/store' => array(
    32             'pretty_version' => '0.2.15',
    33             'version' => '0.2.15.0',
    34             'reference' => '683cf2462478fc54939de9bdcb0e49e8d42ef631',
     32            'pretty_version' => '0.2.17',
     33            'version' => '0.2.17.0',
     34            'reference' => '1b867f0c029c87431ccfb9c76821f868d1d63875',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../hizzle/store',
  • hizzle-downloads/tags/1.2.7/vendor/hizzle/store/src/Collection.php

    r3420634 r3435015  
    626626            'default'           => 25,
    627627            'minimum'           => -1,
    628             'maximum'           => 100,
     628            'maximum'           => 1000,
    629629            'sanitize_callback' => __CLASS__ . '::intval',
    630630            'validate_callback' => 'rest_validate_request_arg',
  • hizzle-downloads/tags/1.2.7/vendor/hizzle/store/src/Query.php

    r3389422 r3435015  
    343343        $offset = get_option( 'gmt_offset', 0 );
    344344
    345         // Ensure offset is a float
    346         $offset = floatval( $offset );
    347 
    348         // Get the absolute value of the offset
    349         $abs_offset = abs( $offset );
    350 
    351         // Calculate hours and minutes
    352         $hours   = floor( $abs_offset );
    353         $minutes = ( $abs_offset - $hours ) * 60;
    354 
    355         // Format the offset string
    356         $offset_string = sprintf(
    357             '%s%02d:%02d',
    358             $offset >= 0 ? '+' : '-',
    359             $hours,
    360             $minutes
    361         );
    362 
    363         return $offset_string;
     345        // Ensure offset is a float in minutes
     346        $offset = floatval( $offset ) * 60;
     347
     348        if ( 0 > $offset ) {
     349            return "DATE_SUB(%s, INTERVAL $offset MINUTE)";
     350        }
     351
     352        if ( 0 < $offset ) {
     353            $offset = abs( $offset );
     354            return "DATE_ADD(%s, INTERVAL $offset MINUTE)";
     355        }
     356
     357        // If zero offset, return UTC
     358        return '%s';
    364359    }
    365360
     
    459454
    460455        // Prepare groupby fields.
    461         $timezone = esc_sql( $this->get_mysql_timezone_offset() );
     456        $timezone_offset = $this->get_mysql_timezone_offset();
    462457        if ( ! empty( $qv['groupby'] ) ) {
    463458            foreach ( wp_parse_list( $qv['groupby'] ) as $index => $field ) {
     
    485480                // Handle casting and timezone conversion
    486481                if ( $cast ) {
     482                    // Append cast_ prefix to avoid confusion
     483                    $field = 'cast_' . $field;
     484
     485                    // Group by date parts with timezone conversion.
     486                    $local_time_table_field = sprintf( $timezone_offset, $table_field );
    487487                    switch ( $cast ) {
    488488                        case 'hour':
    489                             $table_field = "DATE_FORMAT(CONVERT_TZ($table_field, '+00:00', '$timezone'), '%Y-%m-%d %H:00:00')";
     489                            $table_field = "DATE_FORMAT($local_time_table_field, '%Y-%m-%d %H:00:00')";
    490490                            break;
    491491                        case 'day':
    492                             $table_field = "DATE(CONVERT_TZ($table_field, '+00:00', '$timezone'))";
     492                            $table_field = "DATE($local_time_table_field)";
    493493                            break;
    494494                        case 'week':
    495                             $table_field = "DATE(DATE_SUB(CONVERT_TZ($table_field, '+00:00', '$timezone'), INTERVAL WEEKDAY(CONVERT_TZ($table_field, '+00:00', '$timezone')) DAY))";
     495                            // Normalize the date to the Monday of the same week
     496                            // WEEKDAY($local_time_table_field) returns a number from 0 to 6, where Monday is 0 and Sunday is 6.
     497                            // This tells us how many days have passed since Monday for that date.
     498                            // DATE_SUB($local_time_table_field, INTERVAL WEEKDAY($local_time_table_field) DAY) subtracts that many days from the original date.
     499                            // The result is the Monday of the week that $local_time_table_field falls in.
     500                            // DATE(...) then strips off any time component and returns just the date.
     501                            $table_field = "DATE(DATE_SUB($local_time_table_field, INTERVAL WEEKDAY($local_time_table_field) DAY))";
    496502                            break;
    497503                        case 'month':
    498                             $table_field = "DATE_FORMAT(CONVERT_TZ($table_field, '+00:00', '$timezone'), '%Y-%m-01')";
     504                            $table_field = "DATE_FORMAT($local_time_table_field, '%Y-%m-01')";
    499505                            break;
    500506                        case 'year':
    501                             $table_field = "DATE_FORMAT(CONVERT_TZ($table_field, '+00:00', '$timezone'), '%Y-01-01')";
     507                            $table_field = "DATE_FORMAT($local_time_table_field, '%Y-01-01')";
     508                            break;
     509                        case 'day_of_week':
     510                            // WEEKDAY(date) returns an integer from 0 to 6, where:
     511                            // 0 === Monday and 6 === Sunday
     512                            $table_field = "WEEKDAY($local_time_table_field)";
    502513                            break;
    503514                        default:
  • hizzle-downloads/tags/1.2.7/vendor/hizzle/store/src/REST_Controller.php

    r3420634 r3435015  
    615615        $paged    = (int) $query->query_vars['page'];
    616616
    617         $max_pages = $total > 0 && $per_page > 1 ? ceil( $total / $per_page ) : 1;
     617        $max_pages = $total > 0 && $per_page > 0 ? ceil( $total / $per_page ) : 1;
    618618
    619619        $response = rest_ensure_response(
  • hizzle-downloads/tags/1.2.7/vendor/hizzle/store/src/Store.php

    r3245426 r3435015  
    5656        // Prepare the collections.
    5757        foreach ( $this->collections as $key => $collection ) {
    58             if ( ! $collection instanceof Collection ) {
    59                 $collection['name']        = $key;
    60                 $this->collections[ $key ] = new Collection( $this->namespace, $collection );
    61             }
    62         }
     58            if ( ! $collection instanceof Collection ) {
     59                $collection['name']        = $key;
     60                $this->collections[ $key ] = new Collection( $this->namespace, $collection );
     61            }
     62        }
    6363
    6464        // Register the store.
     
    9090                self::$instances[ $namespace ]->collections[ $key ] = $collections[ $key ];
    9191            }
    92         }
     92        }
    9393
    9494        return self::$instances[ $namespace ];
     
    150150
    151151    /**
    152     * Returns the table definitions as an array.
    153     *
    154     * @return string[]
    155     */
    156     public function get_schema() {
     152    * Returns the table definitions as an array.
     153    *
     154    * @return string[]
     155    */
     156    public function get_schema() {
    157157        $schema = array();
    158158
     
    164164        return array_filter( $schema );
    165165    }
    166 
    167166}
  • hizzle-downloads/trunk/hizzle-downloads.php

    r3424134 r3435015  
    44 * Plugin URI: https://hizzle.co/download-manager/
    55 * Description: A lightweight download manager plugin.
    6  * Version: 1.2.6
     6 * Version: 1.2.7
    77 * Author: Hizzle
    88 * Author URI: https://hizzle.co
     
    2222
    2323if ( ! defined( 'HIZZLE_DOWNLOADS_VERSION' ) ) {
    24     define( 'HIZZLE_DOWNLOADS_VERSION', '1.2.6' );
     24    define( 'HIZZLE_DOWNLOADS_VERSION', '1.2.7' );
    2525}
    2626
  • hizzle-downloads/trunk/readme.txt

    r3424134 r3435015  
    55Tested up to: 6.9
    66Requires PHP: 5.6
    7 Version: 1.2.6
    8 Stable tag: 1.2.6
     7Version: 1.2.7
     8Stable tag: 1.2.7
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    132132== Changelog ==
    133133
     134= 1.2.7 =
     135- Update composer packages.
     136
    134137= 1.2.6 =
    135138- Perfomance improvements.
  • hizzle-downloads/trunk/vendor/composer/installed.json

    r3420634 r3435015  
    5454        {
    5555            "name": "hizzle/store",
    56             "version": "0.2.15",
    57             "version_normalized": "0.2.15.0",
     56            "version": "0.2.17",
     57            "version_normalized": "0.2.17.0",
    5858            "source": {
    5959                "type": "git",
    6060                "url": "https://github.com/hizzle-co/datastore.git",
    61                 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631"
     61                "reference": "1b867f0c029c87431ccfb9c76821f868d1d63875"
    6262            },
    6363            "dist": {
    6464                "type": "zip",
    65                 "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/683cf2462478fc54939de9bdcb0e49e8d42ef631",
    66                 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631",
     65                "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/1b867f0c029c87431ccfb9c76821f868d1d63875",
     66                "reference": "1b867f0c029c87431ccfb9c76821f868d1d63875",
    6767                "shasum": ""
    6868            },
     
    7070                "php": ">=5.3.0"
    7171            },
    72             "time": "2025-11-06T07:39:20+00:00",
     72            "time": "2026-01-08T09:55:37+00:00",
    7373            "type": "library",
    7474            "installation-source": "dist",
     
    9999            "support": {
    100100                "issues": "https://github.com/hizzle-co/datastore/issues",
    101                 "source": "https://github.com/hizzle-co/datastore/tree/0.2.15"
     101                "source": "https://github.com/hizzle-co/datastore/tree/0.2.17"
    102102            },
    103103            "install-path": "../hizzle/store"
  • hizzle-downloads/trunk/vendor/composer/installed.php

    r3424134 r3435015  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '0450caee14fe401d9beed36f42a0b086d7fd7140',
     6        'reference' => 'dfebdbe0fa191a0a76e5e45e018f0fd6f59ac1dd',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '0450caee14fe401d9beed36f42a0b086d7fd7140',
     16            'reference' => 'dfebdbe0fa191a0a76e5e45e018f0fd6f59ac1dd',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'hizzle/store' => array(
    32             'pretty_version' => '0.2.15',
    33             'version' => '0.2.15.0',
    34             'reference' => '683cf2462478fc54939de9bdcb0e49e8d42ef631',
     32            'pretty_version' => '0.2.17',
     33            'version' => '0.2.17.0',
     34            'reference' => '1b867f0c029c87431ccfb9c76821f868d1d63875',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../hizzle/store',
  • hizzle-downloads/trunk/vendor/hizzle/store/src/Collection.php

    r3420634 r3435015  
    626626            'default'           => 25,
    627627            'minimum'           => -1,
    628             'maximum'           => 100,
     628            'maximum'           => 1000,
    629629            'sanitize_callback' => __CLASS__ . '::intval',
    630630            'validate_callback' => 'rest_validate_request_arg',
  • hizzle-downloads/trunk/vendor/hizzle/store/src/Query.php

    r3389422 r3435015  
    343343        $offset = get_option( 'gmt_offset', 0 );
    344344
    345         // Ensure offset is a float
    346         $offset = floatval( $offset );
    347 
    348         // Get the absolute value of the offset
    349         $abs_offset = abs( $offset );
    350 
    351         // Calculate hours and minutes
    352         $hours   = floor( $abs_offset );
    353         $minutes = ( $abs_offset - $hours ) * 60;
    354 
    355         // Format the offset string
    356         $offset_string = sprintf(
    357             '%s%02d:%02d',
    358             $offset >= 0 ? '+' : '-',
    359             $hours,
    360             $minutes
    361         );
    362 
    363         return $offset_string;
     345        // Ensure offset is a float in minutes
     346        $offset = floatval( $offset ) * 60;
     347
     348        if ( 0 > $offset ) {
     349            return "DATE_SUB(%s, INTERVAL $offset MINUTE)";
     350        }
     351
     352        if ( 0 < $offset ) {
     353            $offset = abs( $offset );
     354            return "DATE_ADD(%s, INTERVAL $offset MINUTE)";
     355        }
     356
     357        // If zero offset, return UTC
     358        return '%s';
    364359    }
    365360
     
    459454
    460455        // Prepare groupby fields.
    461         $timezone = esc_sql( $this->get_mysql_timezone_offset() );
     456        $timezone_offset = $this->get_mysql_timezone_offset();
    462457        if ( ! empty( $qv['groupby'] ) ) {
    463458            foreach ( wp_parse_list( $qv['groupby'] ) as $index => $field ) {
     
    485480                // Handle casting and timezone conversion
    486481                if ( $cast ) {
     482                    // Append cast_ prefix to avoid confusion
     483                    $field = 'cast_' . $field;
     484
     485                    // Group by date parts with timezone conversion.
     486                    $local_time_table_field = sprintf( $timezone_offset, $table_field );
    487487                    switch ( $cast ) {
    488488                        case 'hour':
    489                             $table_field = "DATE_FORMAT(CONVERT_TZ($table_field, '+00:00', '$timezone'), '%Y-%m-%d %H:00:00')";
     489                            $table_field = "DATE_FORMAT($local_time_table_field, '%Y-%m-%d %H:00:00')";
    490490                            break;
    491491                        case 'day':
    492                             $table_field = "DATE(CONVERT_TZ($table_field, '+00:00', '$timezone'))";
     492                            $table_field = "DATE($local_time_table_field)";
    493493                            break;
    494494                        case 'week':
    495                             $table_field = "DATE(DATE_SUB(CONVERT_TZ($table_field, '+00:00', '$timezone'), INTERVAL WEEKDAY(CONVERT_TZ($table_field, '+00:00', '$timezone')) DAY))";
     495                            // Normalize the date to the Monday of the same week
     496                            // WEEKDAY($local_time_table_field) returns a number from 0 to 6, where Monday is 0 and Sunday is 6.
     497                            // This tells us how many days have passed since Monday for that date.
     498                            // DATE_SUB($local_time_table_field, INTERVAL WEEKDAY($local_time_table_field) DAY) subtracts that many days from the original date.
     499                            // The result is the Monday of the week that $local_time_table_field falls in.
     500                            // DATE(...) then strips off any time component and returns just the date.
     501                            $table_field = "DATE(DATE_SUB($local_time_table_field, INTERVAL WEEKDAY($local_time_table_field) DAY))";
    496502                            break;
    497503                        case 'month':
    498                             $table_field = "DATE_FORMAT(CONVERT_TZ($table_field, '+00:00', '$timezone'), '%Y-%m-01')";
     504                            $table_field = "DATE_FORMAT($local_time_table_field, '%Y-%m-01')";
    499505                            break;
    500506                        case 'year':
    501                             $table_field = "DATE_FORMAT(CONVERT_TZ($table_field, '+00:00', '$timezone'), '%Y-01-01')";
     507                            $table_field = "DATE_FORMAT($local_time_table_field, '%Y-01-01')";
     508                            break;
     509                        case 'day_of_week':
     510                            // WEEKDAY(date) returns an integer from 0 to 6, where:
     511                            // 0 === Monday and 6 === Sunday
     512                            $table_field = "WEEKDAY($local_time_table_field)";
    502513                            break;
    503514                        default:
  • hizzle-downloads/trunk/vendor/hizzle/store/src/REST_Controller.php

    r3420634 r3435015  
    615615        $paged    = (int) $query->query_vars['page'];
    616616
    617         $max_pages = $total > 0 && $per_page > 1 ? ceil( $total / $per_page ) : 1;
     617        $max_pages = $total > 0 && $per_page > 0 ? ceil( $total / $per_page ) : 1;
    618618
    619619        $response = rest_ensure_response(
  • hizzle-downloads/trunk/vendor/hizzle/store/src/Store.php

    r3245426 r3435015  
    5656        // Prepare the collections.
    5757        foreach ( $this->collections as $key => $collection ) {
    58             if ( ! $collection instanceof Collection ) {
    59                 $collection['name']        = $key;
    60                 $this->collections[ $key ] = new Collection( $this->namespace, $collection );
    61             }
    62         }
     58            if ( ! $collection instanceof Collection ) {
     59                $collection['name']        = $key;
     60                $this->collections[ $key ] = new Collection( $this->namespace, $collection );
     61            }
     62        }
    6363
    6464        // Register the store.
     
    9090                self::$instances[ $namespace ]->collections[ $key ] = $collections[ $key ];
    9191            }
    92         }
     92        }
    9393
    9494        return self::$instances[ $namespace ];
     
    150150
    151151    /**
    152     * Returns the table definitions as an array.
    153     *
    154     * @return string[]
    155     */
    156     public function get_schema() {
     152    * Returns the table definitions as an array.
     153    *
     154    * @return string[]
     155    */
     156    public function get_schema() {
    157157        $schema = array();
    158158
     
    164164        return array_filter( $schema );
    165165    }
    166 
    167166}
Note: See TracChangeset for help on using the changeset viewer.