Changeset 2245014
- Timestamp:
- 02/16/2020 04:37:09 AM (6 years ago)
- Location:
- do-spaces-sync
- Files:
-
- 6 edited
- 1 copied
-
tags/2.2.0 (copied) (copied from do-spaces-sync/trunk)
-
tags/2.2.0/dos_class.php (modified) (3 diffs)
-
tags/2.2.0/loader.php (modified) (1 diff)
-
tags/2.2.0/readme.txt (modified) (2 diffs)
-
trunk/dos_class.php (modified) (3 diffs)
-
trunk/loader.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
do-spaces-sync/tags/2.2.0/dos_class.php
r2134607 r2245014 184 184 $new_filename = $filename; 185 185 $fileparts = pathinfo($filename); 186 187 while ( $filesystem->has( $ subdir . "/$new_filename") ) {186 $cdnPath = rtrim($this->storage_path,'/') . '/' . ltrim($subdir,'/') . '/' . $new_filename; 187 while ( $filesystem->has( $cdnPath ) ) { 188 188 $new_filename = $fileparts['filename'] . "-$number." . $fileparts['extension']; 189 189 $number = (int) $number + 1; 190 $cdnPath = rtrim($this->storage_path,'/') . '/' . ltrim($subdir,'/') . '/' . $new_filename; 190 191 } 191 192 … … 228 229 229 230 $path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $metadata['file']; 230 array_push($paths, $path); 231 232 if ( !in_array($path, $paths) ) { 233 array_push($paths, $path); 234 } 231 235 232 236 // set basepath for other sizes … … 268 272 // METHODS 269 273 public function test_connection () { 270 274 if($_SERVER['REQUEST_METHOD'] === 'POST'){ 275 $postData = $_POST; 276 $keys = ['key' => 'dos_key','secret' => 'dos_secret','endpoint' => 'dos_endpoint','container' => 'dos_container']; 277 foreach ($keys as $prop => $key) { 278 if(isset($postData[$key])){ 279 $this->$prop = $postData[$key]; 280 } 281 } 282 } 271 283 try { 272 284 -
do-spaces-sync/tags/2.2.0/loader.php
r2134611 r2245014 4 4 * Plugin URI: https://github.com/keeross/DO-Spaces-Wordpress-Sync 5 5 * Description: This WordPress plugin syncs your media library with DigitalOcean Spaces Container. 6 * Version: 2. 1.06 * Version: 2.2.0 7 7 * Author: keeross 8 8 * Author URI: https://github.com/keeross -
do-spaces-sync/tags/2.2.0/readme.txt
r2134611 r2245014 4 4 Tags: digitalocean, spaces, cloud, storage, object, s3 5 5 Requires at least: 4.6 6 Tested up to: 5. 2.27 Stable tag: 2. 1.06 Tested up to: 5.3.2 7 Stable tag: 2.2.0 8 8 License: MIT 9 9 License URI: https://opensource.org/licenses/MIT … … 46 46 47 47 == Changelog == 48 49 = 2.2.0 = 50 * Fix Test Connection ignore post data (https://github.com/keeross/DigitalOcean-Spaces-Sync/pull/27) 51 * Fix dupe files in delete attachment (https://github.com/keeross/DigitalOcean-Spaces-Sync/pull/33) 48 52 49 53 = 2.1.0 = -
do-spaces-sync/trunk/dos_class.php
r2134607 r2245014 184 184 $new_filename = $filename; 185 185 $fileparts = pathinfo($filename); 186 187 while ( $filesystem->has( $ subdir . "/$new_filename") ) {186 $cdnPath = rtrim($this->storage_path,'/') . '/' . ltrim($subdir,'/') . '/' . $new_filename; 187 while ( $filesystem->has( $cdnPath ) ) { 188 188 $new_filename = $fileparts['filename'] . "-$number." . $fileparts['extension']; 189 189 $number = (int) $number + 1; 190 $cdnPath = rtrim($this->storage_path,'/') . '/' . ltrim($subdir,'/') . '/' . $new_filename; 190 191 } 191 192 … … 228 229 229 230 $path = $upload_dir['basedir'] . DIRECTORY_SEPARATOR . $metadata['file']; 230 array_push($paths, $path); 231 232 if ( !in_array($path, $paths) ) { 233 array_push($paths, $path); 234 } 231 235 232 236 // set basepath for other sizes … … 268 272 // METHODS 269 273 public function test_connection () { 270 274 if($_SERVER['REQUEST_METHOD'] === 'POST'){ 275 $postData = $_POST; 276 $keys = ['key' => 'dos_key','secret' => 'dos_secret','endpoint' => 'dos_endpoint','container' => 'dos_container']; 277 foreach ($keys as $prop => $key) { 278 if(isset($postData[$key])){ 279 $this->$prop = $postData[$key]; 280 } 281 } 282 } 271 283 try { 272 284 -
do-spaces-sync/trunk/loader.php
r2134611 r2245014 4 4 * Plugin URI: https://github.com/keeross/DO-Spaces-Wordpress-Sync 5 5 * Description: This WordPress plugin syncs your media library with DigitalOcean Spaces Container. 6 * Version: 2. 1.06 * Version: 2.2.0 7 7 * Author: keeross 8 8 * Author URI: https://github.com/keeross -
do-spaces-sync/trunk/readme.txt
r2134611 r2245014 4 4 Tags: digitalocean, spaces, cloud, storage, object, s3 5 5 Requires at least: 4.6 6 Tested up to: 5. 2.27 Stable tag: 2. 1.06 Tested up to: 5.3.2 7 Stable tag: 2.2.0 8 8 License: MIT 9 9 License URI: https://opensource.org/licenses/MIT … … 46 46 47 47 == Changelog == 48 49 = 2.2.0 = 50 * Fix Test Connection ignore post data (https://github.com/keeross/DigitalOcean-Spaces-Sync/pull/27) 51 * Fix dupe files in delete attachment (https://github.com/keeross/DigitalOcean-Spaces-Sync/pull/33) 48 52 49 53 = 2.1.0 =
Note: See TracChangeset
for help on using the changeset viewer.