Fix for Crawler

  1. /**
  2.    *  Implementation of the crawler function
  3.    */    
  4.   function security_scanner_crawler($path) {
  5.     // Create a new object and parse the page
  6.     $obj = new drupal_security_scanner_test();
  7.     // Set the cookie
  8.     $session_cookie = variable_get('security_scanner_cookie','');
  9.     $obj->curl_options = array(
  10.       CURLOPT_COOKIE => $session_cookie,
  11.     );
  12.     $obj->drupalGet($path);
  13.     $obj->parse();
  14.     return $obj;
  15.   }
  16.  
  17. #1 update:
  18. db_query("UPDATE {crawler_links} SET status = 2 WHERE crawler_id = %d and status = 1 LIMIT 1", $crawler_id);
  19. #2 update:
  20. db_query("UPDATE {crawler_links} SET status = 3 WHERE path = '%s' and status = 2 LIMIT 1", $form_details['path']);
  21. #3 update:
  22. db_query("UPDATE {crawler_links} SET status = '4' WHERE id = %d", $form_details['id']);