Plugin Directory

Changeset 3664708


Ignore:
Timestamp:
08/25/2026 06:32:45 AM (3 months ago)
Author:
atozinfoway
Message:

Release 2.9.5 (automated from tag ai-siteark-v2.9.5)

Location:
ai-siteark
Files:
8 edited
1 copied

Legend:

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

    r3657880 r3664708  
    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.9.4
     6 * Version:           2.9.5
    77 * Author:            AtoZ INFOWAY INC
    88 * Author URI:        https://atozinfoway.com
    … …  
    2727 * Constants
    2828 * ---------------------------------------------------------------------- */
    29 define( 'AISITEARK_VERSION', '2.9.4' );
     29define( 'AISITEARK_VERSION', '2.9.5' );
    3030define( 'AISITEARK_DB_VERSION', '1.0.0' );
    3131define( 'AISITEARK_FILE', __FILE__ );
  • ai-siteark/tags/2.9.5/includes/helpers/class-local-store.php

    r3657840 r3664708  
    352352
    353353        /**
     354         * Sub-folder that holds the actual backup archives, kept tidy and separate from recovery
     355         * points and work files. Lives under the (web-blocked) store dir, so it inherits the same
     356         * .htaccess protection. New backups are written here; archives created before this existed
     357         * remain in the store root and are still found (see list_files() / path_for()).
     358         *
     359         * @return string|\WP_Error
     360         */
     361        public static function backup_dir() {
     362                $dir = self::dir();
     363                if ( is_wp_error( $dir ) ) {
     364                        return $dir;
     365                }
     366                $bdir = trailingslashit( $dir ) . 'backup';
     367                if ( ! is_dir( $bdir ) ) {
     368                        wp_mkdir_p( $bdir );
     369                }
     370                return $bdir;
     371        }
     372
     373        /**
    354374         * The site's host as a filename/folder-safe slug (lowercase, no "www.", only a-z0-9-),
    355375         * e.g. "example.com" -> "example-com". Empty string if it can't be determined.
    … …  
    396416                        return array();
    397417                }
    398                 $out = array();
    399                 // Only base volumes end in ".aisv"; continuation parts (".aisv.2") don't match.
    400                 foreach ( (array) glob( trailingslashit( $dir ) . '*.aisv' ) as $path ) {
    401                         if ( ! is_file( $path ) ) {
    402                                 continue;
    403                         }
    404                         $vols = self::volumes_for( $path );
    405                         $size = 0;
    406                         foreach ( $vols as $v ) {
    407                                 $size += (int) filesize( $v );
    408                         }
    409                         $out[] = array(
    410                                 'file'    => basename( $path ),
    411                                 'path'    => $path,
    412                                 'size'    => $size,
    413                                 'mtime'   => (int) filemtime( $path ),
    414                                 'volumes' => count( $vols ),
    415                         );
     418                $out  = array();
     419                $seen = array();
     420                // New backups live in the backup/ sub-folder; archives from before it existed are in the
     421                // store root. Scan both (backup/ first so it wins on a duplicate name). Only base volumes
     422                // end in ".aisv"; continuation parts (".aisv.2") don't match.
     423                $globs = array();
     424                $bdir  = self::backup_dir();
     425                if ( ! is_wp_error( $bdir ) ) {
     426                        $globs[] = trailingslashit( $bdir ) . '*.aisv';
     427                }
     428                $globs[] = trailingslashit( $dir ) . '*.aisv';
     429                foreach ( $globs as $glob ) {
     430                        foreach ( (array) glob( $glob ) as $path ) {
     431                                if ( ! is_file( $path ) ) {
     432                                        continue;
     433                                }
     434                                $base = basename( $path );
     435                                if ( isset( $seen[ $base ] ) ) {
     436                                        continue;
     437                                }
     438                                $seen[ $base ] = true;
     439                                $vols          = self::volumes_for( $path );
     440                                $size          = 0;
     441                                foreach ( $vols as $v ) {
     442                                        $size += (int) filesize( $v );
     443                                }
     444                                $out[] = array(
     445                                        'file'    => $base,
     446                                        'path'    => $path,
     447                                        'size'    => $size,
     448                                        'mtime'   => (int) filemtime( $path ),
     449                                        'volumes' => count( $vols ),
     450                                );
     451                        }
    416452                }
    417453                usort( $out, static function ( $a, $b ) { return $b['mtime'] <=> $a['mtime']; } );
    … …  
    433469                if ( is_wp_error( $dir ) ) {
    434470                        return false;
     471                }
     472                // Prefer the backup/ sub-folder (new location); fall back to the store root (archives
     473                // created before backup/ existed, and imported uploaded-/cloud- archives).
     474                $bdir = self::backup_dir();
     475                if ( ! is_wp_error( $bdir ) ) {
     476                        $bpath = trailingslashit( $bdir ) . $file;
     477                        if ( is_file( $bpath ) ) {
     478                                return $bpath;
     479                        }
    435480                }
    436481                $path = trailingslashit( $dir ) . $file;
  • ai-siteark/tags/2.9.5/includes/jobs/class-backup-runner.php

    r3657840 r3664708  
    9090                $gw      = new Job_Gateway();
    9191                $id      = $gw->insert( 'backup', array( 'phase' => 'prepare' ) );
    92                 $archive = trailingslashit( $store ) . Local_Store::filename();
     92                // New backups go into the backup/ sub-folder (falls back to the store root on error).
     93                $bstore  = Local_Store::backup_dir();
     94                $dest    = is_wp_error( $bstore ) ? $store : $bstore;
     95                $archive = trailingslashit( $dest ) . Local_Store::filename();
    9396                $work    = Local_Store::work_dir( $id );
    9497                if ( is_wp_error( $work ) ) {
  • ai-siteark/tags/2.9.5/readme.txt

    r3657880 r3664708  
    33Tags: backup, restore, migration, clone, database
    44Requires at least: 6.0
    5 Tested up to: 7.0
     5Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.9.4
     7Stable tag: 2.9.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7676== Changelog ==
    7777
    78 = 2.9.4 =
     78= 2.9.5 =
    7979AI-SiteArk backs up, restores and migrates your entire WordPress site — the full database and your files — into a single portable, integrity-checked .aisv archive, with optional AES-256 password encryption and authenticated (tamper-evident) backups. Restore in place, or migrate to a new domain or host with automatic, serialization-safe URL/path rewriting. Backups run as memory-safe, resumable background jobs, so they work on large sites and modest hosting.
    8080
  • ai-siteark/trunk/ai-siteark.php

    r3657880 r3664708  
    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.9.4
     6 * Version:           2.9.5
    77 * Author:            AtoZ INFOWAY INC
    88 * Author URI:        https://atozinfoway.com
    … …  
    2727 * Constants
    2828 * ---------------------------------------------------------------------- */
    29 define( 'AISITEARK_VERSION', '2.9.4' );
     29define( 'AISITEARK_VERSION', '2.9.5' );
    3030define( 'AISITEARK_DB_VERSION', '1.0.0' );
    3131define( 'AISITEARK_FILE', __FILE__ );
  • ai-siteark/trunk/includes/helpers/class-local-store.php

    r3657840 r3664708  
    352352
    353353        /**
     354         * Sub-folder that holds the actual backup archives, kept tidy and separate from recovery
     355         * points and work files. Lives under the (web-blocked) store dir, so it inherits the same
     356         * .htaccess protection. New backups are written here; archives created before this existed
     357         * remain in the store root and are still found (see list_files() / path_for()).
     358         *
     359         * @return string|\WP_Error
     360         */
     361        public static function backup_dir() {
     362                $dir = self::dir();
     363                if ( is_wp_error( $dir ) ) {
     364                        return $dir;
     365                }
     366                $bdir = trailingslashit( $dir ) . 'backup';
     367                if ( ! is_dir( $bdir ) ) {
     368                        wp_mkdir_p( $bdir );
     369                }
     370                return $bdir;
     371        }
     372
     373        /**
    354374         * The site's host as a filename/folder-safe slug (lowercase, no "www.", only a-z0-9-),
    355375         * e.g. "example.com" -> "example-com". Empty string if it can't be determined.
    … …  
    396416                        return array();
    397417                }
    398                 $out = array();
    399                 // Only base volumes end in ".aisv"; continuation parts (".aisv.2") don't match.
    400                 foreach ( (array) glob( trailingslashit( $dir ) . '*.aisv' ) as $path ) {
    401                         if ( ! is_file( $path ) ) {
    402                                 continue;
    403                         }
    404                         $vols = self::volumes_for( $path );
    405                         $size = 0;
    406                         foreach ( $vols as $v ) {
    407                                 $size += (int) filesize( $v );
    408                         }
    409                         $out[] = array(
    410                                 'file'    => basename( $path ),
    411                                 'path'    => $path,
    412                                 'size'    => $size,
    413                                 'mtime'   => (int) filemtime( $path ),
    414                                 'volumes' => count( $vols ),
    415                         );
     418                $out  = array();
     419                $seen = array();
     420                // New backups live in the backup/ sub-folder; archives from before it existed are in the
     421                // store root. Scan both (backup/ first so it wins on a duplicate name). Only base volumes
     422                // end in ".aisv"; continuation parts (".aisv.2") don't match.
     423                $globs = array();
     424                $bdir  = self::backup_dir();
     425                if ( ! is_wp_error( $bdir ) ) {
     426                        $globs[] = trailingslashit( $bdir ) . '*.aisv';
     427                }
     428                $globs[] = trailingslashit( $dir ) . '*.aisv';
     429                foreach ( $globs as $glob ) {
     430                        foreach ( (array) glob( $glob ) as $path ) {
     431                                if ( ! is_file( $path ) ) {
     432                                        continue;
     433                                }
     434                                $base = basename( $path );
     435                                if ( isset( $seen[ $base ] ) ) {
     436                                        continue;
     437                                }
     438                                $seen[ $base ] = true;
     439                                $vols          = self::volumes_for( $path );
     440                                $size          = 0;
     441                                foreach ( $vols as $v ) {
     442                                        $size += (int) filesize( $v );
     443                                }
     444                                $out[] = array(
     445                                        'file'    => $base,
     446                                        'path'    => $path,
     447                                        'size'    => $size,
     448                                        'mtime'   => (int) filemtime( $path ),
     449                                        'volumes' => count( $vols ),
     450                                );
     451                        }
    416452                }
    417453                usort( $out, static function ( $a, $b ) { return $b['mtime'] <=> $a['mtime']; } );
    … …  
    433469                if ( is_wp_error( $dir ) ) {
    434470                        return false;
     471                }
     472                // Prefer the backup/ sub-folder (new location); fall back to the store root (archives
     473                // created before backup/ existed, and imported uploaded-/cloud- archives).
     474                $bdir = self::backup_dir();
     475                if ( ! is_wp_error( $bdir ) ) {
     476                        $bpath = trailingslashit( $bdir ) . $file;
     477                        if ( is_file( $bpath ) ) {
     478                                return $bpath;
     479                        }
    435480                }
    436481                $path = trailingslashit( $dir ) . $file;
  • ai-siteark/trunk/includes/jobs/class-backup-runner.php

    r3657840 r3664708  
    9090                $gw      = new Job_Gateway();
    9191                $id      = $gw->insert( 'backup', array( 'phase' => 'prepare' ) );
    92                 $archive = trailingslashit( $store ) . Local_Store::filename();
     92                // New backups go into the backup/ sub-folder (falls back to the store root on error).
     93                $bstore  = Local_Store::backup_dir();
     94                $dest    = is_wp_error( $bstore ) ? $store : $bstore;
     95                $archive = trailingslashit( $dest ) . Local_Store::filename();
    9396                $work    = Local_Store::work_dir( $id );
    9497                if ( is_wp_error( $work ) ) {
  • ai-siteark/trunk/readme.txt

    r3657880 r3664708  
    33Tags: backup, restore, migration, clone, database
    44Requires at least: 6.0
    5 Tested up to: 7.0
     5Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.9.4
     7Stable tag: 2.9.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7676== Changelog ==
    7777
    78 = 2.9.4 =
     78= 2.9.5 =
    7979AI-SiteArk backs up, restores and migrates your entire WordPress site — the full database and your files — into a single portable, integrity-checked .aisv archive, with optional AES-256 password encryption and authenticated (tamper-evident) backups. Restore in place, or migrate to a new domain or host with automatic, serialization-safe URL/path rewriting. Backups run as memory-safe, resumable background jobs, so they work on large sites and modest hosting.
    8080
Note: See TracChangeset for help on using the changeset viewer.