Changeset 1240

Show
Ignore:
Timestamp:
04/17/08 15:30:41 (8 months ago)
Author:
donncha
Message:

Replace glob(), it may be disabled on some hosts. fixes #594

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-settings.php

    r1218 r1240  
    327327        define( 'MUPLUGINDIR', 'wp-content/mu-plugins' ); 
    328328 
    329 $plugins = glob( ABSPATH . MUPLUGINDIR . '/*.php' ); 
    330 if( is_array( $plugins ) ) { 
    331         foreach ( $plugins as $plugin ) { 
    332                 if( is_file( $plugin ) ) 
    333                         include_once( $plugin ); 
     329if( is_dir( ABSPATH . MUPLUGINDIR ) ) { 
     330        if( $dh = opendir( ABSPATH . MUPLUGINDIR ) ) { 
     331                while( ( $plugin = readdir( $dh ) ) !== false ) { 
     332                        if( substr( $plugin, -4 ) == '.php' ) { 
     333                                include_once( ABSPATH . MUPLUGINDIR . '/' . $plugin ); 
     334                        } 
     335                } 
    334336        } 
    335337}