We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 17f1693a authored by tobyink's avatar tobyink

Use country names as text instead of flags.

parent 47dab86a
......@@ -319,7 +319,10 @@ class Server {
if (!$name)
return array();
$res = $mdb2->query('SELECT * FROM Places WHERE location_uri=' . $mdb2->quote($name, 'text'));
$res = $mdb2->query('SELECT p.latitude, p.longitude, p.country, c.country_name, c.wikipedia_en '
. 'FROM Places p '
. 'LEFT JOIN Countries c ON p.country=c.country '
. 'WHERE p.location_uri=' . $mdb2->quote($name, 'text'));
if($res->numRows()) {
......
......@@ -31,16 +31,14 @@
<span {if $location_uri} about="{$location_uri|escape:'html':'UTF-8'}"{/if}>
<span class="label" property="rdfs:comment">{$location|escape:'html':'UTF-8'}</span>
{if $geo.latitude}
<small class="geo">(
<span class="latitude" property="geo:lat">{$geo.latitude|string_format:"%0.3f"}</span>;
<span class="longitude" property="geo:long">{$geo.longitude|string_format:"%0.3f"}</span>
)</small>
<small class="geo">
[<span class="latitude" property="geo:lat">{$geo.latitude|string_format:"%0.3f"}</span>;
<span class="longitude" property="geo:long">{$geo.longitude|string_format:"%0.3f"}</span>]
</small>
{/if}
{if $geo.country}
<small xmlns:gn="http://www.geonames.org/" rel="gn:ontology#inCountry" resource="[gn:countries/#{$geo.country}]">
<a rel="foaf:page" href="{$base_url}/country/{$geo.country}"><img
src="{$base_url}/themes/librefm/images/flags/{$geo.country|strtolower}.png" alt="{$geo.country}"
rev="foaf:depiction" resource="[gn:countries/#{$geo.country}]"></a>
(<a rel="foaf:page" href="{$base_url}/country/{$geo.country}">Find other people in {$geo.country_name|escape:'html':'UTF-8'}</a>)
</small>
{/if}
</span>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment