瀏覽代碼

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.
Alexis Degrugillier 5 年之前
父節點
當前提交
022ed9912a
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      app/Models/Share.php

+ 4 - 0
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());
+		});
 	}
 
 	/**