classes/code_review.php
public static function getPluginDirsInDir($dir = null) {
		if ($dir === null) {
			$dir = self::$config['pluginspath'];
		}

		$plugin_dirs = array();
		$handle = opendir($dir);

		if ($handle) {
			while ($plugin_dir = readdir($handle)) {
				// must be directory and not begin with a .
				if (substr($plugin_dir, 0, 1) !== '.' && is_dir($dir . $plugin_dir)) {
					$plugin_dirs[] = $plugin_dir;
				}
			}
		}

		sort($plugin_dirs);

		return $plugin_dirs;
	}
public static function getPluginDirsInDir($dir = null) {
		if ($dir === null) {
			$dir = self::$config['pluginspath'];
		}

		$plugin_dirs = array();
		$handle = opendir($dir);

		if ($handle) {
			while ($plugin_dir = readdir($handle)) {
				// must be directory and not begin with a .
				if (substr($plugin_dir, 0, 1) !== '.' && is_dir($dir . $plugin_dir)) {
					$plugin_dirs[] = $plugin_dir;
				}
			}
		}

		sort($plugin_dirs);

		return $plugin_dirs;
	}
public static function getPluginDirsInDir ( $ dir = null ) { if ( $ dir === null ) { $ dir = self :: $ config [ 'pluginspath' ] ; } $ plugin_dirs = array ( ) ; $ handle = opendir ( $ dir ) ; if ( $ handle ) { while ( $ plugin_dir = readdir ( $ handle ) ) { // must be directory and not begin with a . if ( substr ( $ plugin_dir , 0 , 1 ) !== '.' && is_dir ( $ dir . $ plugin_dir ) ) { $ plugin_dirs [ ] = $ plugin_dir ; } } } sort ( $ plugin_dirs ) ; return $ plugin_dirs ; }
Returns a list of plugin directory names from a base directory.
Copied from 1.9 core due to elgg_get_plugin_ids_in_dir removal in 1.9

@param string $dir A dir to scan for plugins. Defaults to config's plugins_path.
Must have a trailing slash.

@return array Array of directory names (not full paths)
Returns a list of plugin directory names from a base directory . Copied from 1 . 9 core due to elgg_get_plugin_ids_in_dir removal in 1 . 9