Index: biblio.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/biblio/biblio.install,v
retrieving revision 1.30.2.98
diff -u -F '^function' -r1.30.2.98 biblio.install
--- biblio.install	14 Apr 2010 01:00:00 -0000	1.30.2.98
+++ biblio.install	16 Jun 2010 03:51:56 -0000
@@ -1358,8 +1358,7 @@ function biblio_update_27(){
 }
 
 
-function _move_field_data(&$result)
-{
+function _move_field_data(&$result) {
   $schema = biblio_schema();
 
   // update default settings (tid=0) in biblio_field_type from old biblio_fields
@@ -1383,15 +1382,14 @@ function _move_field_data(&$result)
   while ($row = db_fetch_array($db_result))
   {
     // check for presence of this field_type
-    $fieldtype = db_fetch_array(db_query("SELECT * FROM {biblio_field_type_data} WHERE title='".$row['title']."'"));
-    if(!is_array($fieldtype)) {
+    $fieldtype = db_fetch_array(db_query("SELECT * FROM {biblio_field_type_data} WHERE title='%s'", $row['title']));
+    if (!is_array($fieldtype)) {
       $new_ftdid = variable_get('biblio_last_ftdid',100);
       variable_set('biblio_last_ftdid',$new_ftdid + 1);
       $fieldtype = array('ftdid' => $new_ftdid, 'title' => $row['title'], 'hint' => $row['hint']);
-    // write_record may not work if module is diabled.
-    //drupal_write_record('biblio_field_type_data',$fieldtype);
-      db_query("INSERT INTO {biblio_field_type_data} (ftdid, title, hint)
-                  VALUES('" . implode("', '", $fieldtype) . "')");
+      // write_record may not work if module is diabled.
+      //drupal_write_record('biblio_field_type_data',$fieldtype);
+      db_query("INSERT INTO {biblio_field_type_data} (ftdid, title, hint) VALUES(%d, '%s', '%s')", $fieldtype['ftdid'], $fieldtype['title'], $fieldtype['hint']);
     }
     // update ftdid in linking table to new field type
     $ftdid=$fieldtype['ftdid'];
