diff options
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r-- | modules/taxonomy.module | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 7273525a1..b57be1347 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -719,18 +719,17 @@ function taxonomy_nodeapi($node, $op, $arg = 0) { function taxonomy_page() { - - // taxonomy querystring always parsed here - // TODO: support term *names* in URL (e.g. taxonomy/view/or/milk,beer,red+wine) $taxonomy->operator = arg(2); $taxonomy->str_tids = check_query(arg(3)); $taxonomy->tids = explode(",", $taxonomy->str_tids); - switch (arg(1)) { - case "feed": - taxonomy_feed($taxonomy); + if (ereg("^[0-9,]+[^,]$", $taxonomy->str_tids)) { + + switch (arg(1)) { + case "feed": + taxonomy_feed($taxonomy); break; - default: + default: // Build title: $sql = 'SELECT name FROM {term_data} WHERE tid IN (%s)'; $result = db_query($sql, $taxonomy->str_tids); @@ -752,6 +751,10 @@ function taxonomy_page() { $output = taxonomy_render_nodes(taxonomy_select_nodes($taxonomy)); print theme("page", $output, implode(', ', $names), $breadcrumbs); break; + } + } + else { + drupal_not_found(); } } |