diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-17 15:30:41 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-17 15:30:41 +0000 |
commit | aa4400ef99f78686c0294928ad0c5541ed6ff351 (patch) | |
tree | 67dec56cf6a21dde73bfec40fd58ad131c4476ed /wp-settings.php | |
parent | f656f5af9fecdb95d183609c8968194aeac3c940 (diff) | |
download | wordpress-mu-aa4400ef99f78686c0294928ad0c5541ed6ff351.tar.gz wordpress-mu-aa4400ef99f78686c0294928ad0c5541ed6ff351.tar.xz wordpress-mu-aa4400ef99f78686c0294928ad0c5541ed6ff351.zip |
Replace glob(), it may be disabled on some hosts. fixes #594
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1240 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-settings.php')
-rw-r--r-- | wp-settings.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/wp-settings.php b/wp-settings.php index d833aa8..9554dc5 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -326,11 +326,13 @@ $wpdb->hide_errors(); if( defined( 'MUPLUGINDIR' ) == false ) define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); -$plugins = glob( ABSPATH . MUPLUGINDIR . '/*.php' ); -if( is_array( $plugins ) ) { - foreach ( $plugins as $plugin ) { - if( is_file( $plugin ) ) - include_once( $plugin ); +if( is_dir( ABSPATH . MUPLUGINDIR ) ) { + if( $dh = opendir( ABSPATH . MUPLUGINDIR ) ) { + while( ( $plugin = readdir( $dh ) ) !== false ) { + if( substr( $plugin, -4 ) == '.php' ) { + include_once( ABSPATH . MUPLUGINDIR . '/' . $plugin ); + } + } } } $wpdb->show_errors(); |