Skip to content
Snippets Groups Projects
Commit 110da60f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Improved teaser handling.
parent b1be2a1f
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -14,13 +14,14 @@ function forum_access($op, $node) {
}
}
function forum_save() {
function forum_save($op, $node) {
if ($op == "approve") {
return array("status" => 1);
}
if ($op == "create") {
return array("promote" => 0, "moderate" => 0, "status" => 1);
return array("promote" => 0, "moderate" => 0, "status" => 1, "teaser" => $node->body);
}
if ($op == "update") {
......@@ -28,7 +29,7 @@ function forum_save() {
}
if ($op == "update") {
return array("status" => 0);
return array("status" => 0, "teaser" => $node->body);
}
}
......
......@@ -14,13 +14,14 @@ function forum_access($op, $node) {
}
}
function forum_save() {
function forum_save($op, $node) {
if ($op == "approve") {
return array("status" => 1);
}
if ($op == "create") {
return array("promote" => 0, "moderate" => 0, "status" => 1);
return array("promote" => 0, "moderate" => 0, "status" => 1, "teaser" => $node->body);
}
if ($op == "update") {
......@@ -28,7 +29,7 @@ function forum_save() {
}
if ($op == "update") {
return array("status" => 0);
return array("status" => 0, "teaser" => $node->body);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment