Changeset 3252831
- Timestamp:
- 03/09/2025 12:50:00 PM (10 months ago)
- Location:
- worpit-admin-dashboard-plugin/trunk
- Files:
-
- 8 edited
-
. (modified) (1 prop)
-
lib/src/Worpdrive/Database/Operators/Table/EnumTablePrimaryKeys.php (modified) (3 diffs)
-
lib/src/Worpdrive/Database/Operators/Table/TableHelper.php (modified) (1 diff)
-
lib/src/Worpdrive/Filesystem/Map/MapHandler.php (modified) (4 diffs)
-
lib/src/Worpdrive/Filesystem/Map/MapProgressTracker.php (modified) (2 diffs)
-
plugin-spec.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
worpit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
worpit-admin-dashboard-plugin/trunk
- Property svn:mergeinfo changed
/worpit-admin-dashboard-plugin/branches/5.1 merged: 3252824
- Property svn:mergeinfo changed
-
worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Database/Operators/Table/EnumTablePrimaryKeys.php
r3252069 r3252831 7 7 public function all() :array { 8 8 return \array_merge( 9 $this->wordpress(), 9 $this->wordpressStd(), 10 $this->wordpressMS(), 10 11 $this->woocommerce(), 11 12 $this->gravityForms(), 12 13 $this->edd(), 14 $this->wpml(), 13 15 ); 14 16 } … … 52 54 } 53 55 54 p rivate function wordpress() :array {56 public function wordpressStd() :array { 55 57 return [ 56 'blogs' => 'blog_id',57 'blogmeta' => 'meta_id',58 58 'comments' => 'comment_ID', 59 59 'commentsmeta' => 'meta_id', … … 68 68 'usermeta' => 'umeta_id', 69 69 'users' => 'ID', 70 ]; 71 } 70 72 73 public function wordpressMS() :array { 74 return [ 75 'blogs' => 'blog_id', 76 'blogmeta' => 'meta_id', 71 77 'registration_log' => 'ID', 72 78 'site' => 'id', 73 79 'sitemeta' => 'meta_id', 74 80 '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', 75 100 ]; 76 101 } -
worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Database/Operators/Table/TableHelper.php
r3252169 r3252831 87 87 else { 88 88 $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 } 89 93 } 90 94 return $key; -
worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Filesystem/Map/MapHandler.php
r3252210 r3252831 37 37 38 38 $map = new Listing\SqliteFileListing( $this->pathToDB() ); 39 $track = new MapProgressTracker( $this->loadProgress());39 $track = $this->loadProgress(); 40 40 $mapper = new MapDir( $map, $track, $this->excluder, $this->mapVO->dir, $this->mapVO->hashAlgo, $this->stopAtTS ); 41 41 try { … … 47 47 catch ( TimeLimitReachedException $e ) { 48 48 $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 ); 52 56 } 53 57 catch ( \Exception $e ) { … … 57 61 58 62 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(), 62 67 ]; 68 } 69 70 protected function dbFile() :string { 71 return 'map.sqlite'; 63 72 } 64 73 … … 67 76 } 68 77 69 protected function dbFile() :string {70 return 'map.sqlite';78 protected function pathToProgress() :string { 79 return path_join( $this->workingDir(), $this->dbFile().'_progress.json' ); 71 80 } 72 81 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 { 75 86 $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() ); 78 90 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 } 80 95 } 81 96 } 82 return \is_array( $progress ) ? $progress : [];97 return new MapProgressTracker( $progress, $total ); 83 98 } 84 99 -
worpit-admin-dashboard-plugin/trunk/lib/src/Worpdrive/Filesystem/Map/MapProgressTracker.php
r3249489 r3252831 7 7 private array $completedDirs; 8 8 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 ) { 13 12 $this->completedDirs = $completedDirs; 13 $this->totalDirsComplete = $totalDirsComplete; 14 14 } 15 15 16 16 public function completed() :array { 17 17 return $this->completedDirs; 18 } 19 20 public function total() :int { 21 return $this->totalDirsComplete; 18 22 } 19 23 … … 43 47 $this->completedDirs = \array_filter( $this->completedDirs ); 44 48 $this->completedDirs[ $dir ] = true; 49 $this->totalDirsComplete++; 45 50 } 46 51 } -
worpit-admin-dashboard-plugin/trunk/plugin-spec.php
r3252210 r3252831 1 1 { 2 2 "properties": { 3 "version": "5.1. 2",4 "release_timestamp": 1741 358000,5 "build": "202503.0 703",3 "version": "5.1.3", 4 "release_timestamp": 1741522000, 5 "build": "202503.0901", 6 6 "slug_parent": "icwp", 7 7 "slug_plugin": "app", -
worpit-admin-dashboard-plugin/trunk/readme.txt
r3252210 r3252831 8 8 Recommended PHP: 7.4 9 9 Tested up to: 6.7 10 Stable tag: 5.1. 210 Stable tag: 5.1.3 11 11 12 12 Manage all your WordPress sites in one place - updates, uptime, backups & security. … … 121 121 *Released: March 2025* 122 122 123 * **(.3) FIXED**: Some fixes and improvements to file mapping logic. 124 * **(.3) IMPROVED**: Improved support for multisite db table exports. 123 125 * **(.2) IMPROVED**: Improvements to rapid DB exports for larger DB tables. 124 126 -
worpit-admin-dashboard-plugin/trunk/worpit.php
r3252210 r3252831 4 4 * Plugin URI: https://icwp.io/home 5 5 * Description: All-In-One Multiple WordPress Site Management - Backups, Security, Updates, and Uptime Monitoring 6 * Version: 5.1. 26 * Version: 5.1.3 7 7 * Author: iControlWP 8 8 * Author URI: https://www.icontrolwp.com/
Note: See TracChangeset
for help on using the changeset viewer.