Explorar o código

Fix feed sort order (#3466)

Before, the feeds in the list weren't properly ordered. Uppercase
values were before lowercase values.
Now, the feed order is forced to ignore the case.

See #3228
Alexis Degrugillier %!s(int64=5) %!d(string=hai) anos
pai
achega
4313c09e68
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Models/Category.php

+ 4 - 0
app/Models/Category.php

@@ -62,6 +62,10 @@ class FreshRSS_Category extends Minz_Model {
 			}
 		}
 
+		usort($this->feeds, function ($a, $b) {
+			return strnatcasecmp($a->name(), $b->name());
+		});
+
 		return $this->feeds;
 	}