fix undefined index when loading files app
This commit is contained in:
parent
46071fed80
commit
41a61bc637
|
@ -66,9 +66,7 @@ foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $i ) {
|
|||
$i['extension']='';
|
||||
}
|
||||
}
|
||||
if($i['directory']=='/') {
|
||||
$i['directory']='';
|
||||
}
|
||||
$i['directory'] = $dir;
|
||||
$files[] = $i;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
$name = str_replace('%2F', '/', $name);
|
||||
$directory = str_replace('+', '%20', urlencode($file['directory']));
|
||||
$directory = str_replace('%2F', '/', $directory); ?>
|
||||
<tr data-id="<?php echo $file['id']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'>
|
||||
<tr data-id="<?php echo $file['fileid']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'>
|
||||
<td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo OCP\mimetype_icon('dir'); else echo OCP\mimetype_icon($file['mimetype']); ?>)">
|
||||
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" /><?php } ?>
|
||||
<a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$directory.'/'.$name; else echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">
|
||||
|
|
Loading…
Reference in New Issue