[dev] [patch] weatherdotcom block portal

Johan FISCHER linux at fischaz.com
Wed Feb 11 20:44:36 PST 2004


Hi,

The patch add the location ID (like FRXX0076 for Paris, France) to the regex
pattern since the Getlocation function also accept this format directly.
I also added some restriction to the regex pattern and extracted the match from
the function when the function return true to accept (and delete) leading and
trailing spaces in the location ID

The problem is that it also accept anything around the match (but still work coz
extract just the match).

Also add checking for the search function result :
- when pear_error (Location completely wrong) print it
- when multiple location (Location imprecise) print the list of the proposed
location and ID (and then the user has to change the location to the specific
ID)

Enjoy


PS : actually, i sent this patch last weeek but nobody commited it. I just
wanted to know if it was because the patch was bad ... (it works for me ...)

Johan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1018 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20040212/03e5a427/attachment.bin


More information about the dev mailing list