Plugin Directory

Changeset 3252831


Ignore:
Timestamp:
03/09/2025 12:50:00 PM (10 months ago)
Author:
paultgoodchild
Message:

publish 5.1.3

Location:
worpit-admin-dashboard-plugin/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • worpit-admin-dashboard-plugin/trunk

  • worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Database/Operators/Table/EnumTablePrimaryKeys.php

    r3252069 r3252831  
    77    public function all() :array {
    88        return \array_merge(
    9             $this->wordpress(),
     9            $this->wordpressStd(),
     10            $this->wordpressMS(),
    1011            $this->woocommerce(),
    1112            $this->gravityForms(),
    1213            $this->edd(),
     14            $this->wpml(),
    1315        );
    1416    }
     
    5254    }
    5355
    54     private function wordpress() :array {
     56    public function wordpressStd() :array {
    5557        return [
    56             'blogs'         => 'blog_id',
    57             'blogmeta'      => 'meta_id',
    5858            'comments'      => 'comment_ID',
    5959            'commentsmeta'  => 'meta_id',
     
    6868            'usermeta'      => 'umeta_id',
    6969            'users'         => 'ID',
     70        ];
     71    }
    7072
     73    public function wordpressMS() :array {
     74        return [
     75            'blogs'            => 'blog_id',
     76            'blogmeta'         => 'meta_id',
    7177            'registration_log' => 'ID',
    7278            'site'             => 'id',
    7379            'sitemeta'         => 'meta_id',
    7480            'signups'          => 'signup_id',
     81        ];
     82    }
     83
     84    /**
     85     * https://github.com/woocommerce/woocommerce/wiki/Database-Description
     86     */
     87    private function wpml() :array {
     88        return [
     89            'icl_background_task'        => 'task_id',
     90            'icl_core_status'            => 'id',
     91            'icl_flags'                  => 'id',
     92            'icl_languages_translations' => 'id',
     93            'icl_node'                   => 'nid',
     94            'icl_string_batches'         => 'id',
     95            'icl_string_status'          => 'id',
     96            'icl_string_translations'    => 'id',
     97            'icl_translate'              => 'tid',
     98            'icl_translate_job'          => 'job_id',
     99            'icl_translation_status'     => 'rid',
    75100        ];
    76101    }
  • worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Database/Operators/Table/TableHelper.php

    r3252169 r3252831  
    8787        else {
    8888            $key = ( new EnumTablePrimaryKeys() )->all()[ $unPrefixed ] ?? null;
     89            if ( empty( $key ) && \function_exists( 'is_multisite' ) && is_multisite()
     90                 && \preg_match( '#^\d+_(.+)#', $unPrefixed, $matches ) ) {
     91                $key = ( new EnumTablePrimaryKeys() )->wordpressStd()[ $matches[ 1 ] ] ?? null;
     92            }
    8993        }
    9094        return $key;
  • worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Filesystem/Map/MapHandler.php

    r3252210 r3252831  
    3737
    3838        $map = new Listing\SqliteFileListing( $this->pathToDB() );
    39         $track = new MapProgressTracker( $this->loadProgress() );
     39        $track = $this->loadProgress();
    4040        $mapper = new MapDir( $map, $track, $this->excluder, $this->mapVO->dir, $this->mapVO->hashAlgo, $this->stopAtTS );
    4141        try {
     
    4747        catch ( TimeLimitReachedException $e ) {
    4848            $map->finishLargeListing( true );
    49             // we "save" our state
    50             FileSystem::Instance()
    51                       ->putFileContents( path_join( $this->workingDir(), 'dir_tracker.json' ), wp_json_encode( $track->completed() ) );
     49            FileSystem::Instance()->putFileContents(
     50                $this->pathToProgress(),
     51                wp_json_encode( [
     52                    'completed_dirs'       => $track->completed(),
     53                    'total_completed_dirs' => $track->total(),
     54                ] )
     55            );
    5256        }
    5357        catch ( \Exception $e ) {
     
    5761
    5862        return [
    59             'href'           => $completed ? $this->mapURL() : '',
    60             'completed_dirs' => \count( $track->completed() ),
    61             'map_count'      => $map->count(),
     63            'href'                 => $completed ? $this->mapURL() : '',
     64            'completed_dirs'       => \count( $track->completed() ),
     65            'total_completed_dirs' => $track->total(),
     66            'map_count'            => $map->count(),
    6267        ];
     68    }
     69
     70    protected function dbFile() :string {
     71        return 'map.sqlite';
    6372    }
    6473
     
    6776    }
    6877
    69     protected function dbFile() :string {
    70         return 'map.sqlite';
     78    protected function pathToProgress() :string {
     79        return path_join( $this->workingDir(), $this->dbFile().'_progress.json' );
    7180    }
    7281
    73     private function loadProgress() :array {
    74         $tracker = path_join( $this->workingDir(), $this->dbFile().'_tracker.json' );
     82    /**
     83     * @throws \Exception
     84     */
     85    private function loadProgress() :MapProgressTracker {
    7586        $progress = [];
    76         if ( \is_file( $tracker ) ) {
    77             $raw = FileSystem::Instance()->getContents( $tracker );
     87        $total = 0;
     88        if ( \is_file( $this->pathToProgress() ) ) {
     89            $raw = FileSystem::Instance()->getContents( $this->pathToProgress() );
    7890            if ( !empty( $raw ) ) {
    79                 $progress = \json_decode( $raw, true );
     91                $rawProgress = \json_decode( $raw, true );
     92                if ( !empty( $rawProgress ) && \is_array( $rawProgress ) ) {
     93                    [ 'completed_dirs' => $progress, 'total_completed_dirs' => $total ] = $rawProgress;
     94                }
    8095            }
    8196        }
    82         return \is_array( $progress ) ? $progress : [];
     97        return new MapProgressTracker( $progress, $total );
    8398    }
    8499
  • worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Filesystem/Map/MapProgressTracker.php

    r3249489 r3252831  
    77    private array $completedDirs;
    88
    9     /**
    10      * @throws \Exception
    11      */
    12     public function __construct( array $completedDirs = [] ) {
     9    private int $totalDirsComplete;
     10
     11    public function __construct( array $completedDirs = [], int $totalDirsComplete = 0 ) {
    1312        $this->completedDirs = $completedDirs;
     13        $this->totalDirsComplete = $totalDirsComplete;
    1414    }
    1515
    1616    public function completed() :array {
    1717        return $this->completedDirs;
     18    }
     19
     20    public function total() :int {
     21        return $this->totalDirsComplete;
    1822    }
    1923
     
    4347        $this->completedDirs = \array_filter( $this->completedDirs );
    4448        $this->completedDirs[ $dir ] = true;
     49        $this->totalDirsComplete++;
    4550    }
    4651}
  • worpit-admin-dashboard-plugin/trunk/plugin-spec.php

    r3252210 r3252831  
    11{
    22  "properties":   {
    3     "version":                 "5.1.2",
    4     "release_timestamp":       1741358000,
    5     "build":                   "202503.0703",
     3    "version":                 "5.1.3",
     4    "release_timestamp":       1741522000,
     5    "build":                   "202503.0901",
    66    "slug_parent":             "icwp",
    77    "slug_plugin":             "app",
  • worpit-admin-dashboard-plugin/trunk/readme.txt

    r3252210 r3252831  
    88Recommended PHP: 7.4
    99Tested up to: 6.7
    10 Stable tag: 5.1.2
     10Stable tag: 5.1.3
    1111
    1212Manage all your WordPress sites in one place - updates, uptime, backups & security.
     
    121121*Released: March 2025*
    122122
     123* **(.3)  FIXED**:      Some fixes and improvements to file mapping logic.
     124* **(.3)  IMPROVED**:   Improved support for multisite db table exports.
    123125* **(.2)  IMPROVED**:   Improvements to rapid DB exports for larger DB tables.
    124126
  • worpit-admin-dashboard-plugin/trunk/worpit.php

    r3252210 r3252831  
    44 * Plugin URI: https://icwp.io/home
    55 * Description: All-In-One Multiple WordPress Site Management - Backups, Security, Updates, and Uptime Monitoring
    6  * Version: 5.1.2
     6 * Version: 5.1.3
    77 * Author: iControlWP
    88 * Author URI: https://www.icontrolwp.com/
Note: See TracChangeset for help on using the changeset viewer.