Index: modules/tinymce/tinymce.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/tinymce/tinymce.module,v
retrieving revision 1.37
diff -u -r1.37 tinymce.module
--- modules/tinymce/tinymce.module	17 Aug 2005 21:02:03 -0000	1.37
+++ modules/tinymce/tinymce.module	8 Sep 2005 18:55:02 -0000
@@ -635,7 +635,7 @@
     // PHP input formats are #2 in the filters table.
     preg_match("|^node/(\d+)(/edit)$|", $_GET['q'], $match);
     if (intval($match[1]) > 0) {
-      if (db_result(db_query('SELECT format FROM {node} WHERE nid = %d AND format = 2', $match[1]))) {
+      if (db_result(db_query('SELECT format FROM {node_revisions} WHERE nid = %d AND format = 2', $match[1]))) {
         return FALSE;
       }
     }
