Changeset 33481
- Timestamp:
- 07/29/2015 06:52:42 AM (9 years ago)
- Location:
- branches/4.2/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-admin/includes/class-wp-upgrader.php
r31991 r33481 973 973 // Check the folder contains at least 1 valid plugin. 974 974 $plugins_found = false; 975 foreach ( glob( $working_directory . '*.php' ) as $file ) { 976 $info = get_plugin_data($file, false, false); 977 if ( !empty( $info['Name'] ) ) { 978 $plugins_found = true; 979 break; 975 $files = glob( $working_directory . '*.php' ); 976 if ( $files ) { 977 foreach ( $files as $file ) { 978 $info = get_plugin_data( $file, false, false ); 979 if ( ! empty( $info['Name'] ) ) { 980 $plugins_found = true; 981 break; 982 } 980 983 } 981 984 } -
branches/4.2/src/wp-admin/includes/update-core.php
r32386 r33481 1250 1250 } 1251 1251 1252 foreach ( glob( $directory . '*', GLOB_ONLYDIR ) as $dir ) { 1253 $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) ); 1252 $dirs = glob( $directory . '*', GLOB_ONLYDIR ); 1253 if ( $dirs ) { 1254 foreach ( $dirs as $dir ) { 1255 $files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) ); 1256 } 1254 1257 } 1255 1258 -
branches/4.2/src/wp-includes/l10n.php
r31447 r33481 764 764 $languages = array(); 765 765 766 foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 767 $lang_file = basename($lang_file, '.mo'); 768 if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) && 769 0 !== strpos( $lang_file, 'admin-' )) 770 $languages[] = $lang_file; 766 $lang_files = glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ); 767 if ( $lang_files ) { 768 foreach( $lang_files as $lang_file ) { 769 $lang_file = basename( $lang_file, '.mo' ); 770 if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) && 771 0 !== strpos( $lang_file, 'admin-' ) ) { 772 $languages[] = $lang_file; 773 } 774 } 771 775 } 772 776
Note: See TracChangeset
for help on using the changeset viewer.