- submit page will no longer give errors.

- empty taxonomy sets should now be well behaved.
4.0.x
Kjartan Mannes 2002-04-15 16:39:26 +00:00
parent 7e6acb5bbd
commit 03c4b3c308
4 changed files with 4 additions and 4 deletions

View File

@ -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>";
}

View File

@ -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>";
}

View File

@ -303,7 +303,7 @@ Synonyms<br />Enter synonyms for this term, one synonym per line. Synonyms can b
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

View File

@ -303,7 +303,7 @@ Synonyms<br />Enter synonyms for this term, one synonym per line. Synonyms can b
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