aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Share.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2021-01-03 14:15:15 -0500
committerGravatar GitHub <noreply@github.com> 2021-01-03 20:15:15 +0100
commit022ed9912a6b6861413e6387e193f50826942f5c (patch)
tree12d10f05fb45f891e9d0eee6a42e7485413aceff /app/Models/Share.php
parent46c8f6e77b74c97993414af1c3a3a8a047414baf (diff)
Fix share option sort (#3331)
Before, share options were displayed in the order defined in the configuration file. So the order reflected the share history and was not really usable. Now, share options are displayed in alphabetical order which makes much more sense.
Diffstat (limited to 'app/Models/Share.php')
-rw-r--r--app/Models/Share.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Models/Share.php b/app/Models/Share.php
index 1fc3c493e..218781dcc 100644
--- a/app/Models/Share.php
+++ b/app/Models/Share.php
@@ -43,6 +43,10 @@ class FreshRSS_Share {
$share_options['type'] = $share_type;
self::register($share_options);
}
+
+ uasort(self::$list_sharing, function ($a, $b) {
+ return strcasecmp($a->name(), $b->name());
+ });
}
/**