Changeset 3767763
- Timestamp:
- 10/27/2026 05:04:01 AM (4 weeks ago)
- Location:
- ai-siteark
- Files:
-
- 8 edited
- 1 copied
-
tags/2.12.1 (copied) (copied from ai-siteark/trunk )
-
tags/2.12.1/ai-siteark.php (modified) (3 diffs)
-
tags/2.12.1/includes/jobs/class-restore-runner.php (modified) (1 diff)
-
tags/2.12.1/includes/modules/help/class-whats-new.php (modified) (1 diff)
-
tags/2.12.1/readme.txt (modified) (2 diffs)
-
trunk/ai-siteark.php (modified) (3 diffs)
-
trunk/includes/jobs/class-restore-runner.php (modified) (1 diff)
-
trunk/includes/modules/help/class-whats-new.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ai-siteark/tags/2.12.1/ai-siteark.php
r3764059 r3767763 4 4 * Plugin URI: https://wp.aiappstore.in/ai-siteark/ 5 5 * 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. 06 * Version: 2.12.1 7 7 * Author: AtoZ INFOWAY INC 8 8 * Author URI: https://atozinfoway.com … … 25 25 26 26 /* ------------------------------------------------------------------------- 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 * ---------------------------------------------------------------------- */ 41 if ( 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 */ 63 if ( ! function_exists( 'aisiteark_self_disable' ) ) : 64 define( 'AISITEARK_LOADED', true ); 65 66 /* ------------------------------------------------------------------------- 27 67 * Constants 28 68 * ---------------------------------------------------------------------- */ 29 define( 'AISITEARK_VERSION', '2.12. 0' );69 define( 'AISITEARK_VERSION', '2.12.1' ); 30 70 define( 'AISITEARK_DB_VERSION', '1.0.0' ); 31 71 define( 'AISITEARK_FILE', __FILE__ ); … … 346 386 add_action( 'plugins_loaded', 'aisiteark_sdk', 4 ); 347 387 add_action( 'plugins_loaded', 'aisiteark', 5 ); 388 389 endif; // 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 1067 1067 private static function self_skip_prefixes() { 1068 1068 $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. 1071 1073 ); 1072 1074 // 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 52 52 public static function releases() { 53 53 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 ), 54 64 '2.12.0' => array( 55 65 'date' => '2026-10-25', -
ai-siteark/tags/2.12.1/readme.txt
r3764059 r3767763 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.12. 07 Stable tag: 2.12.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 77 77 == Changelog == 78 78 79 = 2.12.1 = 80 Critical 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 79 82 = 2.12.0 = 80 83 Big 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 4 4 * Plugin URI: https://wp.aiappstore.in/ai-siteark/ 5 5 * 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. 06 * Version: 2.12.1 7 7 * Author: AtoZ INFOWAY INC 8 8 * Author URI: https://atozinfoway.com … … 25 25 26 26 /* ------------------------------------------------------------------------- 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 * ---------------------------------------------------------------------- */ 41 if ( 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 */ 63 if ( ! function_exists( 'aisiteark_self_disable' ) ) : 64 define( 'AISITEARK_LOADED', true ); 65 66 /* ------------------------------------------------------------------------- 27 67 * Constants 28 68 * ---------------------------------------------------------------------- */ 29 define( 'AISITEARK_VERSION', '2.12. 0' );69 define( 'AISITEARK_VERSION', '2.12.1' ); 30 70 define( 'AISITEARK_DB_VERSION', '1.0.0' ); 31 71 define( 'AISITEARK_FILE', __FILE__ ); … … 346 386 add_action( 'plugins_loaded', 'aisiteark_sdk', 4 ); 347 387 add_action( 'plugins_loaded', 'aisiteark', 5 ); 388 389 endif; // if ( ! function_exists( 'aisiteark_self_disable' ) ) — the load-once guard near the top. -
ai-siteark/trunk/includes/jobs/class-restore-runner.php
r3764059 r3767763 1067 1067 private static function self_skip_prefixes() { 1068 1068 $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. 1071 1073 ); 1072 1074 // The real installed folder, in case someone renamed it to something unrelated. -
ai-siteark/trunk/includes/modules/help/class-whats-new.php
r3764059 r3767763 52 52 public static function releases() { 53 53 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 ), 54 64 '2.12.0' => array( 55 65 'date' => '2026-10-25', -
ai-siteark/trunk/readme.txt
r3764059 r3767763 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.12. 07 Stable tag: 2.12.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 77 77 == Changelog == 78 78 79 = 2.12.1 = 80 Critical 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 79 82 = 2.12.0 = 80 83 Big 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.