Commit d9dc5516 authored by Dries's avatar Dries

- Patch #29151 by fgm: simplified SQL query in taxonomy_node_form().

parent bd2d9180
...@@ -513,7 +513,7 @@ function taxonomy_node_form($node) { ...@@ -513,7 +513,7 @@ function taxonomy_node_form($node) {
$terms = $node->taxonomy; $terms = $node->taxonomy;
} }
$c = db_query(db_rewrite_sql("SELECT v.*, n.type FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", 'v', 'vid'), $node->type); $c = db_query(db_rewrite_sql("SELECT v.* FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", 'v', 'vid'), $node->type);
while ($vocabulary = db_fetch_object($c)) { while ($vocabulary = db_fetch_object($c)) {
if ($vocabulary->tags) { if ($vocabulary->tags) {
$typed_terms = array(); $typed_terms = array();
......
...@@ -513,7 +513,7 @@ function taxonomy_node_form($node) { ...@@ -513,7 +513,7 @@ function taxonomy_node_form($node) {
$terms = $node->taxonomy; $terms = $node->taxonomy;
} }
$c = db_query(db_rewrite_sql("SELECT v.*, n.type FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", 'v', 'vid'), $node->type); $c = db_query(db_rewrite_sql("SELECT v.* FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", 'v', 'vid'), $node->type);
while ($vocabulary = db_fetch_object($c)) { while ($vocabulary = db_fetch_object($c)) {
if ($vocabulary->tags) { if ($vocabulary->tags) {
$typed_terms = array(); $typed_terms = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment