summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-02-09 11:35:27 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-27 12:25:53 +0100
commit7cd0340366050865a50ab258b047c1236258e0ca (patch)
tree011152a1a9169a9891058df7f779e9508c83152a
parent4a1cbefc909d976d25bb1bb3a7bbeb422b51fb22 (diff)
downloadnextcloud-server-7cd0340366050865a50ab258b047c1236258e0ca.tar.gz
nextcloud-server-7cd0340366050865a50ab258b047c1236258e0ca.zip
Sort menu by priority
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--lib/public/AppFramework/Http/Template/PublicTemplateResponse.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
index 2f2d47d7bca..df4909e7f18 100644
--- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
+++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php
@@ -137,6 +137,9 @@ class PublicTemplateResponse extends TemplateResponse {
$list[] = $action;
}
}
+ usort($list, function(IMenuAction $a, IMenuAction $b) {
+ return $a->getPriority() > $b->getPriority();
+ });
return $list;
}