How does the link_pdf attribute for a WYSIWYG form element work to show the PDFs. They seem to be ordered by most recently added first. Is there a way to get them to display in alphabetic order?
It uses the directory_to_array function which may return the files in a different manner. In the Fuel_assets::dir_files() method, does it work if you do the following: public function dir_files($folder, $recursive = FALSE, $append_path = FALSE)
{
$dir = assets_server_path($folder);
$files = directory_to_array($dir, $recursive, array(), $append_path);
sort($files);
return $files;
}
Comments
public function dir_files($folder, $recursive = FALSE, $append_path = FALSE) { $dir = assets_server_path($folder); $files = directory_to_array($dir, $recursive, array(), $append_path); sort($files); return $files; }