- Timestamp:
- 10/06/2023 10:27:46 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r12352 r12936 391 391 global $wpdb; 392 392 // Look for a location that matches the name. 393 // The asc ordering provides preference to the oreferred name of the locations.393 // The asc ordering provides preference to the preferred name of the locations. 394 394 // The population ordering provides preference to the populated areas over unpopulated/unknown. 395 // It's unlikely an area with less than ~500 people would hold an event, but sometimes those places rank 396 // higher than populated areas due to the alt vs primary name. See `Genova` unit tests 395 397 // The FIELD() orderings give preference to rows that match the country and/or timezone, without excluding rows that don't match. 396 398 // And we sort by population desc, assuming that the biggest matching location is the most likely one within the above matching groups. … … 404 406 FIELD( %s, country ) DESC, 405 407 alt ASC, 406 population > 0 DESC,408 population > 500 DESC, 407 409 FIELD( %s, timezone ) DESC, 408 410 LEFT( type, 1 ) = "P" DESC,
Note: See TracChangeset
for help on using the changeset viewer.