Commit 63d2c8ed authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1795275: Sorting tag filter alphabetically



behatnotneeded

Change-Id: I94b5a2eb81c3b0c360afdf4ae65d074dcce1f10b
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent c6296f12
...@@ -4662,7 +4662,6 @@ function build_portfolio_search_html(&$data) { ...@@ -4662,7 +4662,6 @@ function build_portfolio_search_html(&$data) {
$data->sortcols = array('name', 'date'); $data->sortcols = array('name', 'date');
$data->filtercols = array( $data->filtercols = array(
'all' => get_string('tagfilter_all'),
'file' => get_string('tagfilter_file'), 'file' => get_string('tagfilter_file'),
'image' => get_string('tagfilter_image'), 'image' => get_string('tagfilter_image'),
'text' => get_string('tagfilter_text'), 'text' => get_string('tagfilter_text'),
...@@ -4675,6 +4674,8 @@ function build_portfolio_search_html(&$data) { ...@@ -4675,6 +4674,8 @@ function build_portfolio_search_html(&$data) {
'media' => get_string('tagfilter_external'), 'media' => get_string('tagfilter_external'),
'resume' => get_string('tagfilter_resume'), 'resume' => get_string('tagfilter_resume'),
); );
asort($data->filtercols, SORT_NATURAL);
$data->filtercols = array('all' => get_string('tagfilter_all')) + $data->filtercols;
$smarty = smarty_core(); $smarty = smarty_core();
$smarty->assign('data', $data->data); $smarty->assign('data', $data->data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment