Changeset 5867
- Timestamp:
- 08/14/2007 02:58:33 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import.php
r5204 r5867 15 15 $import_loc = 'wp-admin/import'; 16 16 $import_root = ABSPATH.$import_loc; 17 $imports_dir = @ dir($import_root);17 $imports_dir = @ opendir($import_root); 18 18 if ($imports_dir) { 19 while (($file = $imports_dir->read()) !== false) {19 while (($file = readdir($imports_dir) !== false) { 20 20 if ($file{0} == '.') { 21 21 continue; … … 25 25 } 26 26 } 27 @closedir($imports_dir); 27 28 28 29 $importers = get_importers(); -
trunk/wp-admin/includes/plugin.php
r5803 r5867 43 43 44 44 // Files in wp-content/plugins directory 45 $plugins_dir = @ dir( $plugin_root);45 $plugins_dir = @ opendir( $plugin_root); 46 46 if ( $plugins_dir ) { 47 while (($file = $plugins_dir->read() ) !== false ) {47 while (($file = readdir( $plugins_dir ) ) !== false ) { 48 48 if ( substr($file, 0, 1) == '.' ) 49 49 continue; 50 50 if ( is_dir( $plugin_root.'/'.$file ) ) { 51 $plugins_subdir = @ dir( $plugin_root.'/'.$file );51 $plugins_subdir = @ opendir( $plugin_root.'/'.$file ); 52 52 if ( $plugins_subdir ) { 53 while (($subfile = $plugins_subdir->read() ) !== false ) {53 while (($subfile = readdir( $plugins_subdir ) ) !== false ) { 54 54 if ( substr($subfile, 0, 1) == '.' ) 55 55 continue; … … 64 64 } 65 65 } 66 @closedir( $plugins_dir ); 67 @closedir( $plugins_subdir ); 66 68 67 69 if ( !$plugins_dir || !$plugin_files ) -
trunk/wp-admin/includes/upgrade.php
r5825 r5867 1104 1104 //$files = array('index.php', 'comments.php', 'comments-popup.php', 'footer.php', 'header.php', 'sidebar.php', 'style.css'); 1105 1105 1106 $theme_dir = @ dir("$default_dir");1106 $theme_dir = @ opendir("$default_dir"); 1107 1107 if ($theme_dir) { 1108 while(($theme_file = $theme_dir->read()) !== false) {1108 while(($theme_file = readdir( $theme_dir )) !== false) { 1109 1109 if (is_dir("$default_dir/$theme_file")) 1110 1110 continue; … … 1114 1114 } 1115 1115 } 1116 @closedir($theme_dir); 1116 1117 1117 1118 // Rewrite the theme header. … … 1137 1138 } 1138 1139 1139 $images_dir = @ dir("$default_dir/images");1140 $images_dir = @ opendir("$default_dir/images"); 1140 1141 if ($images_dir) { 1141 while(($image = $images_dir->read()) !== false) {1142 while(($image = readdir($images_dir)) !== false) { 1142 1143 if (is_dir("$default_dir/images/$image")) 1143 1144 continue; … … 1147 1148 } 1148 1149 } 1150 @closedir($images_dir); 1149 1151 } 1150 1152 -
trunk/wp-includes/theme.php
r5700 r5867 119 119 120 120 // Files in wp-content/themes directory and one subdir down 121 $themes_dir = @ dir($theme_root);121 $themes_dir = @ opendir($theme_root); 122 122 if ( !$themes_dir ) 123 123 return false; 124 124 125 while ( ($theme_dir = $themes_dir->read()) !== false ) {125 while ( ($theme_dir = readdir($themes_dir)) !== false ) { 126 126 if ( is_dir($theme_root . '/' . $theme_dir) && is_readable($theme_root . '/' . $theme_dir) ) { 127 127 if ( $theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS' ) 128 128 continue; 129 $stylish_dir = @ dir($theme_root . '/' . $theme_dir);129 $stylish_dir = @ opendir($theme_root . '/' . $theme_dir); 130 130 $found_stylesheet = false; 131 while ( ($theme_file = $stylish_dir->read()) !== false ) {131 while ( ($theme_file = readdir($stylish_dir)) !== false ) { 132 132 if ( $theme_file == 'style.css' ) { 133 133 $theme_files[] = $theme_dir . '/' . $theme_file; … … 136 136 } 137 137 } 138 @closedir($stylish_dir); 138 139 if ( !$found_stylesheet ) { // look for themes in that dir 139 140 $subdir = "$theme_root/$theme_dir"; 140 141 $subdir_name = $theme_dir; 141 $theme_subdir = @ dir( $subdir );142 while ( ($theme_dir = $theme_subdir->read()) !== false ) {142 $theme_subdir = @ opendir( $subdir ); 143 while ( ($theme_dir = readdir($theme_subdir)) !== false ) { 143 144 if ( is_dir( $subdir . '/' . $theme_dir) && is_readable($subdir . '/' . $theme_dir) ) { 144 145 if ( $theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS' ) 145 146 continue; 146 $stylish_dir = @ dir($subdir . '/' . $theme_dir);147 $stylish_dir = @ opendir($subdir . '/' . $theme_dir); 147 148 $found_stylesheet = false; 148 while ( ($theme_file = $stylish_dir->read()) !== false ) {149 while ( ($theme_file = readdir($stylish_dir)) !== false ) { 149 150 if ( $theme_file == 'style.css' ) { 150 151 $theme_files[] = $subdir_name . '/' . $theme_dir . '/' . $theme_file; … … 153 154 } 154 155 } 156 @closedir($stylish_dir); 155 157 } 156 158 } 159 @closedir($theme_subdir); 157 160 $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.')); 158 161 } 159 162 } 160 163 } 164 @closedir($theme_dir); 161 165 162 166 if ( !$themes_dir || !$theme_files )
Note: See TracChangeset
for help on using the changeset viewer.