1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-12 11:04:01 +02:00

misterunknown: fix owner and group columns for windows systems (issue #9)

This commit is contained in:
Marco Dickert
2016-12-01 15:40:58 +01:00
parent 0781fe818c
commit 7d9ee3fe65
2 changed files with 8 additions and 8 deletions

View File

@@ -1233,8 +1233,8 @@ $(document).ready(function() {ifm.init()}); // init ifm
if(IFMConfig::showlastmodified == 1) print '<th>last modified</th>';
if(IFMConfig::showfilesize == 1) print '<th>Filesize</th>';
if(IFMConfig::showrights > 0)print '<th>Permissions</th>';
if(IFMConfig::showowner == 1) print '<th>Owner</th>';
if(IFMConfig::showgroup == 1) print '<th>Group</th>';
if(IFMConfig::showowner == 1 && function_exists( "posix_getpwuid" ) ) print '<th>Owner</th>';
if(IFMConfig::showgroup == 1 && function_exists( "posix_getgrgid" ) ) print '<th>Group</th>';
if(in_array(1,array(IFMConfig::edit,IFMConfig::rename,IFMConfig::delete,IFMConfig::zipnload,IFMConfig::extract))) print '<th><!-- column for buttons --></th>';
print '</tr>
</thead>
@@ -1349,13 +1349,13 @@ $(document).ready(function() {ifm.init()}); // init ifm
if ( function_exists( "posix_getpwuid" ) && fileowner($result) !== false ) {
$ownerarr = posix_getpwuid( fileowner( $result ) );
$item["owner"] = $ownerarr['name'];
} else $item["owner"] = "";
} else $item["owner"] = false;
}
if( IFMConfig::showgroup == 1 ) {
if( function_exists( "posix_getgrgid" ) && filegroup( $result ) !== false ) {
$grouparr = posix_getgrgid( filegroup( $result ) );
$item["group"] = $grouparr['name'];
} else $item["group"] = "";
} else $item["group"] = false;
}
if( is_dir( $result ) ) $dirs[] = $item;
else $files[] = $item;

View File

@@ -102,8 +102,8 @@ class IFM {
if(IFMConfig::showlastmodified == 1) print '<th>last modified</th>';
if(IFMConfig::showfilesize == 1) print '<th>Filesize</th>';
if(IFMConfig::showrights > 0)print '<th>Permissions</th>';
if(IFMConfig::showowner == 1) print '<th>Owner</th>';
if(IFMConfig::showgroup == 1) print '<th>Group</th>';
if(IFMConfig::showowner == 1 && function_exists( "posix_getpwuid" ) ) print '<th>Owner</th>';
if(IFMConfig::showgroup == 1 && function_exists( "posix_getgrgid" ) ) print '<th>Group</th>';
if(in_array(1,array(IFMConfig::edit,IFMConfig::rename,IFMConfig::delete,IFMConfig::zipnload,IFMConfig::extract))) print '<th><!-- column for buttons --></th>';
print '</tr>
</thead>
@@ -218,13 +218,13 @@ class IFM {
if ( function_exists( "posix_getpwuid" ) && fileowner($result) !== false ) {
$ownerarr = posix_getpwuid( fileowner( $result ) );
$item["owner"] = $ownerarr['name'];
} else $item["owner"] = "";
} else $item["owner"] = false;
}
if( IFMConfig::showgroup == 1 ) {
if( function_exists( "posix_getgrgid" ) && filegroup( $result ) !== false ) {
$grouparr = posix_getgrgid( filegroup( $result ) );
$item["group"] = $grouparr['name'];
} else $item["group"] = "";
} else $item["group"] = false;
}
if( is_dir( $result ) ) $dirs[] = $item;
else $files[] = $item;