Skip to content

Commit

Permalink
Check posix_* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexantr committed Mar 15, 2016
1 parent c4770e8 commit 1f08f93
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions filemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,8 +952,13 @@
$img = $is_link ? 'icon-link_folder' : 'icon-folder';
$modif = date("d.m.y H:i", filemtime($path . '/' . $f));
$perms = substr(decoct(fileperms($path . '/' . $f)), -4);
$owner = posix_getpwuid(fileowner($path . '/' . $f));
$group = posix_getgrgid(filegroup($path . '/' . $f));
if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
$owner = posix_getpwuid(fileowner($path . '/' . $f));
$group = posix_getgrgid(filegroup($path . '/' . $f));
} else {
$owner = '?';
$group = '?';
}
?>
<tr>
<?php if (!READONLY): ?><td><label><input type="checkbox" name="file[]" value="<?php echo encode_html($f) ?>"></label></td><?php endif; ?>
Expand Down Expand Up @@ -981,8 +986,13 @@
$filelink = get_file_link($p, $f);
$all_files_size += $filesize_raw;
$perms = substr(decoct(fileperms($path . '/' . $f)), -4);
$owner = posix_getpwuid(fileowner($path . '/' . $f));
$group = posix_getgrgid(filegroup($path . '/' . $f));
if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
$owner = posix_getpwuid(fileowner($path . '/' . $f));
$group = posix_getgrgid(filegroup($path . '/' . $f));
} else {
$owner = '?';
$group = '?';
}
?>
<tr>
<?php if (!READONLY): ?><td><label><input type="checkbox" name="file[]" value="<?php echo encode_html($f) ?>"></label></td><?php endif; ?>
Expand Down

0 comments on commit 1f08f93

Please sign in to comment.