Explorar el 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 hace 5 años
padre
commit
4313c09e68
Se han modificado 1 ficheros con 4 adiciones y 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;
 	}