places: fix for postgres

pull/395/head
Varun Patil 2023-02-05 22:23:44 -08:00
parent 926692d65b
commit 75de618f56
2 changed files with 1 additions and 3 deletions

View File

@ -31,8 +31,6 @@ class PlacesController extends ApiBase
/** /**
* @NoAdminRequired * @NoAdminRequired
* *
* @NoCSRFRequired
*
* Get list of places with counts of images * Get list of places with counts of images
*/ */
public function places(): JSONResponse public function places(): JSONResponse

View File

@ -37,7 +37,7 @@ trait TimelineQueryPlaces
$query = $this->joinFilecache($query, $root, true, false); $query = $this->joinFilecache($query, $root, true, false);
// GROUP and ORDER by tag name // GROUP and ORDER by tag name
$query->groupBy('e.osm_id'); $query->groupBy('e.osm_id', 'e.name');
$query->orderBy($query->createFunction('LOWER(e.name)'), 'ASC'); $query->orderBy($query->createFunction('LOWER(e.name)'), 'ASC');
$query->addOrderBy('e.osm_id'); // tie-breaker $query->addOrderBy('e.osm_id'); // tie-breaker