4
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
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());
+		});
 	}
 
 	/**