Code Duplication    Length = 8-10 lines in 2 locations

php/elFinderVolumeLocalFileSystem.class.php 2 locations

@@ 491-498 (lines=8) @@
488
		
489
		if ($uid) {
490
			$stat['isowner'] = ($phpuid == $uid);
491
			if (isset($names['uid'][$uid])) {
492
				$stat['owner'] = $names['uid'][$uid];
493
			} else if (is_callable('posix_getpwuid')) {
494
				$pwuid = posix_getpwuid($uid);
495
				$stat['owner'] = $names['uid'][$uid] = $pwuid['name'];
496
			} else {
497
				$stat['owner'] = $names['uid'][$uid] = $uid;
498
			}
499
		}
500
		if ($gid) {
501
			if (isset($names['gid'][$gid])) {
@@ 500-509 (lines=10) @@
497
				$stat['owner'] = $names['uid'][$uid] = $uid;
498
			}
499
		}
500
		if ($gid) {
501
			if (isset($names['gid'][$gid])) {
502
				$stat['group'] = $names['gid'][$gid];
503
			} else if (is_callable('posix_getgrgid')) {
504
				$grgid = posix_getgrgid($gid);
505
				$stat['group'] = $names['gid'][$gid] = $grgid['name'];
506
			} else {
507
				$stat['group'] = $names['gid'][$gid] = $gid;
508
			}
509
		}
510
		
511
		return $stat;
512
	}