- Moved the filter()s back to the individual node modules as it used to be.
parent
637004c539
commit
37fe442d89
|
@ -79,10 +79,10 @@ function blog_save($op, $node) {
|
|||
** pages, they will not be changed unless explicitly specified.
|
||||
*/
|
||||
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
else {
|
||||
return array("promote" => 0, "moderate" => 1, "status" => 1);
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "promote" => 0, "moderate" => 1, "status" => 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ function blog_save($op, $node) {
|
|||
** pages, they will not be changed unless explicitly specified.
|
||||
*/
|
||||
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
else {
|
||||
/*
|
||||
|
@ -105,7 +105,7 @@ function blog_save($op, $node) {
|
|||
** and will queue it in the moderation queue for promotion.
|
||||
*/
|
||||
|
||||
return array("promote" => 0, "moderate" => 1, "score" => 0, "votes" => 0, "users" => 0);
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "promote" => 0, "moderate" => 1, "score" => 0, "votes" => 0, "users" => 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -79,10 +79,10 @@ function blog_save($op, $node) {
|
|||
** pages, they will not be changed unless explicitly specified.
|
||||
*/
|
||||
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
else {
|
||||
return array("promote" => 0, "moderate" => 1, "status" => 1);
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "promote" => 0, "moderate" => 1, "status" => 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ function blog_save($op, $node) {
|
|||
** pages, they will not be changed unless explicitly specified.
|
||||
*/
|
||||
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
else {
|
||||
/*
|
||||
|
@ -105,7 +105,7 @@ function blog_save($op, $node) {
|
|||
** and will queue it in the moderation queue for promotion.
|
||||
*/
|
||||
|
||||
return array("promote" => 0, "moderate" => 1, "score" => 0, "votes" => 0, "users" => 0);
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "promote" => 0, "moderate" => 1, "score" => 0, "votes" => 0, "users" => 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,10 +66,10 @@ function book_save($op, $node) {
|
|||
|
||||
if ($op == "create") {
|
||||
if (user_access("administer nodes")) {
|
||||
return array("teaser" => $node->body, "format", "parent", "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "format", "parent", "weight", "log");
|
||||
}
|
||||
else {
|
||||
return array("teaser" => $node->body, "format", "moderate" => 1, "parent", "promote" => 0, "status" => 1, "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "format", "moderate" => 1, "parent", "promote" => 0, "status" => 1, "weight", "log");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ function book_save($op, $node) {
|
|||
** new revision unless we are explicitly instructed to.
|
||||
*/
|
||||
|
||||
return array("teaser" => $node->body, "format", "parent", "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "format", "parent", "weight", "log");
|
||||
}
|
||||
else {
|
||||
/*
|
||||
|
@ -93,7 +93,7 @@ function book_save($op, $node) {
|
|||
** and are not promoted by default. See also: book_load().
|
||||
*/
|
||||
|
||||
return array("teaser" => $node->body, "created" => time(), "format", "moderate" => 1, "parent", "promote" => 0, "score" => 0, "status" => 1, "users" => "", "revisions", "votes" => 0, "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "created" => time(), "format", "moderate" => 1, "parent", "promote" => 0, "score" => 0, "status" => 1, "users" => "", "revisions", "votes" => 0, "weight", "log");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,10 +66,10 @@ function book_save($op, $node) {
|
|||
|
||||
if ($op == "create") {
|
||||
if (user_access("administer nodes")) {
|
||||
return array("teaser" => $node->body, "format", "parent", "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "format", "parent", "weight", "log");
|
||||
}
|
||||
else {
|
||||
return array("teaser" => $node->body, "format", "moderate" => 1, "parent", "promote" => 0, "status" => 1, "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "format", "moderate" => 1, "parent", "promote" => 0, "status" => 1, "weight", "log");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ function book_save($op, $node) {
|
|||
** new revision unless we are explicitly instructed to.
|
||||
*/
|
||||
|
||||
return array("teaser" => $node->body, "format", "parent", "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "format", "parent", "weight", "log");
|
||||
}
|
||||
else {
|
||||
/*
|
||||
|
@ -93,7 +93,7 @@ function book_save($op, $node) {
|
|||
** and are not promoted by default. See also: book_load().
|
||||
*/
|
||||
|
||||
return array("teaser" => $node->body, "created" => time(), "format", "moderate" => 1, "parent", "promote" => 0, "score" => 0, "status" => 1, "users" => "", "revisions", "votes" => 0, "weight", "log");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->body), "created" => time(), "format", "moderate" => 1, "parent", "promote" => 0, "score" => 0, "status" => 1, "users" => "", "revisions", "votes" => 0, "weight", "log");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ function forum_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "create") {
|
||||
return array("body" => filter($node->body), "moderate" => 0, "status" => 1, "tid", "icon_num", "shadow" => 0);
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "moderate" => 0, "status" => 1, "tid", "icon_num", "shadow" => 0);
|
||||
}
|
||||
|
||||
if ($op == "decline") {
|
||||
|
@ -82,7 +82,7 @@ function forum_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "update") {
|
||||
return array("body" => filter($node->body), "tid", "icon_num", "shadow");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "tid", "icon_num", "shadow");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ function forum_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "create") {
|
||||
return array("body" => filter($node->body), "moderate" => 0, "status" => 1, "tid", "icon_num", "shadow" => 0);
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "moderate" => 0, "status" => 1, "tid", "icon_num", "shadow" => 0);
|
||||
}
|
||||
|
||||
if ($op == "decline") {
|
||||
|
@ -82,7 +82,7 @@ function forum_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "update") {
|
||||
return array("body" => filter($node->body), "tid", "icon_num", "shadow");
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "tid", "icon_num", "shadow");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1032,9 +1032,6 @@ function node_preview($node, $error = NULL) {
|
|||
** Display a prenode of the node:
|
||||
*/
|
||||
|
||||
$view->body = filter($view->body);
|
||||
$view->teaser = filter($view->teaser);
|
||||
|
||||
if ($view->teaser && $view->teaser != $view->body) {
|
||||
print "<h3>". t("Preview trimmed version") ."</h3>";
|
||||
node_view($view, 1);
|
||||
|
@ -1077,8 +1074,6 @@ function node_submit($node) {
|
|||
** Prepare the node's body:
|
||||
*/
|
||||
|
||||
$node->body = filter($node->body);
|
||||
|
||||
if ($node->nid) {
|
||||
|
||||
/*
|
||||
|
|
|
@ -1032,9 +1032,6 @@ function node_preview($node, $error = NULL) {
|
|||
** Display a prenode of the node:
|
||||
*/
|
||||
|
||||
$view->body = filter($view->body);
|
||||
$view->teaser = filter($view->teaser);
|
||||
|
||||
if ($view->teaser && $view->teaser != $view->body) {
|
||||
print "<h3>". t("Preview trimmed version") ."</h3>";
|
||||
node_view($view, 1);
|
||||
|
@ -1077,8 +1074,6 @@ function node_submit($node) {
|
|||
** Prepare the node's body:
|
||||
*/
|
||||
|
||||
$node->body = filter($node->body);
|
||||
|
||||
if ($node->nid) {
|
||||
|
||||
/*
|
||||
|
|
|
@ -49,7 +49,12 @@ function page_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "create") {
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
if ($node->format) { // do not filter PHP code, do not auto-extract a teaser
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
}
|
||||
else {
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "format", "link", "description");
|
||||
}
|
||||
}
|
||||
|
||||
if ($op == "decline") {
|
||||
|
@ -57,7 +62,12 @@ function page_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "update") {
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
if ($node->format) { // do not filter PHP code, do not auto-extract a teaser
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
}
|
||||
else {
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "format", "link", "description");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,12 @@ function page_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "create") {
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
if ($node->format) { // do not filter PHP code, do not auto-extract a teaser
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
}
|
||||
else {
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "format", "link", "description");
|
||||
}
|
||||
}
|
||||
|
||||
if ($op == "decline") {
|
||||
|
@ -57,7 +62,12 @@ function page_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "update") {
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
if ($node->format) { // do not filter PHP code, do not auto-extract a teaser
|
||||
return array("teaser" => $node->body, "format", "link", "description");
|
||||
}
|
||||
else {
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser), "format", "link", "description");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -417,4 +417,4 @@ function poll_update($node) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -417,4 +417,4 @@ function poll_update($node) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -48,7 +48,7 @@ function story_save($op, $node) {
|
|||
|
||||
if ($op == "create") {
|
||||
if (user_access("administer nodes")) {
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
else {
|
||||
return array("moderate" => 1);
|
||||
|
@ -60,7 +60,7 @@ function story_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "update") {
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ function story_save($op, $node) {
|
|||
|
||||
if ($op == "create") {
|
||||
if (user_access("administer nodes")) {
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
else {
|
||||
return array("moderate" => 1);
|
||||
|
@ -60,7 +60,7 @@ function story_save($op, $node) {
|
|||
}
|
||||
|
||||
if ($op == "update") {
|
||||
return array();
|
||||
return array("body" => filter($node->body), "teaser" => filter($node->teaser));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue