summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-19 17:35:45 +0000
committerSarven Capadisli <csarven@status.net>2009-11-19 17:35:45 +0000
commit318dd70de888513a5b0404c5eb1cdbb3c6e8e760 (patch)
tree9fbd3a33126978200ce5854ec87067935b592417 /plugins
parent60391d0b96579aff2ee105ab64a89ffdb225bbdc (diff)
parentee22b2ccf9819cefba54ef38c6a57829c7d3fa73 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins')
-rw-r--r--plugins/GeonamesPlugin.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/GeonamesPlugin.php b/plugins/GeonamesPlugin.php
index 1d7381a80..59232c1c5 100644
--- a/plugins/GeonamesPlugin.php
+++ b/plugins/GeonamesPlugin.php
@@ -302,4 +302,28 @@ class GeonamesPlugin extends Plugin
// it's been filled, so don't process further.
return false;
}
+
+ /**
+ * Machine-readable name for a location
+ *
+ * Given a location, we try to retrieve a geonames.org URL.
+ *
+ * @param Location $location Location to get the url for
+ * @param string &$url Place to put the url
+ *
+ * @return boolean whether to continue
+ */
+
+ function onLocationRdfUrl($location, &$url)
+ {
+ if ($location->location_ns != self::LOCATION_NS) {
+ // It's not one of our IDs... keep processing
+ return true;
+ }
+
+ $url = 'http://sw.geonames.org/' . $location->location_id . '/';
+
+ // it's been filled, so don't process further.
+ return false;
+ }
}