<html><head><body><pre>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 @@
 &lt;?php
 
-require_once &#039;extractor.feeds.inc&#039;;
+require_once DRUPAL_ROOT . &#039;/&#039; . &#039;extractor.feeds.inc&#039;;
 
 /**
  * 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(&amp;$form_state) {
     return extractor_feeds_form($this-&gt;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 @@
 &lt;?php
 
-require_once &#039;extractor.feeds.inc&#039;;
+require_once DRUPAL_ROOT . &#039;/&#039; . &#039;extractor.feeds.inc&#039;;
 
 /**
  * Extend common syndication parser and add term extraction.
@@ -38,4 +38,4 @@ class ExtractorSyndicationParser extends
   public function configForm(&amp;$form_state) {
     return extractor_feeds_form($this-&gt;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(&#039;module&#039;, &#039;extractor&#039;) .&#039;/extractor.js&#039;);
+  drupal_add_js(drupal_get_path(&#039;module&#039;, &#039;extractor&#039;) . &#039;/extractor.js&#039;);
   $form = array();
   $form[&#039;extractors&#039;] = array(
     &#039;#type&#039; =&gt; &#039;radios&#039;,
@@ -21,7 +21,7 @@ function extractor_feeds_form($config) {
     &#039;#default_value&#039; =&gt; $config[&#039;extractors&#039;],
     &#039;#options&#039; =&gt; array(
       &#039;extractor_simple&#039; =&gt; t(&#039;Simple Extractor&#039;),
-      &#039;placemaker&#039; =&gt; t(&#039;Yahoo Placemaker&#039;)
+      &#039;placemaker&#039; =&gt; t(&#039;Yahoo Placemaker&#039;),
     ),
   );
   $form[&#039;placemaker_key&#039;] = array(
@@ -71,10 +71,10 @@ function extractor_feeds_get_mapping_sou
  */
 function extractor_feeds_get_source_element($item, $element_key, $config) {
   if ($element_key == &#039;extracted_terms&#039;) {
-    return extractor_extract($item[&#039;title&#039;] .&#039; &#039;. $item[&#039;description&#039;], $config[&#039;extractors&#039;], $config);
+    return extractor_extract($item[&#039;title&#039;] . &#039; &#039; . $item[&#039;description&#039;], $config[&#039;extractors&#039;], $config);
   }
   elseif ($element_key == &#039;extracted_tids&#039;) {
-    $terms = extractor_extract($item[&#039;title&#039;] .&#039; &#039;. $item[&#039;description&#039;], $config[&#039;extractors&#039;], $config);
+    $terms = extractor_extract($item[&#039;title&#039;] . &#039; &#039; . $item[&#039;description&#039;], $config[&#039;extractors&#039;], $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 = &quot;API for extracting terms from text&quot;
 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 @@
 &lt;?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(&#039;extractor&#039;);
+  // TODO The drupal_(un)install_schema functions are called automatically in D7.
+  // drupal_install_schema(&#039;extractor&#039;)
 }
 
 /**
- * Implementation of hook_uninstall().
+ * Implements hook_uninstall().
  */
 function extractor_uninstall() {
-  drupal_uninstall_schema(&#039;extractor&#039;);
+  // TODO The drupal_(un)install_schema functions are called automatically in D7.
+  // drupal_uninstall_schema(&#039;extractor&#039;)
 }
 
 /**
@@ -53,12 +61,15 @@ function extractor_update_6100() {
     ),
     &#039;primary key&#039; =&gt; array(&#039;tid&#039;),
   );
-  db_create_table($ret, &#039;extractor_lookup&#039;, $schema);
+  db_create_table(&#039;extractor_lookup&#039;, $schema);
   if ($vocabulary = variable_get(&#039;extractor_simple_vid&#039;, FALSE)) {
     $vocabulary = taxonomy_vocabulary_load($vocabulary);
     $id = strpos($vocabulary-&gt;module, &#039;features_&#039;) === 0 ? $vocabuarly-&gt;module : $vocabulary-&gt;vid;
     variable_set(&#039;extractor_simple_vocabularies&#039;, array($id));
   }
   variable_del(&#039;extractor_simple_vid&#039;);
-  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(&#039;TODO Add a descriptive string here to show in the UI.&#039;) /* $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[&#039;ExtractorSyndicationParser&#039;] = 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(&amp;$form, &amp;$form_state) {
   $form[&#039;extractor&#039;] = 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(&amp;$form, &amp;$form_state) {
   $form[&#039;submit&#039;][&#039;#weight&#039;] = isset($form[&#039;submit&#039;][&#039;#weight&#039;]) ? $form[&#039;submit&#039;][&#039;#weight&#039;] + 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 ==&#039;term&#039; &amp;&amp; $term) {
+function extractor_taxonomy($op = NULL, $type = NULL, $term = NULL) {
+  if ($type == &#039;term&#039; &amp;&amp; $term) {
     switch ($op) {
       case &#039;delete&#039;:
-        db_query(&quot;DELETE FROM {extractor_lookup} WHERE tid = %d&quot;, $term[&#039;tid&#039;]);
+        // TODO Please review the conversion of this statement to the D7 database API syntax.
+        /* db_query(&quot;DELETE FROM {extractor_lookup} WHERE tid = %d&quot;, $term[&#039;tid&#039;]) */
+        db_delete(&#039;extractor_lookup&#039;)
+  -&gt;condition(&#039;tid&#039;, $term[&#039;tid&#039;])
+  -&gt;execute();
         break;
       case &#039;update&#039;:
-        db_query(&quot;DELETE FROM {extractor_lookup} WHERE tid = %d&quot;, $term[&#039;tid&#039;]);
+        // TODO Please review the conversion of this statement to the D7 database API syntax.
+        /* db_query(&quot;DELETE FROM {extractor_lookup} WHERE tid = %d&quot;, $term[&#039;tid&#039;]) */
+        db_delete(&#039;extractor_lookup&#039;)
+  -&gt;condition(&#039;tid&#039;, $term[&#039;tid&#039;])
+  -&gt;execute();
       case &#039;insert&#039;:
         if (!empty($term[&#039;extractor_lookup&#039;])) {
           drupal_write_record(&#039;extractor_lookup&#039;, $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(&amp;$targets, $vid) {
   $targets[&#039;extractor_lookup&#039;] = 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(&quot;SELECT tid FROM {extractor_lookup} WHERE tid = %d&quot;, $tid));
+  return db_query(&quot;SELECT tid FROM {extractor_lookup} WHERE tid = :tid&quot;, array(&#039;:tid&#039; =&gt; $tid))-&gt;fetchField();
 }
 
 /**
@@ -188,7 +196,7 @@ function extractor_extract($text, $libra
 function extractor_include($name) {
   static $included;
   if (!$included[$name]) {
-    include drupal_get_path(&#039;module&#039;, &#039;extractor&#039;) .&#039;/libraries/&#039;. $name .&#039;.inc&#039;;
+    include DRUPAL_ROOT . &#039;/&#039; . drupal_get_path(&#039;module&#039;, &#039;extractor&#039;) . &#039;/libraries/&#039; . $name . &#039;.inc&#039;;
     $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 &lt; count($sorted_terms) - 1; $i++) {
-        if (strlen($sorted_terms[$i]) &lt; strlen($sorted_terms[$i+1])) {
-          $tmp = $sorted_terms[$i+1];
-          $sorted_terms[$i+1] = $sorted_terms[$i];
+        if (strlen($sorted_terms[$i]) &lt; 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 &gt;= 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(&quot;SELECT td.tid, td.name FROM {term_data} td JOIN {extractor_lookup} e ON td.tid = e.tid&quot;, 0, 2000);
+      $result = db_query_range(&quot;SELECT td.tid, td.name FROM {taxonomy_term_data} td JOIN {extractor_lookup} e ON td.tid = e.tid&quot;);
     }
     else {
-      $result = db_query_range(&quot;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&quot;, implode(&#039;, &#039;, $vids), 0, 2000);
+      // TODO Please convert this statement to the D7 database API syntax.
+      $result = db_query_range(&quot;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&quot;, implode(&#039;, &#039;, $vids));
     }
     while ($term = db_fetch_object($result)) {
       $term_cache[strtolower($term-&gt;name[0])][$term-&gt;name] = $term;
@@ -124,4 +125,4 @@ function _extractor_simple_lookup($word)
  */
 function _extractor_simple_stopwords() {
   return array(&#039;a&#039;, &#039;able&#039;, &#039;about&#039;, &#039;across&#039;, &#039;after&#039;, &#039;all&#039;, &#039;almost&#039;, &#039;also&#039;, &#039;am&#039;, &#039;among&#039;, &#039;an&#039;, &#039;and&#039;, &#039;any&#039;, &#039;are&#039;, &#039;as&#039;, &#039;at&#039;, &#039;be&#039;, &#039;because&#039;, &#039;been&#039;, &#039;but&#039;, &#039;by&#039;, &#039;can&#039;, &#039;cannot&#039;, &#039;could&#039;, &#039;dear&#039;, &#039;did&#039;, &#039;do&#039;, &#039;does&#039;, &#039;either&#039;, &#039;else&#039;, &#039;ever&#039;, &#039;every&#039;, &#039;for&#039;, &#039;from&#039;, &#039;get&#039;, &#039;got&#039;, &#039;had&#039;, &#039;has&#039;, &#039;have&#039;, &#039;he&#039;, &#039;her&#039;, &#039;hers&#039;, &#039;him&#039;, &#039;his&#039;, &#039;how&#039;, &#039;however&#039;, &#039;i&#039;, &#039;if&#039;, &#039;in&#039;, &#039;into&#039;, &#039;is&#039;, &#039;it&#039;, &#039;its&#039;, &#039;just&#039;, &#039;least&#039;, &#039;let&#039;, &#039;like&#039;, &#039;likely&#039;, &#039;may&#039;, &#039;me&#039;, &#039;might&#039;, &#039;most&#039;, &#039;must&#039;, &#039;my&#039;, &#039;neither&#039;, &#039;no&#039;, &#039;nor&#039;, &#039;not&#039;, &#039;of&#039;, &#039;off&#039;, &#039;often&#039;, &#039;on&#039;, &#039;only&#039;, &#039;or&#039;, &#039;other&#039;, &#039;our&#039;, &#039;own&#039;, &#039;rather&#039;, &#039;said&#039;, &#039;say&#039;, &#039;says&#039;, &#039;she&#039;, &#039;should&#039;, &#039;since&#039;, &#039;so&#039;, &#039;some&#039;, &#039;than&#039;, &#039;that&#039;, &#039;the&#039;, &#039;their&#039;, &#039;them&#039;, &#039;then&#039;, &#039;there&#039;, &#039;these&#039;, &#039;they&#039;, &#039;this&#039;, &#039;tis&#039;, &#039;to&#039;, &#039;too&#039;, &#039;twas&#039;, &#039;us&#039;, &#039;wants&#039;, &#039;was&#039;, &#039;we&#039;, &#039;were&#039;, &#039;what&#039;, &#039;when&#039;, &#039;where&#039;, &#039;which&#039;, &#039;while&#039;, &#039;who&#039;, &#039;whom&#039;, &#039;why&#039;, &#039;will&#039;, &#039;with&#039;, &#039;would&#039;, &#039;yet&#039;, &#039;you&#039;, &#039;your&#039;);
-}
\ 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 = &#039;text/html&#039;;
 
   $outputType = &#039;xml&#039;;
-  $post = &#039;appid=&#039;. $config[&#039;placemaker_key&#039;] .&#039;&amp;documentContent=&#039;. $text .&#039;&amp;documentType=&#039;. $inputType .&#039;&amp;inputLanguage=&#039;. $config[&#039;language&#039;] .&#039;&amp;outputType=&#039;. $outputType .&#039;&amp;autoDisambiguate=true&#039;;
+  $post = &#039;appid=&#039; . $config[&#039;placemaker_key&#039;] . &#039;&amp;documentContent=&#039; . $text . &#039;&amp;documentType=&#039; . $inputType . &#039;&amp;inputLanguage=&#039; . $config[&#039;language&#039;] . &#039;&amp;outputType=&#039; . $outputType . &#039;&amp;autoDisambiguate=true&#039;;
   $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[&#039;name&#039;] = (string)$xml-&gt;document-&gt;placeDetails-&gt;place-&gt;name;
-  $item[&#039;lat&#039;] = (string)$xml-&gt;document-&gt;placeDetails-&gt;place-&gt;centroid-&gt;latitude;
-  $item[&#039;lon&#039;] = (string)$xml-&gt;document-&gt;placeDetails-&gt;place-&gt;centroid-&gt;longitude;
+  $item[&#039;name&#039;] = (string) $xml-&gt;document-&gt;placeDetails-&gt;place-&gt;name;
+  $item[&#039;lat&#039;] = (string) $xml-&gt;document-&gt;placeDetails-&gt;place-&gt;centroid-&gt;latitude;
+  $item[&#039;lon&#039;] = (string) $xml-&gt;document-&gt;placeDetails-&gt;place-&gt;centroid-&gt;longitude;
 
   return $item;
 }
</pre></body></head></html>