EOL / deprecated_eol_php_code

Encyclopedia of Life
http://eol.org/
Other
5 stars 7 forks source link

Change URL #120

Closed hyanwong closed 9 years ago

hyanwong commented 9 years ago

The url for catscan2 has changed, and the old URL is redirected using a meta refresh redirects. Unfortunately get_remote_file() does not follow such redirects, so we need to change the url by hand.

Perhaps we might want to adjust get_remote_file() in /lib/Functions.php to follow these redirects, as this could cause problems for other harvested urls. See http://stackoverflow.com/questions/1820705/php-can-curl-follow-meta-redirects and http://stackoverflow.com/questions/1370025/regex-for-http-equiv-refresh-meta-tag. It's all a bit yucky though.

JRice commented 9 years ago

(Just a note: I won't be able to update production at this time, but will get to it as soon as I can.)

On Mon, Jan 12, 2015 at 8:21 AM, hyanwong notifications@github.com wrote:

The url for catscan2 has changed, and the old URL is redirected using a meta refresh redirects. Unfortunately get_remote_file() does not follow such redirects, so we need to change the url by hand.

Perhaps we might want to adjust get_remote_file() in /lib/Functions.php to follow these redirects, as this could cause problems for other harvested urls. See http://stackoverflow.com/questions/1820705/php-can-curl-follow-meta-redirects and http://stackoverflow.com/questions/1370025/regex-for-http-equiv-refresh-meta-tag.

It's all a bit yucky though.

You can merge this Pull Request by running

git pull https://github.com/hyanwong/eol_php_code update-wikicommons-category-url

Or view, comment on, or merge it at:

https://github.com/EOL/eol_php_code/pull/120 Commit Summary

  • Change URL

File Changes

Patch Links:

— Reply to this email directly or view it on GitHub https://github.com/EOL/eol_php_code/pull/120.

hyanwong commented 9 years ago

On 12 Jan 2015, at 13:28, Jeremy Rice notifications@github.com wrote:

(Just a note: I won't be able to update production at this time, but will get to it as soon as I can.)

There’s no hurry. I wrote the old code to save a local copy of the categories in case the wikimedia foundation tool server went down. I think EoL has been running off this local copy for the past few months anyway. The categories don’t change very often, so this is by no means an urgent fix.=

JRice commented 9 years ago

Good to know. Thanks, Yan! We really appreciate the help!

On Mon, Jan 12, 2015 at 8:31 AM, hyanwong notifications@github.com wrote:

On 12 Jan 2015, at 13:28, Jeremy Rice notifications@github.com wrote:

(Just a note: I won't be able to update production at this time, but will get to it as soon as I can.)

There’s no hurry. I wrote the old code to save a local copy of the categories in case the wikimedia foundation tool server went down. I think EoL has been running off this local copy for the past few months anyway. The categories don’t change very often, so this is by no means an urgent fix.=

— Reply to this email directly or view it on GitHub https://github.com/EOL/eol_php_code/pull/120#issuecomment-69569607.