Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
022ed9912a
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  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());
+		});
 	}
 
 	/**