Code Duplication    Length = 8-10 lines in 2 locations

php/elFinderVolumeLocalFileSystem.class.php 2 locations

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