Skip to content
Snippets Groups Projects
Commit a7cc49fe authored by Jared Hancock's avatar Jared Hancock
Browse files

topic: Sort manually if configured

parent 4867615a
No related branches found
No related tags found
No related merge requests found
......@@ -530,8 +530,8 @@ class OsticketConfig extends Config {
static function allTopicSortModes() {
return array(
'a' => __('Alphabetically'),
'm' => __('Manually'),
Topic::SORT_ALPHA => __('Alphabetically'),
Topic::SORT_MANUAL => __('Manually'),
);
}
......
......@@ -69,6 +69,9 @@ implements TemplateVariable {
const FLAG_CUSTOM_NUMBERS = 0x0001;
const SORT_ALPHA = 'a';
const SORT_MANUAL = 'm';
function asVar() {
return $this->getName();
}
......@@ -353,7 +356,7 @@ implements TemplateVariable {
// primary, the list may need to be sorted. Caching is ok here,
// because the locale is not going to be changed within a single
// request.
if ($localize)
if ($localize && $cfg->getTopicSortMode() == self::SORT_ALPHA)
return Internationalization::sortKeyedList($requested_names);
return $requested_names;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment