Nie wiem czy to coś pomoże, ale spróbuj zmienić:
foreach( new DirectoryIterator( $custom_path ) as $f )
na:
$dir = new DirectoryIterator( $custom_path );
foreach( $dir as $f )
Jeżeli to nic nie da to mam ewentualnie tylko jeszcze jeden pomysł.
Zamień:
if( is_dir( $custom_path ) )
{
foreach( new DirectoryIterator( $custom_path ) as $f )
{
if ( ! $f->isDot() && ! $f->isDir() )
{
$file = $f->getFileName();
if( $file[0] == '.' )
{
continue;
}
if ( preg_match( "#\.conf\.php$#i", $file ) )
{
$classname = str_replace( ".conf.php", "", $file );
require( $custom_path . '/' . $file );
//-------------------------------
// Allowed to use?
//-------------------------------
if ( $CONFIG['plugin_enabled'] )
{
if( in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) && $CONFIG['plugin_key'] == 'recentActivity' )
{
continue;
}
$_position = $this->_getTabPosition( $_positions, $CONFIG['plugin_order'] );
$_tabs[ $_position ] = $CONFIG;
$_positions[] = $_position;
}
}
}
}
}
na:
if( is_dir( $custom_path ) )
{
$dir = new DirectoryIterator( $custom_path );
$files = array();
foreach( $dir as $f )
{
if ( ! $f->isDot() && ! $f->isDir() )
{
$file = $f->getFileName();
if( $file[0] == '.' )
{
continue;
}
if ( preg_match( "#\.conf\.php$#i", $file ) )
{
$files[] = $file;
}
}
}
foreach( $files as $file )
{
$classname = str_replace( ".conf.php", "", $file );
require( $custom_path . '/' . $file );
//-------------------------------
// Allowed to use?
//-------------------------------
if ( $CONFIG['plugin_enabled'] )
{
if( in_array( $this->settings['search_method'], array( 'traditional', 'sphinx' ) ) && $CONFIG['plugin_key'] == 'recentActivity' )
{
continue;
}
$_position = $this->_getTabPosition( $_positions, $CONFIG['plugin_order'] );
$_tabs[ $_position ] = $CONFIG;
$_positions[] = $_position;
}
}
}