Project:Link 404 checker
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

PHP reports an error in line 17 of the .install file.

Comments

#1

Line 17 contains:
"field_name" varchar(254) NOT NULL,

which should be:
"field_name varchar(254) NOT NULL,".

I didn't create a patch, because the .install file doesn't have a cvs tag.

#2

heres my patch, the install file is pretty poorly formatted

#3

Alrite,. drupal.org seems to be having issues attaching files right now
Apprently this should be attached here http://drupal.org/files/link_check_install.patch

Index: link_checker/link_checker.install
===================================================================
--- link_checker/link_checker.install   (revision 18)
+++ link_checker/link_checker.install   (working copy)
@@ -8,33 +8,33 @@
   switch ($GLOBALS['db_type']) {
     case 'mysql':
     case 'mysqli':
-      $query1 = db_query("CREATE TABLE IF NOT EXISTS {link_checker} (".
-                         "vid INT(10) UNSIGNED NOT NULL DEFAULT 0,".
-                         "nid INT(10) UNSIGNED NOT NULL DEFAULT 0,".
-                                                                                                "delta INT(10) UNSIGNED NOT NULL DEFAULT 0,".
-                         "last_checked DATETIME DEFAULT \"2000-01-01 00:00:00\",".
-                         "status INT(4) NOT NULL DEFAULT 0,".
-                                                                                                "field_name varchar(254) NOT NULL",
-                         "PRIMARY KEY (vid, nid, delta, field_name),".
-                         "INDEX(last_checked),".
-                         "INDEX(status)".
-                         ") /*!40100 DEFAULT CHARACTER SET utf8 */");
+    $query1 = db_query("CREATE TABLE IF NOT EXISTS {link_checker} (
+                          vid INT(10) UNSIGNED NOT NULL DEFAULT 0,
+                          nid INT(10) UNSIGNED NOT NULL DEFAULT 0,
+                          delta INT(10) UNSIGNED NOT NULL DEFAULT 0,
+                          last_checked DATETIME DEFAULT '2000-01-01 00:00:00',
+                          status INT(4) NOT NULL DEFAULT 0,
+                          field_name varchar(254) NOT NULL,
+                          PRIMARY KEY (`vid`, `nid`, `delta`, `field_name`),
+                          INDEX(last_checked),
+                          INDEX(status)
+                          ) /*!40100 DEFAULT CHARACTER SET utf8 */");
       if($query1) {
         $created = TRUE;
       }
       break;

     case 'pgsql':
-      $query1 = db_query("CREATE TABLE {link_checker} (".
-                         "vid INT UNSIGNED NOT NULL DEFAULT 0,".
-                         "nid INT UNSIGNED NOT NULL DEFAULT 0,".
-                         "delta INT UNSIGNED NOT NULL DEFAULT 0,".
-                         "last_checked DATETIME DEFAULT \"2000-01-01 00:00:00\",".
-                         "status INT NOT NULL DEFAULT 0,".
-                        "field_name varchar(254) NOT NULL",
-                         "PRIMARY KEY (vid, nid, field_name, delta),".
-                         "INDEX(last_checked),".
-                         "INDEX(status)");
+      $query1 = db_query('CREATE TABLE {link_checker} (
+                         vid INT UNSIGNED NOT NULL DEFAULT 0,
+                         nid INT UNSIGNED NOT NULL DEFAULT 0,
+                         delta INT UNSIGNED NOT NULL DEFAULT 0,
+                         last_checked DATETIME DEFAULT "2000-01-01 00:00:00"
+                         status INT NOT NULL DEFAULT 0,
+                                          field_name varchar(254) NOT NULL,
+                         PRIMARY KEY (vid, nid, field_name, delta),.
+                         INDEX(last_checked),.
+                         INDEX(status)');
       if($query1) {
         $created = TRUE;
       }
@@ -49,11 +49,13 @@
     drupal_set_message(t('Table install for link checker was unsuccessful.'));
   }
} // end install function
+
+
/*
* Implementation of hook_uninstall
*/
function link_checker_uninstall() {
   db_query('DROP TABLE {link_checker}');
-  db_query("DELETE FROM {variable} WHERE name like '%link_checker%'");
+  db_query('DELETE FROM {variable} WHERE name like "%link_checker%"');
}

#4

Status:active» fixed

committed.

#5

Status:fixed» closed (fixed)

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