Code Duplication    Length = 8-10 lines in 2 locations

php/elFinderVolumeLocalFileSystem.class.php 2 locations

@@ 514-521 (lines=8) @@
511
		
512
		if ($uid) {
513
			$stat['isowner'] = ($phpuid == $uid);
514
			if (isset($names['uid'][$uid])) {
515
				$stat['owner'] = $names['uid'][$uid];
516
			} else if (is_callable('posix_getpwuid')) {
517
				$pwuid = posix_getpwuid($uid);
518
				$stat['owner'] = $names['uid'][$uid] = $pwuid['name'];
519
			} else {
520
				$stat['owner'] = $names['uid'][$uid] = $uid;
521
			}
522
		}
523
		if ($gid) {
524
			if (isset($names['gid'][$gid])) {
@@ 523-532 (lines=10) @@
520
				$stat['owner'] = $names['uid'][$uid] = $uid;
521
			}
522
		}
523
		if ($gid) {
524
			if (isset($names['gid'][$gid])) {
525
				$stat['group'] = $names['gid'][$gid];
526
			} else if (is_callable('posix_getgrgid')) {
527
				$grgid = posix_getgrgid($gid);
528
				$stat['group'] = $names['gid'][$gid] = $grgid['name'];
529
			} else {
530
				$stat['group'] = $names['gid'][$gid] = $gid;
531
			}
532
		}
533
		
534
		return $stat;
535
	}