Ticket #4151: 4151b.thumbnail.creation.patch
File 4151b.thumbnail.creation.patch, 704 bytes (added by , 17 years ago) |
---|
-
wp-admin/includes/image.php
88 88 elseif ( $type[2] == 3 ) { 89 89 if (!imagepng( $thumbnail, $thumbpath ) ) { 90 90 $error = __( "Thumbnail path invalid" ); 91 } 91 } 92 } 93 if( empty($error) ){ 94 // Set correct file permissions 95 $stat = stat( dirname( $thumbpath )); 96 $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bitss 97 @ chmod( $thumbpath, $perms ); 92 98 } 93 94 } 95 } else { 99 } 100 } else { 96 101 $error = __( 'File not found' ); 97 102 } 98 103