Explorar o código

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 %!s(int64=5) %!d(string=hai) anos
pai
achega
022ed9912a
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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());
+		});
 	}
 
 	/**