mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
refactor(TorrentFileList): Reduce duplication in root directory unset logic (#2027)
This commit is contained in:
parent
57d0d59b53
commit
68403760c1
1 changed files with 4 additions and 2 deletions
|
@ -53,8 +53,10 @@ class TorrentFileList
|
||||||
$this->build_filelist_array();
|
$this->build_filelist_array();
|
||||||
|
|
||||||
if ($this->multiple) {
|
if ($this->multiple) {
|
||||||
|
if (isset($this->files_ary['/'])) {
|
||||||
if (!empty($this->files_ary['/'])) {
|
if (!empty($this->files_ary['/'])) {
|
||||||
$this->files_ary = $this->files_ary + $this->files_ary['/'];
|
$this->files_ary = $this->files_ary + $this->files_ary['/'];
|
||||||
|
}
|
||||||
unset($this->files_ary['/']);
|
unset($this->files_ary['/']);
|
||||||
}
|
}
|
||||||
$filelist = $html->array2html($this->files_ary);
|
$filelist = $html->array2html($this->files_ary);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue