mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
		
			
				
	
	
		
			27 lines
		
	
	
		
			731 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			731 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
// This is an include so that we don't lose variable scope.
 | 
						|
 | 
						|
  if ($include_dir_regexp == "" || !isset($include_dir_regexp))
 | 
						|
  {
 | 
						|
    $include_dir_regexp = "/\.inc\.php$/";
 | 
						|
  }
 | 
						|
 | 
						|
  if ($handle = opendir($config['install_dir'] . '/' . $include_dir))
 | 
						|
  {
 | 
						|
    while (false !== ($file = readdir($handle)))
 | 
						|
    {
 | 
						|
      if (filetype($config['install_dir'] . '/' . $include_dir . '/' . $file) == 'file' && preg_match($include_dir_regexp, $file))
 | 
						|
      {
 | 
						|
        if ($debug) { echo("Including: " . $config['install_dir'] . '/' . $include_dir . '/' . $file . "\n"); }
 | 
						|
 | 
						|
        include($config['install_dir'] . '/' . $include_dir . '/' . $file);
 | 
						|
      }
 | 
						|
    }
 | 
						|
    closedir($handle);
 | 
						|
  }
 | 
						|
 | 
						|
  unset($include_dir_regexp, $include_dir);
 | 
						|
 | 
						|
?>
 |