Jelajahi Sumber

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 tahun lalu
induk
melakukan
022ed9912a
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  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());
+		});
 	}
 
 	/**