Wrong use of update_sql in geonames.install

andreiashu - October 22, 2009 - 13:34
Project:GeoNames
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I was looking through the diff of the latest geonames 2.x dev version and I found a problem. In the geonames_update_6002 function db_query was replaced by update_sql, but update_sql does not support %-substitution parameters. From the API page of update_sql:

Parameters
$sql A string containing a complete SQL query. %-substitution parameters are not supported.

#1

cronix - October 22, 2009 - 16:06

Does this mean I cannot use the current dev? I was hoping that some wikipedia bugs were fixed in this version.

#2

andreiashu - October 22, 2009 - 20:44

@cronix: just go to geonames.install and in function geonames_update_6002 replace update_sql to db_query

#3

lyricnz - October 29, 2009 - 11:20
Version:6.x-2.x-dev» 6.x-1.x-dev
Status:active» fixed

6.x-2.x is basically abandoned, which is why it's not published as a tar. Use 6.x-1.x-dev.

However, 6.x-1.x-dev had the same issue. I've made the update above, and added a comment as to why we don't update the $ret used in hook_update_N.

#4

System Message - November 12, 2009 - 11:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.