Only in /Users/jgeerling/Sites/drupal-core/d7/sites/default/files/coder_upgrade/old/extractor: .git
diff -up -r ExtractorSimplePieParser.inc ExtractorSimplePieParser.inc
--- ExtractorSimplePieParser.inc	2011-12-01 17:21:03.000000000 -0600
+++ ExtractorSimplePieParser.inc	2011-12-01 17:21:50.000000000 -0600
@@ -1,6 +1,6 @@
 <?php
 
-require_once 'extractor.feeds.inc';
+require_once DRUPAL_ROOT . '/' . 'extractor.feeds.inc';
 
 /**
  * Extend simplepie parser and add term extraction.
@@ -26,16 +26,16 @@ class ExtractorSimplePieParser extends F
   }
 
   /**
-    * Config Form Defaults
-    */
+   * Config Form Defaults
+   */
   public function configDefaults() {
     return extractor_feeds_defaults();
   }
 
   /**
-    * Config Form
-    */
+   * Config Form
+   */
   public function configForm(&$form_state) {
     return extractor_feeds_form($this->config);
   }
-}
\ No newline at end of file
+}
diff -up -r ExtractorSyndicationParser.inc ExtractorSyndicationParser.inc
--- ExtractorSyndicationParser.inc	2011-12-01 17:21:03.000000000 -0600
+++ ExtractorSyndicationParser.inc	2011-12-01 17:21:50.000000000 -0600
@@ -1,6 +1,6 @@
 <?php
 
