Commit 03c4b3c3 authored by Kjartan's avatar Kjartan

- submit page will no longer give errors.

- empty taxonomy sets should now be well behaved.
parent 7e6acb5b
......@@ -902,7 +902,7 @@ function node_add($type) {
foreach (module_list() as $name) {
if (module_hook($name, "node") && node_access("create", array("type" => $name))) {
$output .= "<li>";
$output .= " <a href=\"module.php?mod=node&op=add&type=$name\" title=\"". strtr(t("Add a new %s."), module_invoke($name, "node", "name")) ."\">". module_invoke($name, "node", "name") ."</a>";
$output .= " <a href=\"module.php?mod=node&op=add&type=$name\" title=\"". strtr(t("Add a new %s."), array("%s" => module_invoke($name, "node", "name"))) ."\">". module_invoke($name, "node", "name") ."</a>";
$output .= " <div style=\"margin-left: 20px;\">". module_invoke($name, "node", "description") ."</div>";
$output .= "</li>";
}
......
......@@ -902,7 +902,7 @@ function node_add($type) {
foreach (module_list() as $name) {
if (module_hook($name, "node") && node_access("create", array("type" => $name))) {
$output .= "<li>";
$output .= " <a href=\"module.php?mod=node&op=add&type=$name\" title=\"". strtr(t("Add a new %s."), module_invoke($name, "node", "name")) ."\">". module_invoke($name, "node", "name") ."</a>";
$output .= " <a href=\"module.php?mod=node&op=add&type=$name\" title=\"". strtr(t("Add a new %s."), array("%s" => module_invoke($name, "node", "name"))) ."\">". module_invoke($name, "node", "name") ."</a>";
$output .= " <div style=\"margin-left: 20px;\">". module_invoke($name, "node", "description") ."</div>";
$output .= "</li>";
}
......
......@@ -303,7 +303,7 @@ function taxonomy_node_form($type, $node = '') {
while ($vocabulary = db_fetch_object($c)) {
$result[] .= taxonomy_form($vocabulary->vid, $terms);
}
return $result;
return $result ? $result : array();
}
// return 1 if node identified by $nid contains a taxonomy term identified by $tid in his body or title
......
......@@ -303,7 +303,7 @@ function taxonomy_node_form($type, $node = '') {
while ($vocabulary = db_fetch_object($c)) {
$result[] .= taxonomy_form($vocabulary->vid, $terms);
}
return $result;
return $result ? $result : array();
}
// return 1 if node identified by $nid contains a taxonomy term identified by $tid in his body or title
......
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