mirror of https://github.com/MISP/MISP
Tags sorted by name not ID, fixes #522
- Affected views: Tag index, event view tag attach dropdownpull/541/head
parent
2b0a1e5c4e
commit
49e605db6d
|
@ -796,7 +796,7 @@ class EventsController extends AppController {
|
|||
'fields' => array('Tag.id', 'Tag.colour', 'Tag.name'),
|
||||
));
|
||||
$this->set('tags', $tags);
|
||||
$tags = $this->Event->EventTag->Tag->find('all', array('recursive' => -1));
|
||||
$tags = $this->Event->EventTag->Tag->find('all', array('recursive' => -1, 'order' => array('Tag.name ASC')));
|
||||
$tagNames = array('None');
|
||||
foreach ($tags as $k => $v) {
|
||||
$tagNames[$v['Tag']['id']] = $v['Tag']['name'];
|
||||
|
|
|
@ -14,7 +14,7 @@ class TagsController extends AppController {
|
|||
public $paginate = array(
|
||||
'limit' => 50,
|
||||
'order' => array(
|
||||
'Tag.id' => 'desc'
|
||||
'Tag.name' => 'asc'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -120,7 +120,7 @@ class TagsController extends AppController {
|
|||
'fields' => array('Tag.id', 'Tag.colour', 'Tag.name'),
|
||||
));
|
||||
$this->set('tags', $tags);
|
||||
$tags = $this->Tag->find('all', array('recursive' => -1));
|
||||
$tags = $this->Tag->find('all', array('recursive' => -1, 'order' => array('Tag.name ASC')));
|
||||
$tagNames = array('None');
|
||||
foreach ($tags as $k => $v) {
|
||||
$tagNames[$v['Tag']['id']] = $v['Tag']['name'];
|
||||
|
|
Loading…
Reference in New Issue