Plugin Directory

Changeset 3112499


Ignore:
Timestamp:
07/04/2024 12:40:49 PM (21 months ago)
Author:
bangelov
Message:

Adding v7.84 to trunk

Location:
all-in-one-wp-migration/trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • all-in-one-wp-migration/trunk/all-in-one-wp-migration.php

    r3099274 r3112499  
    66 * Author: ServMask
    77 * Author URI: https://servmask.com/
    8  * Version: 7.83
     8 * Version: 7.84
    99 * Text Domain: all-in-one-wp-migration
    1010 * Domain Path: /languages
  • all-in-one-wp-migration/trunk/constants.php

    r3099274 r3112499  
    3636// = Plugin Version =
    3737// ==================
    38 define( 'AI1WM_VERSION', '7.83' );
     38define( 'AI1WM_VERSION', '7.84' );
    3939
    4040// ===============
  • all-in-one-wp-migration/trunk/lib/controller/class-ai1wm-export-controller.php

    r3038703 r3112499  
    7474
    7575                        } catch ( Ai1wm_Database_Exception $e ) {
     76                            do_action( 'ai1wm_status_export_error', $params, $e );
     77
    7678                            if ( defined( 'WP_CLI' ) ) {
    7779                                WP_CLI::error( sprintf( __( 'Unable to export. Error code: %s. %s', AI1WM_PLUGIN_NAME ), $e->getCode(), $e->getMessage() ) );
    78                             } else {
    79                                 status_header( $e->getCode() );
    80                                 ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) );
    8180                            }
    82                             Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
    83 
    84                             // Check if export is performed from scheduled event
    85                             if ( isset( $params['event_id'] ) ) {
    86                                 $params['error_message'] = $e->getMessage();
    87                                 do_action( 'ai1wm_status_export_fail', $params );
    88                             }
     81
     82                            status_header( $e->getCode() );
     83                            ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) );
    8984                            exit;
    9085                        } catch ( Exception $e ) {
     86                            do_action( 'ai1wm_status_export_error', $params, $e );
     87
    9188                            if ( defined( 'WP_CLI' ) ) {
    9289                                WP_CLI::error( sprintf( __( 'Unable to export: %s', AI1WM_PLUGIN_NAME ), $e->getMessage() ) );
    93                             } else {
    94                                 Ai1wm_Status::error( __( 'Unable to export', AI1WM_PLUGIN_NAME ), $e->getMessage() );
    95                                 Ai1wm_Notification::error( __( 'Unable to export', AI1WM_PLUGIN_NAME ), $e->getMessage() );
    9690                            }
    97                             Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
    98 
    99                             // Check if export is performed from scheduled event
    100                             if ( isset( $params['event_id'] ) ) {
    101                                 $params['error_message'] = $e->getMessage();
    102                                 do_action( 'ai1wm_status_export_fail', $params );
    103                             }
     91
     92                            Ai1wm_Status::error( __( 'Unable to export', AI1WM_PLUGIN_NAME ), $e->getMessage() );
     93                            Ai1wm_Notification::error( __( 'Unable to export', AI1WM_PLUGIN_NAME ), $e->getMessage() );
    10494                            exit;
    10595                        }
  • all-in-one-wp-migration/trunk/lib/controller/class-ai1wm-import-controller.php

    r3038703 r3112499  
    7474
    7575                        } catch ( Ai1wm_Import_Retry_Exception $e ) {
     76                            do_action( 'ai1wm_status_import_error', $params, $e );
     77
    7678                            if ( defined( 'WP_CLI' ) ) {
    7779                                WP_CLI::error( sprintf( __( 'Unable to import. Error code: %s. %s', AI1WM_PLUGIN_NAME ), $e->getCode(), $e->getMessage() ) );
    78                             } else {
    79                                 status_header( $e->getCode() );
    80                                 ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) );
    81                             }
     80                            }
     81
     82                            status_header( $e->getCode() );
     83                            ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) );
    8284                            exit;
    8385                        } catch ( Ai1wm_Database_Exception $e ) {
     86                            do_action( 'ai1wm_status_import_error', $params, $e );
     87
    8488                            if ( defined( 'WP_CLI' ) ) {
    8589                                WP_CLI::error( sprintf( __( 'Unable to import. Error code: %s. %s', AI1WM_PLUGIN_NAME ), $e->getCode(), $e->getMessage() ) );
    86                             } else {
    87                                 status_header( $e->getCode() );
    88                                 ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) );
    89                             }
    90                             Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
     90                            }
     91
     92                            status_header( $e->getCode() );
     93                            ai1wm_json_response( array( 'errors' => array( array( 'code' => $e->getCode(), 'message' => $e->getMessage() ) ) ) );
     94
    9195                            exit;
    9296                        } catch ( Exception $e ) {
     97                            do_action( 'ai1wm_status_import_error', $params, $e );
     98
    9399                            if ( defined( 'WP_CLI' ) ) {
    94100                                WP_CLI::error( sprintf( __( 'Unable to import: %s', AI1WM_PLUGIN_NAME ), $e->getMessage() ) );
    95                             } else {
    96                                 Ai1wm_Status::error( __( 'Unable to import', AI1WM_PLUGIN_NAME ), $e->getMessage() );
    97                                 Ai1wm_Notification::error( __( 'Unable to import', AI1WM_PLUGIN_NAME ), $e->getMessage() );
    98                             }
    99                             Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
     101                            }
     102
     103                            Ai1wm_Status::error( __( 'Unable to import', AI1WM_PLUGIN_NAME ), $e->getMessage() );
     104                            Ai1wm_Notification::error( __( 'Unable to import', AI1WM_PLUGIN_NAME ), $e->getMessage() );
     105
    100106                            exit;
    101107                        }
  • all-in-one-wp-migration/trunk/lib/controller/class-ai1wm-main-controller.php

    r3099274 r3112499  
    135135        // Enqueue updater scripts and styles
    136136        add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_updater_scripts_and_styles' ), 5 );
     137
     138        // Handle export/import exceptions (errors)
     139        add_action( 'ai1wm_status_export_error', array( $this, 'handle_error_cleanup' ), 5, 2 );
     140        add_action( 'ai1wm_status_import_error', array( $this, 'handle_error_cleanup' ), 5, 2 );
    137141    }
    138142
     
    13741378        return $schedules;
    13751379    }
     1380
     1381    /**
     1382     * Handles ai1wm_status_export_error hook
     1383     *
     1384     * @param $params
     1385     * @param $exception
     1386     *
     1387     * @return void
     1388     */
     1389    public function handle_error_cleanup( $params, $exception = null ) {
     1390        if ( ! $exception instanceof Ai1wm_Import_Retry_Exception ) {
     1391            Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
     1392        }
     1393    }
    13761394}
  • all-in-one-wp-migration/trunk/lib/model/class-ai1wm-backups.php

    r3099274 r3112499  
    103103    public static function delete_file( $file ) {
    104104        if ( ai1wm_is_filename_supported( $file ) ) {
    105             return @unlink( ai1wm_backup_path( array( 'archive' => $file ) ) );
     105            if ( $deleted = @unlink( ai1wm_backup_path( array( 'archive' => $file ) ) ) ) {
     106                do_action( 'ai1wm_status_backup_deleted', $file );
     107            }
     108
     109            return $deleted;
    106110        }
     111
     112        return false;
    107113    }
    108114
  • all-in-one-wp-migration/trunk/lib/model/class-ai1wm-extensions.php

    r3045858 r3112499  
    4747                'basename' => AI1WMZE_PLUGIN_BASENAME,
    4848                'version'  => AI1WMZE_VERSION,
    49                 'requires' => '1.41',
     49                'requires' => '1.45',
    5050                'short'    => AI1WMZE_PLUGIN_SHORT,
    5151            );
     
    6161                'basename' => AI1WMAE_PLUGIN_BASENAME,
    6262                'version'  => AI1WMAE_VERSION,
    63                 'requires' => '1.46',
     63                'requires' => '1.50',
    6464                'short'    => AI1WMAE_PLUGIN_SHORT,
    6565            );
     
    8989                'basename' => AI1WMBE_PLUGIN_BASENAME,
    9090                'version'  => AI1WMBE_VERSION,
    91                 'requires' => '1.57',
     91                'requires' => '1.61',
    9292                'short'    => AI1WMBE_PLUGIN_SHORT,
    9393            );
     
    103103                'basename' => AI1WMIE_PLUGIN_BASENAME,
    104104                'version'  => AI1WMIE_VERSION,
    105                 'requires' => '1.57',
     105                'requires' => '1.61',
    106106                'short'    => AI1WMIE_PLUGIN_SHORT,
    107107            );
     
    117117                'basename' => AI1WMXE_PLUGIN_BASENAME,
    118118                'version'  => AI1WMXE_VERSION,
    119                 'requires' => '1.26',
     119                'requires' => '1.30',
    120120                'short'    => AI1WMXE_PLUGIN_SHORT,
    121121            );
     
    131131                'basename' => AI1WMDE_PLUGIN_BASENAME,
    132132                'version'  => AI1WMDE_VERSION,
    133                 'requires' => '3.81',
     133                'requires' => '3.85',
    134134                'short'    => AI1WMDE_PLUGIN_SHORT,
    135135            );
     
    159159                'basename' => AI1WMFE_PLUGIN_BASENAME,
    160160                'version'  => AI1WMFE_VERSION,
    161                 'requires' => '2.80',
     161                'requires' => '2.84',
    162162                'short'    => AI1WMFE_PLUGIN_SHORT,
    163163            );
     
    173173                'basename' => AI1WMCE_PLUGIN_BASENAME,
    174174                'version'  => AI1WMCE_VERSION,
    175                 'requires' => '1.49',
     175                'requires' => '1.53',
    176176                'short'    => AI1WMCE_PLUGIN_SHORT,
    177177            );
     
    187187                'basename' => AI1WMGE_PLUGIN_BASENAME,
    188188                'version'  => AI1WMGE_VERSION,
    189                 'requires' => '2.85',
     189                'requires' => '2.89',
    190190                'short'    => AI1WMGE_PLUGIN_SHORT,
    191191            );
     
    201201                'basename' => AI1WMRE_PLUGIN_BASENAME,
    202202                'version'  => AI1WMRE_VERSION,
    203                 'requires' => '1.43',
     203                'requires' => '1.47',
    204204                'short'    => AI1WMRE_PLUGIN_SHORT,
    205205            );
     
    215215                'basename' => AI1WMEE_PLUGIN_BASENAME,
    216216                'version'  => AI1WMEE_VERSION,
    217                 'requires' => '1.50',
     217                'requires' => '1.54',
    218218                'short'    => AI1WMEE_PLUGIN_SHORT,
    219219            );
     
    229229                'basename' => AI1WMME_PLUGIN_BASENAME,
    230230                'version'  => AI1WMME_VERSION,
    231                 'requires' => '4.33',
     231                'requires' => '4.37',
    232232                'short'    => AI1WMME_PLUGIN_SHORT,
    233233            );
     
    243243                'basename' => AI1WMOE_PLUGIN_BASENAME,
    244244                'version'  => AI1WMOE_VERSION,
    245                 'requires' => '1.70',
     245                'requires' => '1.74',
    246246                'short'    => AI1WMOE_PLUGIN_SHORT,
    247247            );
     
    257257                'basename' => AI1WMPE_PLUGIN_BASENAME,
    258258                'version'  => AI1WMPE_VERSION,
    259                 'requires' => '1.44',
     259                'requires' => '1.48',
    260260                'short'    => AI1WMPE_PLUGIN_SHORT,
    261261            );
     
    285285                'basename' => AI1WMNE_PLUGIN_BASENAME,
    286286                'version'  => AI1WMNE_VERSION,
    287                 'requires' => '1.41',
     287                'requires' => '1.45',
    288288                'short'    => AI1WMNE_PLUGIN_SHORT,
    289289            );
     
    299299                'basename' => AI1WMSE_PLUGIN_BASENAME,
    300300                'version'  => AI1WMSE_VERSION,
    301                 'requires' => '3.81',
     301                'requires' => '3.85',
    302302                'short'    => AI1WMSE_PLUGIN_SHORT,
    303303            );
     
    313313                'basename' => AI1WMUE_PLUGIN_BASENAME,
    314314                'version'  => AI1WMUE_VERSION,
    315                 'requires' => '2.55',
     315                'requires' => '2.59',
    316316                'short'    => AI1WMUE_PLUGIN_SHORT,
    317317            );
     
    327327                'basename' => AI1WMLE_PLUGIN_BASENAME,
    328328                'version'  => AI1WMLE_VERSION,
    329                 'requires' => '2.67',
     329                'requires' => '2.71',
    330330                'short'    => AI1WMLE_PLUGIN_SHORT,
    331331            );
     
    341341                'basename' => AI1WMWE_PLUGIN_BASENAME,
    342342                'version'  => AI1WMWE_VERSION,
    343                 'requires' => '1.38',
     343                'requires' => '1.42',
    344344                'short'    => AI1WMWE_PLUGIN_SHORT,
    345345            );
  • all-in-one-wp-migration/trunk/lib/model/export/class-ai1wm-export-archive.php

    r3038703 r3112499  
    3232    public static function execute( $params ) {
    3333
     34        do_action( 'ai1wm_status_export_start', $params );
     35
    3436        // Set progress
    3537        Ai1wm_Status::info( __( 'Creating an empty archive...', AI1WM_PLUGIN_NAME ) );
  • all-in-one-wp-migration/trunk/lib/model/export/class-ai1wm-export-clean.php

    r3038703 r3112499  
    3535        Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
    3636
     37        if ( isset( $params['ai1wm_export_cancel'] ) ) {
     38            do_action( 'ai1wm_status_export_canceled', $params );
     39        }
     40
    3741        // Exit in console
    3842        if ( defined( 'WP_CLI' ) ) {
  • all-in-one-wp-migration/trunk/lib/model/export/class-ai1wm-export-download.php

    r3099274 r3112499  
    9898        do_action( 'ai1wm_status_export_done', $params );
    9999
     100        if ( isset( $params['ai1wm_manual_backup'] ) ) {
     101            do_action( 'ai1wm_status_backup_created', $params );
     102        }
     103
    100104        return $params;
    101105    }
  • all-in-one-wp-migration/trunk/lib/model/import/class-ai1wm-import-clean.php

    r3089446 r3112499  
    3838        $db_client->flush();
    3939
     40        if ( isset( $params['ai1wm_import_cancel'] ) ) {
     41            do_action( 'ai1wm_status_import_canceled', $params );
     42        } else {
     43            do_action( 'ai1wm_status_import_done', $params );
     44        }
     45
    4046        // Delete storage files
    4147        Ai1wm_Directory::delete( ai1wm_storage_path( $params ) );
  • all-in-one-wp-migration/trunk/lib/model/import/class-ai1wm-import-compatibility.php

    r3038703 r3112499  
    3131
    3232    public static function execute( $params ) {
     33        do_action( 'ai1wm_status_import_start', $params );
    3334
    3435        // Set progress
  • all-in-one-wp-migration/trunk/lib/view/assets/javascript/backups.min.js

    r3099274 r3112499  
    249249    name: 'priority',
    250250    value: 300
     251  }).concat({
     252    name: 'ai1wm_export_cancel',
     253    value: 1
    251254  }); // Set additional params
    252255
     
    627630
    628631  this.modal.onStop = function (options) {
     632    options = (options || []).concat({
     633      name: 'ai1wm_import_cancel',
     634      value: 1
     635    });
    629636    self.onStop(options);
    630637  }; // Set disk space listener
     
    28622869      name: 'file',
    28632870      value: 1
     2871    }).concat({
     2872      name: 'ai1wm_manual_backup',
     2873      value: 1
    28642874    }); // Set global params
    28652875
  • all-in-one-wp-migration/trunk/lib/view/assets/javascript/export.min.js

    r3099274 r3112499  
    209209    name: 'priority',
    210210    value: 300
     211  }).concat({
     212    name: 'ai1wm_export_cancel',
     213    value: 1
    211214  }); // Set additional params
    212215
  • all-in-one-wp-migration/trunk/lib/view/assets/javascript/import.min.js

    r3038703 r3112499  
    4949
    5050  this.modal.onStop = function (options) {
     51    options = (options || []).concat({
     52      name: 'ai1wm_import_cancel',
     53      value: 1
     54    });
    5155    self.onStop(options);
    5256  }; // Set disk space listener
  • all-in-one-wp-migration/trunk/readme.txt

    r3099274 r3112499  
    33Tags: backup, transfer, copy, move, clone
    44Requires at least: 3.3
    5 Tested up to: 6.5
     5Tested up to: 6.6
    66Requires PHP: 5.3
    7 Stable tag: 7.83
     7Stable tag: 7.84
    88License: GPLv2 or later
    99
     
    2525One feature that makes All-in-One WP Migration widely loved (to the tune of over 6,000 5-star user reviews) is that the technical requirements for installing the plugin are simple.
    2626
    27 If you have WordPress version between 3.3 and 6.5.4 and PHP version between 5.3 and 8.3, you are good to go. All-in-One WP Migration also supports all versions of MySQL, MariaDB and SQLite.
     27If you have WordPress version between 3.3 and 6.5.5 and PHP version between 5.3 and 8.3, you are good to go. All-in-One WP Migration also supports all versions of MySQL, MariaDB and SQLite.
    2828
    2929**Features Spotlight:**
     
    9898
    9999== Changelog ==
     100= 7.84 =
     101**Added**
     102
     103* New hooks during the export and import processes to allow for custom actions and integrations
     104
    100105= 7.83 =
    101106**Fixed**
Note: See TracChangeset for help on using the changeset viewer.