Changeset 10050
- Timestamp:
- 07/10/2020 02:46:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r10046 r10050 417 417 ); 418 418 419 $asset_limits = array( 420 'screenshot' => 10 * MB_IN_BYTES, 421 'banner' => 4 * MB_IN_BYTES, 422 'icon' => 1 * MB_IN_BYTES, 423 ); 424 419 425 $svn_assets_folder = SVN::ls( self::PLUGIN_SVN_BASE . "/{$plugin_slug}/assets/", true /* verbose */ ); 420 426 if ( $svn_assets_folder ) { // /assets/ may not exist. … … 425 431 } 426 432 433 // Don't import oversize assets. 434 if ( $asset['filesize'] > $asset_limits[ $m['type'] ] ) { 435 continue; 436 } 437 427 438 $type = $m['type']; 428 439 $filename = $asset['filename']; … … 444 455 if ( isset( $assets['screenshot'][ $filename ] ) ) { 445 456 // Skip it, it exists within /assets/ already 457 continue; 458 } 459 460 // Don't import oversize assets. 461 if ( filesize( $plugin_screenshot ) > $asset_limits['screenshot'] ) { 446 462 continue; 447 463 }
Note: See TracChangeset
for help on using the changeset viewer.