Commit Graph

24 Commits

Author SHA1 Message Date
Evan Prodromou a319b40c97 common_cache_key() -> Cache::key() 2010-09-06 10:07:43 -04:00
Evan Prodromou e42d2124a3 common_keyize() -> Cache::keyize() 2010-09-06 10:03:51 -04:00
Evan Prodromou 8f81762d68 common_memcache() => Cache::instance() 2010-09-06 09:56:45 -04:00
Brion Vibber 1768bfa04b Ticket #2349: fix for Geonames semantic reference URLs in FOAF output (corrects a typo in the patch added in 4463768b) 2010-06-10 10:30:07 -07:00
Brion Vibber ecd31384ed Fix for error during handling of HTTP error response case in Geonames lookups 2010-04-08 10:11:52 -07:00
Brion Vibber cda03ff328 Set a default 2-second timeout on Geonames web service lookups. After a failure, further lookups in the same process will be skipped for the next 60 seconds (also configurable).
Makes a Geonames outage much less disruptive to site operations.
2010-04-06 15:14:28 -07:00
Brion Vibber f19b95d9b7 Shared cache key option for Geonames plugin, lets multi-instance sites share their cached geoname lookups.
Example:
  unset($config['plugins']['default']['Geonames']);
  addPlugin('Geonames', array('cachePrefix' => 'statusnet:shared'));
2010-03-30 12:20:46 -07:00
Evan Prodromou a1c9874a61 better handling of null responses from geonames.org 2010-01-30 12:40:11 -05:00
Evan Prodromou ff930d2555 add version information to Geonames plugin 2010-01-07 17:27:01 -08:00
Evan Prodromou 0bb65f8739 Merge branch 'geonamesxml' into 0.9.x 2009-12-23 15:53:58 -08:00
Evan Prodromou c0f444f564 make sure Geonames API queries use correct arg separator 2009-12-23 12:16:22 -08:00
Evan Prodromou cdc5052683 Convert Geonames plugin to use XML API instead of JSON
The XML API for Geonames contains much more detailed error information
than the JSON one. So, I've converted this plugin to use it instead.
It seems to be the preferred format for Geonames, so biting the bullet
on this makes sense.
2009-12-23 12:09:11 -08:00
Evan Prodromou 15b9f61842 Better error notification for Geonames plugin 2009-12-23 09:26:59 -08:00
Evan Prodromou 098426cee9 configurable expiry for cached Geonames data defaults to 90 days 2009-12-04 16:25:05 -05:00
Evan Prodromou 99b23782ef let Geonames clients use commercial Web service 2009-12-04 15:30:43 -05:00
Evan Prodromou 028a44e080 use caching in geonames plugin 2009-11-20 15:27:47 -05:00
Craig Andrews 4463768bae tobyink's location RDF patch 2009-11-19 12:00:25 -05:00
Brion Vibber 88ff0eefb4 Renaming GeonamesPlugin::NAMESPACE to GeonamesPlugin::LOCATION_NS to avoid parse errors; 'namespace' is a reserved keyword in PHP 5.3 and later. 2009-11-17 16:56:43 -08:00
Brion Vibber 088081675f Revert "Remove more contractions"
This reverts commit 5ab709b739.

Missed this one yesterday...
2009-11-09 20:01:46 +01:00
Siebrand Mazeland 5ab709b739 Remove more contractions
* doesn't
* won't
* isn't
* don't
2009-11-08 23:32:15 +01:00
Brion Vibber 5581143bee Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, adding redirect handling and convenience functions.
Caching support will be added in future work after unit tests have been added.

* extlib: add PEAR HTTP_Request2 0.4.1 alpha
* extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility
* moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries
* adapted GeonamesPlugin for new HTTPResponse interface

Note some plugins haven't been fully tested yet.
2009-11-02 09:14:15 -08:00
Evan Prodromou 62ba14f5cf make an URL for a geonames location 2009-10-29 15:07:26 -04:00
Evan Prodromou de4b2098d1 results of json parsing are objects not arrays 2009-10-22 16:20:31 -04:00
Evan Prodromou 9c983c3830 extract Geonames stuff to a plugin 2009-10-22 15:44:36 -04:00