-require_once 'extractor.feeds.inc';
+require_once DRUPAL_ROOT . '/' . 'extractor.feeds.inc';
 
 /**
  * Extend common syndication parser and add term extraction.
@@ -38,4 +38,4 @@ class ExtractorSyndicationParser extends
   public function configForm(&$form_state) {
     return extractor_feeds_form($this->config);
   }
-}
\ No newline at end of file
+}
diff -up -r extractor.feeds.inc extractor.feeds.inc
--- extractor.feeds.inc	2011-12-01 17:21:03.000000000 -0600
+++ extractor.feeds.inc	2011-12-01 17:21:50.000000000 -0600
@@ -12,7 +12,7 @@
  * Form for feeds integration.
  */
 function extractor_feeds_form($config) {
-  drupal_add_js(drupal_get_path('module', 'extractor') .'/extractor.js');
+  drupal_add_js(drupal_get_path('module', 'extractor') . '/extractor.js');
   $form = array();
   $form['extractors'] = array(
     '#type' => 'radios',
@@ -21,7 +21,7 @@ function extractor_feeds_form($config) {
     '#default_value' => $config['extractors'],
     '#options' => array(
       'extractor_simple' => t('Simple Extractor'),
-      'placemaker' => t('Yahoo Placemaker')
+      'placemaker' => t('Yahoo Placemaker'),
     ),
   );
   $form['placemaker_key'] = array(
@@ -71,10 +71,10 @@ function extractor_feeds_get_mapping_sou
  */
 function extractor_feeds_get_source_element($item, $element_key, $config) {
   if ($element_key == 'extracted_terms') {
-    return extractor_extract($item['title'] .' '. $item['description'], $config['extractors'], $config);
+    return extractor_extract($item['title'] . ' ' . $item['description'], $config['extractors'], $config);
   }
   elseif ($element_key == 'extracted_tids') {
-    $terms = extractor_extract($item['title'] .' '. $item['description'], $config['extractors'], $config);
+    $terms = extractor_extract($item['title'] . ' ' . $item['description'], $config['extractors'], $config);
     return array_keys($terms);
   }
-}
\ No newline at end of file
+}
diff -up -r extractor.info extractor.info
--- extractor.info	2011-12-01 17:21:03.000000000 -0600
+++ extractor.info	2011-12-01 17:21:51.000000000 -0600
@@ -1,4 +1,8 @@
 name = Extractor
 description = "API for extracting terms from text"
 dependencies[] = taxonomy
-core = 6.x
+core = 7.x
+
+files[] = ExtractorSimplePieParser.inc
+files[] = ExtractorSyndicationParser.inc
+files[] = ExtractorTermProcessor.inc
diff -up -r extractor.install extractor.install
--- extractor.install	2011-12-01 17:21:03.000000000 -0600
+++ extractor.install	2011-12-01 17:21:50.000000000 -0600
@@ -1,7 +1,13 @@
 <?php
+/**
+ * @file
+ * Install, update and uninstall functions for the extractor module.
+ *
+ */
+
 
 /**
- * Implementation of hook_schema().
+ * Implements hook_schema().
  */
 function extractor_schema() {
   $schema = array();
@@ -22,17 +28,19 @@ function extractor_schema() {
 }
 
 /**
- * Implementation of hook_install().
+ * Implements hook_install().
  */
 function extractor_install() {
-  drupal_install_schema('extractor');
+  // TODO The drupal_(un)install_schema functions are called automatically in D7.
+  // drupal_install_schema('extractor')
 }
 
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
 function extractor_uninstall() {
-  drupal_uninstall_schema('extractor');
+  // TODO The drupal_(un)install_schema functions are called automatically in D7.
+  // drupal_uninstall_schema('extractor')
 }
 
 /**
@@ -53,12 +61,15 @@ function extractor_update_6100() {
     ),
     'primary key' => array('tid'),
   );
-  db_create_table($ret, 'extractor_lookup', $schema);
+  db_create_table('extractor_lookup', $schema);
   if ($vocabulary = variable_get('extractor_simple_vid', FALSE)) {
     $vocabulary = taxonomy_vocabulary_load($vocabulary);
     $id = strpos($vocabulary->module, 'features_') === 0 ? $vocabuarly->module : $vocabulary->vid;
     variable_set('extractor_simple_vocabularies', array($id));
   }
   variable_del('extractor_simple_vid');
-  return $ret;
+  // hook_update_N() no longer returns a $ret array. Instead, return
+  // nothing or a translated string indicating the update ran successfully.
+  // See http://drupal.org/node/224333#update_sql.
+  return t('TODO Add a descriptive string here to show in the UI.') /* $ret */;
 }
diff -up -r extractor.module extractor.module
--- extractor.module	2011-12-01 17:21:03.000000000 -0600
+++ extractor.module	2011-12-01 17:21:50.000000000 -0600
@@ -10,7 +10,7 @@
  */
 
 /**
- * Implementation of hook_plugins().
+ * Implements hook_plugins().
  */
 function extractor_feeds_plugins() {
   $info['ExtractorSyndicationParser'] = array(
@@ -49,7 +49,7 @@ function extractor_feeds_plugins() {
 }
 
 /**
- * Implementation of hook_form_taxonomy_form_vocabulary_alter().
+ * Implements hook_form_taxonomy_form_vocabulary_alter().
  */
 function extractor_form_taxonomy_form_vocabulary_alter(&$form, &$form_state) {
   $form['extractor'] = array(
@@ -86,7 +86,7 @@ function extractor_form_vocabulary_submi
 }
 
 /**
- * Implementation of specific hook_form_alter().
+ * Implements hook_form_alter().
  */
 function extractor_form_taxonomy_form_term_alter(&$form, &$form_state) {
   $form['submit']['#weight'] = isset($form['submit']['#weight']) ? $form['submit']['#weight'] + 1 : 1;
@@ -116,16 +116,24 @@ function extractor_form_taxonomy_form_te
 }
 
 /**
- * Implementation of hook_taxonomy().
+ * Implements hook_taxonomy().
  */
-function extractor_taxonomy($op = NULL, $type = NULL, $term = NULL){
-  if ($type =='term' && $term) {
+function extractor_taxonomy($op = NULL, $type = NULL, $term = NULL) {
+  if ($type == 'term' && $term) {
     switch ($op) {
       case 'delete':
-        db_query("DELETE FROM {extractor_lookup} WHERE tid = %d", $term['tid']);
+        // TODO Please review the conversion of this statement to the D7 database API syntax.
+        /* db_query("DELETE FROM {extractor_lookup} WHERE tid = %d", $term['tid']) */
+        db_delete('extractor_lookup')
+  ->condition('tid', $term['tid'])
+  ->execute();
         break;
       case 'update':
-        db_query("DELETE FROM {extractor_lookup} WHERE tid = %d", $term['tid']);
+        // TODO Please review the conversion of this statement to the D7 database API syntax.
+        /* db_query("DELETE FROM {extractor_lookup} WHERE tid = %d", $term['tid']) */
+        db_delete('extractor_lookup')
+  ->condition('tid', $term['tid'])
+  ->execute();
       case 'insert':
         if (!empty($term['extractor_lookup'])) {
           drupal_write_record('extractor_lookup', $term);
@@ -136,7 +144,7 @@ function extractor_taxonomy($op = NULL, 
 }
 
 /**
- * Implementation of hook_feeds_term_processor_targets_alter().
+ * Implements hook_feeds_term_processor_targets_alter().
  */
 function extractor_feeds_term_processor_targets_alter(&$targets, $vid) {
   $targets['extractor_lookup'] = array(
@@ -149,7 +157,7 @@ function extractor_feeds_term_processor_
  * Determine whether a term should be used for term extraction or not.
  */
 function extractor_use_term($tid) {
-  return db_result(db_query("SELECT tid FROM {extractor_lookup} WHERE tid = %d", $tid));
+  return db_query("SELECT tid FROM {extractor_lookup} WHERE tid = :tid", array(':tid' => $tid))->fetchField();
 }
 
 /**
@@ -188,7 +196,7 @@ function extractor_extract($text, $libra
 function extractor_include($name) {
   static $included;
   if (!$included[$name]) {
-    include drupal_get_path('module', 'extractor') .'/libraries/'. $name .'.inc';
+    include DRUPAL_ROOT . '/' . drupal_get_path('module', 'extractor') . '/libraries/' . $name . '.inc';
     $included[$name] = TRUE;
   }
 }
diff -up -r libraries/extractor_simple.inc libraries/extractor_simple.inc
--- libraries/extractor_simple.inc	2011-12-01 17:21:03.000000000 -0600
+++ libraries/extractor_simple.inc	2011-12-01 17:21:51.000000000 -0600
@@ -34,9 +34,9 @@ function extractor_simple_extract($text)
     while (!$sorted) {
       $sorted = TRUE;
       for ($i = 0; $i < count($sorted_terms) - 1; $i++) {
-        if (strlen($sorted_terms[$i]) < strlen($sorted_terms[$i+1])) {
-          $tmp = $sorted_terms[$i+1];
-          $sorted_terms[$i+1] = $sorted_terms[$i];
+        if (strlen($sorted_terms[$i]) < strlen($sorted_terms[$i + 1])) {
+          $tmp = $sorted_terms[$i + 1];
+          $sorted_terms[$i + 1] = $sorted_terms[$i];
           $sorted_terms[$i] = $tmp;
           $sorted = FALSE;
         }
@@ -52,7 +52,7 @@ function extractor_simple_extract($text)
       // Iterate through tag words backwards, skip to the start of the outmost loop
       // if we find a mismatch.
       for ($i = count($term_words) - 1; $i >= 0; $i--) {
-        if (strtolower($term_words[$i]) != strtolower($words[$pos+$i])) {
+        if (strtolower($term_words[$i]) != strtolower($words[$pos + $i])) {
           continue 2; // Skips to start of foreach ($terms as $term) {
         }
       }
@@ -94,10 +94,11 @@ function _extractor_simple_lookup($word)
   }
   if (!$loaded) {
     if (empty($vid)) {
-      $result = db_query_range("SELECT td.tid, td.name FROM {term_data} td JOIN {extractor_lookup} e ON td.tid = e.tid", 0, 2000);
+      $result = db_query_range("SELECT td.tid, td.name FROM {taxonomy_term_data} td JOIN {extractor_lookup} e ON td.tid = e.tid");
     }
     else {
-      $result = db_query_range("SELECT td.tid, td.name FROM {term_data} td LEFT JOIN {extractor_lookup} e ON td.tid = e.tid WHERE td.vid IN (%s) OR e.tid IS NOT NULL", implode(', ', $vids), 0, 2000);
+      // TODO Please convert this statement to the D7 database API syntax.
+      $result = db_query_range("SELECT td.tid, td.name FROM {taxonomy_term_data} td LEFT JOIN {extractor_lookup} e ON td.tid = e.tid WHERE td.vid IN (%s) OR e.tid IS NOT NULL", implode(', ', $vids));
     }
     while ($term = db_fetch_object($result)) {
       $term_cache[strtolower($term->name[0])][$term->name] = $term;
@@ -124,4 +125,4 @@ function _extractor_simple_lookup($word)
  */
 function _extractor_simple_stopwords() {
   return array('a', 'able', 'about', 'across', 'after', 'all', 'almost', 'also', 'am', 'among', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'because', 'been', 'but', 'by', 'can', 'cannot', 'could', 'dear', 'did', 'do', 'does', 'either', 'else', 'ever', 'every', 'for', 'from', 'get', 'got', 'had', 'has', 'have', 'he', 'her', 'hers', 'him', 'his', 'how', 'however', 'i', 'if', 'in', 'into', 'is', 'it', 'its', 'just', 'least', 'let', 'like', 'likely', 'may', 'me', 'might', 'most', 'must', 'my', 'neither', 'no', 'nor', 'not', 'of', 'off', 'often', 'on', 'only', 'or', 'other', 'our', 'own', 'rather', 'said', 'say', 'says', 'she', 'should', 'since', 'so', 'some', 'than', 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'tis', 'to', 'too', 'twas', 'us', 'wants', 'was', 'we', 'were', 'what', 'when', 'where', 'which', 'while', 'who', 'whom', 'why', 'will', 'with', 'would', 'yet', 'you', 'your');
-}
\ No newline at end of file
+}
diff -up -r libraries/placemaker.inc libraries/placemaker.inc
--- libraries/placemaker.inc	2011-12-01 17:21:03.000000000 -0600
+++ libraries/placemaker.inc	2011-12-01 17:21:51.000000000 -0600
@@ -21,7 +21,7 @@ function _placemaker_send_text($text, $c
   $inputType = 'text/html';
 
   $outputType = 'xml';
-  $post = 'appid='. $config['placemaker_key'] .'&documentContent='. $text .'&documentType='. $inputType .'&inputLanguage='. $config['language'] .'&outputType='. $outputType .'&autoDisambiguate=true';
+  $post = 'appid=' . $config['placemaker_key'] . '&documentContent=' . $text . '&documentType=' . $inputType . '&inputLanguage=' . $config['language'] . '&outputType=' . $outputType . '&autoDisambiguate=true';
   $ch = curl_init($apiendpoint);
 
   curl_setopt($ch, CURLOPT_POST, 1);
@@ -32,9 +32,9 @@ function _placemaker_send_text($text, $c
 
   // Parse results of placemaker request.
   $xml = simplexml_load_string($results);
-  $item['name'] = (string)$xml->document->placeDetails->place->name;
-  $item['lat'] = (string)$xml->document->placeDetails->place->centroid->latitude;
-  $item['lon'] = (string)$xml->document->placeDetails->place->centroid->longitude;
+  $item['name'] = (string) $xml->document->placeDetails->place->name;
+  $item['lat'] = (string) $xml->document->placeDetails->place->centroid->latitude;
+  $item['lon'] = (string) $xml->document->placeDetails->place->centroid->longitude;
 
   return $item;
 }
