Ticket #33093: 33093.patch
File 33093.patch, 2.4 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-wp-upgrader.php
1058 1058 1059 1059 // Check the folder contains at least 1 valid plugin. 1060 1060 $plugins_found = false; 1061 foreach ( glob( $working_directory . '*.php' ) as $file ) { 1062 $info = get_plugin_data($file, false, false); 1063 if ( !empty( $info['Name'] ) ) { 1064 $plugins_found = true; 1065 break; 1061 $files = glob( $working_directory . '*.php' ); 1062 if ( $files ) { 1063 foreach ( $files as $file ) { 1064 $info = get_plugin_data($file, false, false); 1065 if ( !empty( $info['Name'] ) ) { 1066 $plugins_found = true; 1067 break; 1068 } 1066 1069 } 1067 1070 } 1068 1071 -
src/wp-admin/includes/update-core.php
1273 1273 $files[] = "{$directory}example.html"; 1274 1274 } 1275 1275 1276 foreach ( glob( $directory . '*', GLOB_ONLYDIR ) as $dir ) { 1277 $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) ); 1276 $dirs = glob( $directory . '*', GLOB_ONLYDIR ); 1277 if ($dirs ) { 1278 foreach ( $dirs as $dir ) { 1279 $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) ); 1280 } 1278 1281 } 1279 1282 1280 1283 return $files; -
src/wp-includes/l10n.php
774 774 function get_available_languages( $dir = null ) { 775 775 $languages = array(); 776 776 777 foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 778 $lang_file = basename($lang_file, '.mo'); 779 if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) && 780 0 !== strpos( $lang_file, 'admin-' )) 781 $languages[] = $lang_file; 777 $lang_files = glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ); 778 if ( $lang_files ) { 779 foreach( $lang_files as $lang_file ) { 780 $lang_file = basename($lang_file, '.mo'); 781 if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) && 782 0 !== strpos( $lang_file, 'admin-' )) { 783 $languages[] = $lang_file; 784 } 785 } 782 786 } 783 787 784 788 return $languages;