Plugin Directory

Changeset 3767763


Ignore:
Timestamp:
10/27/2026 05:04:01 AM (4 weeks ago)
Author:
atozinfoway
Message:

Release 2.12.1 (automated from tag ai-siteark-v2.12.1)

Location:
ai-siteark
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ai-siteark/tags/2.12.1/ai-siteark.php

    r3764059 r3767763  
    44 * Plugin URI:        https://wp.aiappstore.in/ai-siteark/
    55 * Description:       Full WordPress site backup, restore and migration — back up your entire database and files to local storage or the cloud (Google Drive, OneDrive, Dropbox, Amazon S3, FTP/SFTP), and restore or migrate to any site.
    6  * Version:           2.12.0
     6 * Version:           2.12.1
    77 * Author:            AtoZ INFOWAY INC
    88 * Author URI:        https://atozinfoway.com
    … …  
    2525
    2626/* -------------------------------------------------------------------------
     27 * Load-once guard — two copies in one request must NEVER fatal the site.
     28 *
     29 * AI-SiteArk and its legacy bridge (the same code shipped under the old `ai-sitevault` slug)
     30 * declare the same functions and constants. If BOTH are installed and active in one request —
     31 * e.g. a migration restored the other build's plugin folder alongside this one — the second to
     32 * load would hit "Cannot redeclare aisiteark_self_disable()" and PHP would kill the whole site,
     33 * front end and wp-admin, for everyone. So the first copy to load wins; any later copy bails
     34 * here, before it declares anything. The redundant copy then loads and does nothing, the site
     35 * stays up, and the admin is told to remove the duplicate.
     36 *
     37 * We key off the function already existing (not just our own constant) so this still protects
     38 * when the OTHER copy is an older build that predates this guard — whichever copy loaded first
     39 * has already declared aisiteark_self_disable(), so this one bails before redeclaring it.
     40 * ---------------------------------------------------------------------- */
     41if ( function_exists( 'aisiteark_self_disable' ) || defined( 'AISITEARK_LOADED' ) ) {
     42        add_action(
     43                'admin_notices',
     44                static function () {
     45                        if ( ! function_exists( 'current_user_can' ) || ! current_user_can( 'activate_plugins' ) ) {
     46                                return;
     47                        }
     48                        echo '<div class="notice notice-error"><p><strong>AI-SiteArk:</strong> ';
     49                        echo esc_html__( 'Two copies of this plugin are installed and active (the “ai-siteark” and the legacy “ai-sitevault” folders). Only one is running. Please deactivate or delete the duplicate under Plugins to clear this warning — your backups are not affected.', 'ai-siteark' );
     50                        echo '</p></div>';
     51                }
     52        );
     53        return;
     54}
     55
     56/*
     57 * First copy to load. The ENTIRE plugin body is wrapped in this function_exists() guard so the
     58 * declarations below are CONDITIONAL — PHP registers unconditional top-level functions at COMPILE
     59 * time (before the runtime `return` above can ever run), so only a conditional declaration keeps
     60 * a second copy's file from fataling with "Cannot redeclare…" the moment it is compiled. The
     61 * matching closing brace is at the very end of this file.
     62 */
     63if ( ! function_exists( 'aisiteark_self_disable' ) ) :
     64        define( 'AISITEARK_LOADED', true );
     65
     66/* -------------------------------------------------------------------------
    2767 * Constants
    2868 * ---------------------------------------------------------------------- */
    29 define( 'AISITEARK_VERSION', '2.12.0' );
     69define( 'AISITEARK_VERSION', '2.12.1' );
    3070define( 'AISITEARK_DB_VERSION', '1.0.0' );
    3171define( 'AISITEARK_FILE', __FILE__ );
    … …  
    346386add_action( 'plugins_loaded', 'aisiteark_sdk', 4 );
    347387add_action( 'plugins_loaded', 'aisiteark', 5 );
     388
     389endif; // if ( ! function_exists( 'aisiteark_self_disable' ) ) — the load-once guard near the top.
  • ai-siteark/tags/2.12.1/includes/jobs/class-restore-runner.php

    r3764059 r3767763  
    10671067        private static function self_skip_prefixes() {
    10681068                $prefixes = array(
    1069                         'plugins/ai-siteark/',  // canonical folder
    1070                         'plugins/ai-siteark-',  // any variant: ai-siteark-1, ai-siteark-pro, …
     1069                        'plugins/ai-siteark/',    // canonical folder
     1070                        'plugins/ai-siteark-',    // any variant: ai-siteark-1, ai-siteark-pro, …
     1071                        'plugins/ai-sitevault/',  // the sibling build (same code under the legacy slug) — never
     1072                        'plugins/ai-sitevault-',  // extract it from a backup, or the site gets two copies = fatal.
    10711073                );
    10721074                // The real installed folder, in case someone renamed it to something unrelated.
  • ai-siteark/tags/2.12.1/includes/modules/help/class-whats-new.php

    r3764059 r3767763  
    5252        public static function releases() {
    5353                return array(
     54                        '2.12.1' => array(
     55                                'date'     => '2026-10-27',
     56                                'headline' => __( 'Critical fix: two copies of the plugin can no longer crash your site.', 'ai-siteark' ),
     57                                'items'    => array(
     58                                        array(
     59                                                'title' => __( 'Duplicate plugin copies no longer take the site down', 'ai-siteark' ),
     60                                                'text'  => __( 'If AI-SiteArk and the older “AI-SiteVault” ended up installed and active at the same time (which could happen after a migration), your site could crash with a “Cannot redeclare” error. Now the plugin notices the duplicate, keeps your site running, and shows a notice asking you to remove the extra copy — and a restore no longer brings that second copy along in the first place.', 'ai-siteark' ),
     61                                        ),
     62                                ),
     63                        ),
    5464                        '2.12.0' => array(
    5565                                'date'     => '2026-10-25',
  • ai-siteark/tags/2.12.1/readme.txt

    r3764059 r3767763  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.12.0
     7Stable tag: 2.12.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7777== Changelog ==
    7878
     79= 2.12.1 =
     80Critical fix: having two copies of the plugin active at once (AI-SiteArk plus the older AI-SiteVault, which can happen after a migration) could take the whole site down with a “Cannot redeclare” error. The plugin now detects a duplicate, keeps the site up, and asks you to remove the extra copy — and a restore no longer installs that second copy in the first place.
     81
    7982= 2.12.0 =
    8083Big reliability update for restore & migration: an interrupted restore can no longer take your site down (it shows a maintenance page and keeps admin reachable while it finishes), files are now restored before the database so a stopped restore leaves a working site, and a pulled migration backup is fully verified before any restore begins. Migrations are now logged on both sites, and you can ask the source site to make a fresh backup to pull.
  • ai-siteark/trunk/ai-siteark.php

    r3764059 r3767763  
    44 * Plugin URI:        https://wp.aiappstore.in/ai-siteark/
    55 * Description:       Full WordPress site backup, restore and migration — back up your entire database and files to local storage or the cloud (Google Drive, OneDrive, Dropbox, Amazon S3, FTP/SFTP), and restore or migrate to any site.
    6  * Version:           2.12.0
     6 * Version:           2.12.1
    77 * Author:            AtoZ INFOWAY INC
    88 * Author URI:        https://atozinfoway.com
    … …  
    2525
    2626/* -------------------------------------------------------------------------
     27 * Load-once guard — two copies in one request must NEVER fatal the site.
     28 *
     29 * AI-SiteArk and its legacy bridge (the same code shipped under the old `ai-sitevault` slug)
     30 * declare the same functions and constants. If BOTH are installed and active in one request —
     31 * e.g. a migration restored the other build's plugin folder alongside this one — the second to
     32 * load would hit "Cannot redeclare aisiteark_self_disable()" and PHP would kill the whole site,
     33 * front end and wp-admin, for everyone. So the first copy to load wins; any later copy bails
     34 * here, before it declares anything. The redundant copy then loads and does nothing, the site
     35 * stays up, and the admin is told to remove the duplicate.
     36 *
     37 * We key off the function already existing (not just our own constant) so this still protects
     38 * when the OTHER copy is an older build that predates this guard — whichever copy loaded first
     39 * has already declared aisiteark_self_disable(), so this one bails before redeclaring it.
     40 * ---------------------------------------------------------------------- */
     41if ( function_exists( 'aisiteark_self_disable' ) || defined( 'AISITEARK_LOADED' ) ) {
     42        add_action(
     43                'admin_notices',
     44                static function () {
     45                        if ( ! function_exists( 'current_user_can' ) || ! current_user_can( 'activate_plugins' ) ) {
     46                                return;
     47                        }
     48                        echo '<div class="notice notice-error"><p><strong>AI-SiteArk:</strong> ';
     49                        echo esc_html__( 'Two copies of this plugin are installed and active (the “ai-siteark” and the legacy “ai-sitevault” folders). Only one is running. Please deactivate or delete the duplicate under Plugins to clear this warning — your backups are not affected.', 'ai-siteark' );
     50                        echo '</p></div>';
     51                }
     52        );
     53        return;
     54}
     55
     56/*
     57 * First copy to load. The ENTIRE plugin body is wrapped in this function_exists() guard so the
     58 * declarations below are CONDITIONAL — PHP registers unconditional top-level functions at COMPILE
     59 * time (before the runtime `return` above can ever run), so only a conditional declaration keeps
     60 * a second copy's file from fataling with "Cannot redeclare…" the moment it is compiled. The
     61 * matching closing brace is at the very end of this file.
     62 */
     63if ( ! function_exists( 'aisiteark_self_disable' ) ) :
     64        define( 'AISITEARK_LOADED', true );
     65
     66/* -------------------------------------------------------------------------
    2767 * Constants
    2868 * ---------------------------------------------------------------------- */
    29 define( 'AISITEARK_VERSION', '2.12.0' );
     69define( 'AISITEARK_VERSION', '2.12.1' );
    3070define( 'AISITEARK_DB_VERSION', '1.0.0' );
    3171define( 'AISITEARK_FILE', __FILE__ );
    … …  
    346386add_action( 'plugins_loaded', 'aisiteark_sdk', 4 );
    347387add_action( 'plugins_loaded', 'aisiteark', 5 );
     388
     389endif; // if ( ! function_exists( 'aisiteark_self_disable' ) ) — the load-once guard near the top.
  • ai-siteark/trunk/includes/jobs/class-restore-runner.php

    r3764059 r3767763  
    10671067        private static function self_skip_prefixes() {
    10681068                $prefixes = array(
    1069                         'plugins/ai-siteark/',  // canonical folder
    1070                         'plugins/ai-siteark-',  // any variant: ai-siteark-1, ai-siteark-pro, …
     1069                        'plugins/ai-siteark/',    // canonical folder
     1070                        'plugins/ai-siteark-',    // any variant: ai-siteark-1, ai-siteark-pro, …
     1071                        'plugins/ai-sitevault/',  // the sibling build (same code under the legacy slug) — never
     1072                        'plugins/ai-sitevault-',  // extract it from a backup, or the site gets two copies = fatal.
    10711073                );
    10721074                // The real installed folder, in case someone renamed it to something unrelated.
  • ai-siteark/trunk/includes/modules/help/class-whats-new.php

    r3764059 r3767763  
    5252        public static function releases() {
    5353                return array(
     54                        '2.12.1' => array(
     55                                'date'     => '2026-10-27',
     56                                'headline' => __( 'Critical fix: two copies of the plugin can no longer crash your site.', 'ai-siteark' ),
     57                                'items'    => array(
     58                                        array(
     59                                                'title' => __( 'Duplicate plugin copies no longer take the site down', 'ai-siteark' ),
     60                                                'text'  => __( 'If AI-SiteArk and the older “AI-SiteVault” ended up installed and active at the same time (which could happen after a migration), your site could crash with a “Cannot redeclare” error. Now the plugin notices the duplicate, keeps your site running, and shows a notice asking you to remove the extra copy — and a restore no longer brings that second copy along in the first place.', 'ai-siteark' ),
     61                                        ),
     62                                ),
     63                        ),
    5464                        '2.12.0' => array(
    5565                                'date'     => '2026-10-25',
  • ai-siteark/trunk/readme.txt

    r3764059 r3767763  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.12.0
     7Stable tag: 2.12.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7777== Changelog ==
    7878
     79= 2.12.1 =
     80Critical fix: having two copies of the plugin active at once (AI-SiteArk plus the older AI-SiteVault, which can happen after a migration) could take the whole site down with a “Cannot redeclare” error. The plugin now detects a duplicate, keeps the site up, and asks you to remove the extra copy — and a restore no longer installs that second copy in the first place.
     81
    7982= 2.12.0 =
    8083Big reliability update for restore & migration: an interrupted restore can no longer take your site down (it shows a maintenance page and keeps admin reachable while it finishes), files are now restored before the database so a stopped restore leaves a working site, and a pulled migration backup is fully verified before any restore begins. Migrations are now logged on both sites, and you can ask the source site to make a fresh backup to pull.
Note: See TracChangeset for help on using the changeset viewer.