Plugin Directory

Changeset 3117170


Ignore:
Timestamp:
07/12/2024 04:57:42 PM (20 months ago)
Author:
wildoperation
Message:

Update to version 1.0.2 from GitHub

Location:
ad-commander-tools
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ad-commander-tools/tags/1.0.2/ad-commander-tools.php

    r3116646 r3117170  
    55 * Description:      Add-on for the Ad Commander plugin that allows you to import, export, and manage ad statistics.
    66 * Requires Plugins: ad-commander
    7  * Version:          1.0.1
     7 * Version:          1.0.2
    88 * Author:           Wild Operation
    99 * Author URI:       https://wildoperation.com
     
    1515 * @subpackage ad-commander-tools
    1616 * @since 1.0.0
    17  * @version 1.0.1
     17 * @version 1.0.2
    1818 */
    1919
  • ad-commander-tools/tags/1.0.2/includes/AdCommanderTools.php

    r3116646 r3117170  
    1212     */
    1313    public static function version() {
    14         return '1.0.1';
     14        return '1.0.2';
    1515    }
    1616
  • ad-commander-tools/tags/1.0.2/includes/ImportBundle.php

    r3116646 r3117170  
    111111        if ( ! $basename ||
    112112        ! isset( $_REQUEST['adcmdr_import_bundle_options'] ) ||
    113         empty( $_REQUEST['adcmdr_import_bundle_options'] ) ||
    114         ( strtolower( $file_type['ext'] ) !== 'zip' && strtolower( $file_type['type'] ) !== 'application/zip' ) ) {
     113        empty( $_REQUEST['adcmdr_import_bundle_options'] ) ) {
    115114            $this->cleanup_and_redirect( $import_nonce, $bundle_tmp );
     115        }
     116
     117        if ( ! $file_type || empty( $file_type ) || ( strtolower( $file_type['ext'] ) !== 'zip' && strtolower( $file_type['type'] ) !== 'application/zip' ) ) {
     118            $parts = explode( '.', $bundle_name );
     119            if ( ! is_array( $parts ) || count( $parts ) < 2 || strtolower( $parts[1] ) !== 'zip' ) {
     120                $this->cleanup_and_redirect( $import_nonce, $bundle_tmp );
     121            }
    116122        }
    117123
     
    238244     * @param array $delete_files Files to delete.
    239245     * @param array $delete_dirs Directories to remove.
    240      * @param bool  $fail Whether this is a failure or success redirect.
     246     * @param bool  $success Whether this is a failure or success redirect.
    241247     *
    242248     * @return void
     
    244250    private function cleanup_and_redirect( $nonce, $delete_files = array(), $delete_dirs = array(), $success = false ) {
    245251        global $wp_filesystem;
     252
     253        Filesystem::instance()->init_wp_filesystem();
    246254
    247255        if ( ! is_array( $delete_files ) ) {
  • ad-commander-tools/tags/1.0.2/readme.txt

    r3116646 r3117170  
    44Requires at least: 6.2
    55Tested up to: 6.6
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.4
    88License: GPLv3
     
    2626
    2727== Changelog ==
     28= 1.0.2 =
     29* Fixes WP multisite issue where some import bundles could not be opened
     30
    2831= 1.0.1 =
    2932* Adds required plugin header
  • ad-commander-tools/trunk/ad-commander-tools.php

    r3116646 r3117170  
    55 * Description:      Add-on for the Ad Commander plugin that allows you to import, export, and manage ad statistics.
    66 * Requires Plugins: ad-commander
    7  * Version:          1.0.1
     7 * Version:          1.0.2
    88 * Author:           Wild Operation
    99 * Author URI:       https://wildoperation.com
     
    1515 * @subpackage ad-commander-tools
    1616 * @since 1.0.0
    17  * @version 1.0.1
     17 * @version 1.0.2
    1818 */
    1919
  • ad-commander-tools/trunk/includes/AdCommanderTools.php

    r3116646 r3117170  
    1212     */
    1313    public static function version() {
    14         return '1.0.1';
     14        return '1.0.2';
    1515    }
    1616
  • ad-commander-tools/trunk/includes/ImportBundle.php

    r3116646 r3117170  
    111111        if ( ! $basename ||
    112112        ! isset( $_REQUEST['adcmdr_import_bundle_options'] ) ||
    113         empty( $_REQUEST['adcmdr_import_bundle_options'] ) ||
    114         ( strtolower( $file_type['ext'] ) !== 'zip' && strtolower( $file_type['type'] ) !== 'application/zip' ) ) {
     113        empty( $_REQUEST['adcmdr_import_bundle_options'] ) ) {
    115114            $this->cleanup_and_redirect( $import_nonce, $bundle_tmp );
     115        }
     116
     117        if ( ! $file_type || empty( $file_type ) || ( strtolower( $file_type['ext'] ) !== 'zip' && strtolower( $file_type['type'] ) !== 'application/zip' ) ) {
     118            $parts = explode( '.', $bundle_name );
     119            if ( ! is_array( $parts ) || count( $parts ) < 2 || strtolower( $parts[1] ) !== 'zip' ) {
     120                $this->cleanup_and_redirect( $import_nonce, $bundle_tmp );
     121            }
    116122        }
    117123
     
    238244     * @param array $delete_files Files to delete.
    239245     * @param array $delete_dirs Directories to remove.
    240      * @param bool  $fail Whether this is a failure or success redirect.
     246     * @param bool  $success Whether this is a failure or success redirect.
    241247     *
    242248     * @return void
     
    244250    private function cleanup_and_redirect( $nonce, $delete_files = array(), $delete_dirs = array(), $success = false ) {
    245251        global $wp_filesystem;
     252
     253        Filesystem::instance()->init_wp_filesystem();
    246254
    247255        if ( ! is_array( $delete_files ) ) {
  • ad-commander-tools/trunk/readme.txt

    r3116646 r3117170  
    44Requires at least: 6.2
    55Tested up to: 6.6
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.4
    88License: GPLv3
     
    2626
    2727== Changelog ==
     28= 1.0.2 =
     29* Fixes WP multisite issue where some import bundles could not be opened
     30
    2831= 1.0.1 =
    2932* Adds required plugin header
Note: See TracChangeset for help on using the changeset viewer.