- node system:
+ Made the filters work again! + There is one strange thing that I can't track down though: for some reason, "^M" characters (?) are padded after newline ("\n" and / or "\r") characters.4.0.x
parent
0222ee6666
commit
e7e104e82f
|
@ -170,7 +170,9 @@ function node_save($node, $filter) {
|
||||||
foreach ($node as $key => $value) {
|
foreach ($node as $key => $value) {
|
||||||
if (in_array($key, $fields)) {
|
if (in_array($key, $fields)) {
|
||||||
$k[] = check_query($key);
|
$k[] = check_query($key);
|
||||||
$v[] = "'". check_query($value) ."'";
|
$v[] = "'". check_input($value) ."'";
|
||||||
|
// NOTE: for the values we use 'check_input()' such that we apply
|
||||||
|
// the filters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +194,9 @@ function node_save($node, $filter) {
|
||||||
// prepare the query:
|
// prepare the query:
|
||||||
foreach ($node as $key => $value) {
|
foreach ($node as $key => $value) {
|
||||||
if (in_array($key, $fields)) {
|
if (in_array($key, $fields)) {
|
||||||
$q[] = check_query($key) ." = '". check_query($value) ."'";
|
$q[] = check_query($key) ." = '". check_input($value) ."'";
|
||||||
|
// NOTE: for the values we use 'check_input()' such that we apply
|
||||||
|
// the filters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ function node_filter_link($text) {
|
||||||
function node_filter($text) {
|
function node_filter($text) {
|
||||||
if (variable_get("filter_html", 0)) $text = node_filter_html($text);
|
if (variable_get("filter_html", 0)) $text = node_filter_html($text);
|
||||||
if (variable_get("filter_link", 0)) $text = node_filter_link($text);
|
if (variable_get("filter_link", 0)) $text = node_filter_link($text);
|
||||||
return $text;
|
return trim($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function node_link($type, $node = 0) {
|
function node_link($type, $node = 0) {
|
||||||
|
@ -671,11 +671,19 @@ function node_preview($edit) {
|
||||||
$edit["created"] = time();
|
$edit["created"] = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Apply the required filters:
|
||||||
|
*/
|
||||||
|
|
||||||
|
foreach ($edit as $key => $value) {
|
||||||
|
$node->$key = check_input($value);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Display a preview of the node:
|
** Display a preview of the node:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
node_view($edit);
|
node_view($node);
|
||||||
|
|
||||||
return node_form($edit);
|
return node_form($edit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ function node_filter_link($text) {
|
||||||
function node_filter($text) {
|
function node_filter($text) {
|
||||||
if (variable_get("filter_html", 0)) $text = node_filter_html($text);
|
if (variable_get("filter_html", 0)) $text = node_filter_html($text);
|
||||||
if (variable_get("filter_link", 0)) $text = node_filter_link($text);
|
if (variable_get("filter_link", 0)) $text = node_filter_link($text);
|
||||||
return $text;
|
return trim($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function node_link($type, $node = 0) {
|
function node_link($type, $node = 0) {
|
||||||
|
@ -671,11 +671,19 @@ function node_preview($edit) {
|
||||||
$edit["created"] = time();
|
$edit["created"] = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Apply the required filters:
|
||||||
|
*/
|
||||||
|
|
||||||
|
foreach ($edit as $key => $value) {
|
||||||
|
$node->$key = check_input($value);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Display a preview of the node:
|
** Display a preview of the node:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
node_view($edit);
|
node_view($node);
|
||||||
|
|
||||||
return node_form($edit);
|
return node_form($edit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue