Code Duplication    Length = 5-6 lines in 2 locations

ecrire/exec/admin_plugin.php 1 location

@@ 302-306 (lines=5) @@
299
		if (is_dir($dir = $d . 'lib/')
300
			and $t = opendir($dir)
301
		) {
302
			while (($f = readdir($t)) !== false) {
303
				if ($f[0] != '.'
304
					and is_dir("$dir/$f")
305
				) {
306
					$libs[$f] = $dir;
307
				}
308
			}
309
		}

ecrire/inc/plugin.php 1 location

@@ 105-110 (lines=6) @@
102
103
	$subdirs = array();
104
	if (@is_dir($dir) and is_readable($dir) and $d = opendir($dir)) {
105
		while (($f = readdir($d)) !== false) {
106
			if ($f[0] != '.' # ignorer . .. .svn etc
107
				and $f != 'CVS'
108
				and is_dir($f = "$dir/$f")
109
			) {
110
				$subdirs[] = $f;
111
			}
112
		}
113
		closedir($d);