Commit 1482a565 authored by Dries's avatar Dries
Browse files

- Usability improvement and bugfix for translation issue with the taxonomy
  module.  Patch #70 by Stefan.
parent cd150ba7
...@@ -70,7 +70,7 @@ function taxonomy_link($type, $node = NULL) { ...@@ -70,7 +70,7 @@ function taxonomy_link($type, $node = NULL) {
function taxonomy_form_vocabulary($edit = array()) { function taxonomy_form_vocabulary($edit = array()) {
foreach (module_list() as $name) { foreach (module_list() as $name) {
if (module_hook($name, "node")) { if (module_hook($name, "node")) {
$nodetypes[$name] = $name; $nodetypes[$name] = module_invoke($name, "node", "name");
} }
} }
...@@ -280,9 +280,10 @@ function taxonomy_overview() { ...@@ -280,9 +280,10 @@ function taxonomy_overview() {
$header = array(t("name"), t("node types"), array("data" => t("operations"), "colspan" => 3)); $header = array(t("name"), t("node types"), array("data" => t("operations"), "colspan" => 3));
$vocabularies = taxonomy_get_vocabularies(); $vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vocabulary) { foreach ($vocabularies as $vocabulary) {
$links = array(); $links = array();
$rows[] = array($vocabulary->name, array("data" => $vocabulary->nodes, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid")); $rows[] = array($vocabulary->name, array("data" => module_invoke($vocabulary->nodes, "node", "name"), "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid"));
$tree = taxonomy_get_tree($vocabulary->vid); $tree = taxonomy_get_tree($vocabulary->vid);
if ($tree) { if ($tree) {
......
...@@ -70,7 +70,7 @@ function taxonomy_link($type, $node = NULL) { ...@@ -70,7 +70,7 @@ function taxonomy_link($type, $node = NULL) {
function taxonomy_form_vocabulary($edit = array()) { function taxonomy_form_vocabulary($edit = array()) {
foreach (module_list() as $name) { foreach (module_list() as $name) {
if (module_hook($name, "node")) { if (module_hook($name, "node")) {
$nodetypes[$name] = $name; $nodetypes[$name] = module_invoke($name, "node", "name");
} }
} }
...@@ -280,9 +280,10 @@ function taxonomy_overview() { ...@@ -280,9 +280,10 @@ function taxonomy_overview() {
$header = array(t("name"), t("node types"), array("data" => t("operations"), "colspan" => 3)); $header = array(t("name"), t("node types"), array("data" => t("operations"), "colspan" => 3));
$vocabularies = taxonomy_get_vocabularies(); $vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vocabulary) { foreach ($vocabularies as $vocabulary) {
$links = array(); $links = array();
$rows[] = array($vocabulary->name, array("data" => $vocabulary->nodes, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid")); $rows[] = array($vocabulary->name, array("data" => module_invoke($vocabulary->nodes, "node", "name"), "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid"));
$tree = taxonomy_get_tree($vocabulary->vid); $tree = taxonomy_get_tree($vocabulary->vid);
if ($tree) { if ($tree) {
......
Supports Markdown
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