Skip to content

Commit

Permalink
Parameters are more clear and improved comment
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Jun 6, 2016
1 parent ad1dfa3 commit 32c9048
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions libraries/joomla/form/fields/folderlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ protected function getOptions()
}

// Get a list of folders in the search path with the given filter.
$folders = JFolder::folders($path, $this->filter, $this->recursive, $this->recursive);
$folders = JFolder::folders($path, $this->filter, $this->recursive, true);

// Build the options list from the list of folders.
if (is_array($folders))
Expand All @@ -217,10 +217,8 @@ protected function getOptions()
}
}

if ($this->recursive)
{
$folder = str_replace($path, '', $folder);
}
// Remove the root part and the leading /
$folder = trim(str_replace($path, '', $folder), '/');

$options[] = JHtml::_('select.option', $folder, $folder);
}
Expand Down

0 comments on commit 32c9048

Please sign in to comment.